Why does the overhead of a context switch provide a lower bo
Why does the overhead of a context switch provide a lower bound on the time slice for running a given process?
Solution
if there is only one task running, the processor can give it 100% of its processing time. There is no overhead of context switching.If there are two tasks to be run simultaneously by giving them alternate equal time slices, then in theory each task would receive 50% of the processing time.But to switch tasks, the processor has to save the current state of the running task, then recall the state in which it left the other task and then resume running the other task. This is called context switching and takes some of the processor time So each task receives less than 50% of the processor\'s time. If each task receives 45% of the processor\'s time, then the remaining 10% is the overhead consumed by context switching. Thats why context switch provide a lower bound on the time slice for running a given process.
