random performance of sem_post function

Carlos O'Donell carlos@systemhalted.org
Fri Jan 4 19:11:00 GMT 2013


On 01/04/2013 12:21 PM, Maury, Olivier wrote:
> What is very strange is that this simple sem_post function is not
> tacking the same amount of time in both executables. In one of them
> the order of magnitude of the function call is almost all the time
> about 1e-5s while in the other one it's goes from 1e-5s (very rare)
> to 1e-2s (quite often).

1e-2s is 100Hz, which might be approximately the scheduling frequency
depending on your kernel and target architecture. Modern systems use
1000Hz ticks e.g. 1e-3s.

I suggest using oprofile to determine what the CPUs and threads
are actually doing.

Cheers,
Carlos.



More information about the Libc-help mailing list