Are the CPU cycles used up in doing a context switch accounted for in the process context?

StackOverflow https://stackoverflow.com/questions/5910921

  •  29-10-2019
  •  | 
  •  

Question

If a process causes a lot of context switches, will the CPU cycles used in the context switch be shown in the process CPU utilization?
In other words, if I run a process that essentially repeatedly executes a system call, then should the output of top show an increase in CPU utilization for the process because of the increase in context switching from user to kernel space and vice versa?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top