What is the context switching time?

I have doubts about context switching. In multithreading, when context switching occurs, what will be the time between two context switches? Is this a fixed time interval?

+4
source share
1 answer

It is really an OS and the situation depends. You should read about the schedule in general and the specific streaming technology you use: there is a good list here .

When considering threads, real time intervals can change if other processes require processor time, thereby taking time from a process that runs threads.

There are some good examples of C code to measure this time .

+6
source

Source: https://habr.com/ru/post/1299569/


All Articles