Explain context switch with help of diagram | Operating System Question & Answer

 A context switch is the mechanism to store and restore the state or context of a CPU in Process Control block so that a process execution can be resumed from the same point at a later time.  
 Using this technique, a context switcher enables multiple processes to share a single CPU.  
 Context switching is an essential part of a multitasking operating system features.  
 When the scheduler switches the CPU from executing one process to execute another, the context switcher saves the content of all processor registers for the process being removed from the CPU, in
its process descriptor.  
 The context of a process is represented in the process control block of a process.  
 Context switch time is pure overhead. 
 Context switching can significantly affect performance as modern computers have a lot of general and status registers to be saved. 
 Content switching times are highly dependent on hardware support 

Post a Comment

0 Comments