In: Computer Science
In operating system;
‘What happens in a context switch?
ANSWER -
An Operating system is a program that acts as an interface between the user of the computer and the computer hardware, the main purpose of operating system is to provide an environment for the user so that they can execute required program in a convenient and efficient way.
Context switching - The transferring of control of CPU from one process to another device saving the context from currently running process and loading the context of another already process. This mechanics of saving and reloading the context is known as context switching or context switch.
The portion of Process Control Block (PCB) which includes the process state, memory management information and CPU scheduling information together constitute the context of process.
Context switch can occur in the following situation -
The context switching can be performed in two steps ,
Please comment if u need any more info. Please do leave a like, it would mean a lot. Thanks :)