lkml.org 
[lkml]   [2004]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: Context switch Tick
On Wed, 2 Jun 2004, Garboua Nahil Y Contr WRALC/MASFE wrote:

> Okay, vmstat show me the cs according to current load, what is the Maximum
> tick rate?
> A process requests a 1 microseconds sleep, or even 500 nanoseconds, how long
> does it actually sleep, that is why I need to know max tick rate for context
> switch for a given CPU.

Can't you just measure it?

Script started on Wed Jun 2 16:48:51 2004
# ./tester
Testing CPU Speed (once at start of program)
CPU speed = 2803766848 Hz
Cycles to make the two function calls = 88
It took 55625156 cpu cycles or 19839.437091 microseconds.
# exit
Script done on Wed Jun 2 16:48:57 2004

That was for a usleep(1). Source attached.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.

[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2005-03-22 14:03    [from the cache]
©2003-2011 Jasper Spaans