开发者

What is the context switching time?

I have a doubt in context switching. In multi threading, when the context s开发者_运维技巧witching occurs, what will be the time between two context switches? Is it fixed time interval?


It is really OS and situation dependent. You'll have to read about scheduling in general and about the specific threading technology you use: there is a nice list here.

When considering threads, the real wall-time intervals might change if other processes need CPU time, by that taking time from the process running the threads.

That being said, there are some nice C code samples to measure that time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜