On 1999-07-09 08:54 +0200, Thomas Klein <kl...@kryptokom.de> wrote: > Dose anyone know how long a the kernel is busy with context switching > (beetween two processes) ? > Has anyone tested this yet? > I estimate of about 7 usec duration for that, (on a Pentium 400) but > I think that's to long.
There is a port of Larry McVoy's Benchmarks in benchmarks/lmbench, which (as one small part of the benchmark suite) accurately measures context switching overhead in a number of different situations (number of active processes, data segment size). The context switch time depends on a number of parameters, it is not a constant of the CPU and OS. I see 6us on my Celeron 300A when there is no active data and there are only two active processes, 9us with 16 active processes, and 33us with 16 processes that each keep 1MB of memory active. SMP kernels have additional task switch overhead, but I can't offer any data before tomorrow, when I'll run those tests on my systems at work ... Gruß, STefan To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message