![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| semaphore | raguramtgr | UNIX for Dummies Questions & Answers | 7 | 06-15-2009 09:39 AM |
| Semaphore | Jaken | Shell Programming and Scripting | 2 | 04-04-2009 05:10 PM |
| dmidecode, RAM speed = "Current Speed: Unknown" | Santi | Filesystems, Disks and Memory | 0 | 02-16-2006 06:16 AM |
| Semaphore | vjsony | UNIX for Dummies Questions & Answers | 3 | 04-07-2003 02:06 PM |
| semaphore | yls177 | UNIX for Dummies Questions & Answers | 1 | 10-08-2002 11:18 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
Just for emphasis, your results include the overhead of starting a large number of processes, and in each of them, printing a line of text to a buffered block device, and exiting the process. Bottlenecks in any of these operations are much more likely to explain the results than the thing you are trying to test.
|
|
||||
|
I compiled and run the loop test code posted by Otheus.
Xeon/SCO results: 555555.56 semop/s [0,0] Xeon/Linux results: 128205.13 semop/s [0,0] I don't have access to PIII box right now, but as results are same (proportionally) as what I saw in my test I think it is not crucial not to have PIII results here. As far as overhead mentioned by Era - I am aware of it, as it is closely resembles situation that I am evaluating, so it a valid test and not an oversight. So, does anyone have any idea what the bottleneck could be? or where to look? I really appreciate your patience with me and your persistence in getting to the bottom of it. |
|
||||
|
Accessing a semaphore - assuming there is no deadlock - it is a direct memory access operation, adding a whole page or multiples to process memory has overhead. It can involve an expensive call: brk(), if no memory is already there.
It depends on what Code:
size mycode shmget allocates from heap in most implementations: /proc/sys/kernel/sh* proc directories have shared memory information. kernel settings control shared memory operations. try this: Code:
gcc -p -g -o otherus otheus.c otheus.c grpof otheus |
|
||||
|
Jim,
I never tried profiling before, so I ran into some problem here: $ gcc -pg -o tstloop tstloop.c $ tstloop 128205.13 semop/s [0,0] $ gprof tstloop gprof: gmon.out file is missing call-graph data Any ideas? As far as use of time vs. gettimeofday (which, in fact I did use) is quite irrelevant, I am trying to see how many times per second system is capable of creating a process which would simply read a semaphore. Thanks. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|