Thursday, December 29, 2005

 

context switch

When one process stops running and another replaces it, this is known as a
context switch. Generally, the overhead for this is high, and kernel
programmers and application programmers try to minimize the number of
context switches performed by the system. Processes can stop running
voluntarily because they are waiting for some event or resource, or
involuntarily if the system decides it is time to give the CPU to another
process. In the first case, the CPU may actually become idle if no other
process is waiting to run. In the second case, either the process is
replaced with another that has been waiting, or the process is given a new
timeslice, or period of time in which to run, and is allowed to continue.


Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?