Questions tagged [context-switching]
62 questions
-2
votes
1 answer
the relationship between thread running time, cpu context switching and performance
I did an experiment to simulate what happened in our server code, I started 1024 threads and every thread execute a system call, this takes about 2.8s to finish execution on my machine. Then I add usleep(1000000) in function of every thread, the…

wangzhe
- 573
- 1
- 5
- 13
-2
votes
1 answer
On bare-metal, non-OS, how context switching occurs upon exceptions/interrupts
When CPU receives exception, Pre-processing by hardware
Saving the current PC and PSW values in RAM (or in control
registers in the case of the fast interrupt) and
Reading of the vector
Branching to the start of the exception handling routine is…

Chandan Kumar
- 17
- 1
- 5