context-switch
are the CPU cycles used up in doing a context switch accounted for in the process context`
If a process causes a lot of context switches, will the CPU cycles used in the context switch be shown in hte 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 contex switching from user to kernel space and vice versa?
Yes, I think it should. Look at the man pages for top and time in linux and possibly other *nix systems.
Related Links
What happens when a process does a system call and the time slide of that process ends?
Too many or too few context switches undesirable for computer system?
are the CPU cycles used up in doing a context switch accounted for in the process context`