Context Switch Times

Could someone give me a rough ballpark figure for context switching times between threads in the same and different processes?

I know it varies based on a bunch of things but I’m looking for typical x86 numbers (measured in clock cycles is obviously best). Specifically I have a pentium 4 and a 486.

I just want to know what the penalty is for designing a lot of threads into my system.

Thanks

There is only one good answer to this, is write you own benchmark program that is a close to your situation as possible. Forget about getting info in clock cyles with P4 processor it’s an almost impossible thing to do ;-)

There is no penality in having lots of threads, the cost is when there are context switches and not how many thread there is . What’s important in most cases is not how long context switch is but how many context switches there will be.

I think there is a web page on qnx.com with some rough number, but qnx.com is currenlty down, so can’t trace it back.

I bet the long-awaited new qnx.com site will be available after this downtime.

Yep you are right, they have some fancy benchmark data availabile. but you have to register to get access to it and it must go through an approval procedure.

The worst thing is even if you register, you won’t be able to see the 3rd party CD or the 3rd party online repository for QNX 6.2.0 or 6.2.1 anymore. Rumor says a version for QNX 6.3 will be available once 6.3 is out.

They’ll be back, give them a chance. If not then we’ll just have to hassle QSS ;)

I just tried it and 3rd party online repository (6.2.1) is working.