How do context switches factor into CPU utilization? When studying operation systems, is context switch time included in CPU utilization time? For example, if 5 percent of CPU time is wasted to context switching, is CPU utilization 95 percent?
What is measured as "CPU utilization" is (time CPU working) / (total time). The overheads (like context switches) are part of the (time CPU working). So you might have 50% CPU utilization, of which 5% is context switch time.