Describe the actions taken by kernel to context switch between processes.
Answers
Answered by
12
Thank you for asking the question.
when a clock interrupt happen in response of that " the OS saves the PC and also the user stack pointer of the currently executing process .after this happen
Then OS Transfer all the control to interrupt handler of kernel clock.
Then the clock interrupt handler saves the rest such as register and other machine state.
After this, the OS call on the scheduler and order to determine the next process.
Then OS in a way retrieve the process from its PCB and immadiately restore it.
Hope this will help you
when a clock interrupt happen in response of that " the OS saves the PC and also the user stack pointer of the currently executing process .after this happen
Then OS Transfer all the control to interrupt handler of kernel clock.
Then the clock interrupt handler saves the rest such as register and other machine state.
After this, the OS call on the scheduler and order to determine the next process.
Then OS in a way retrieve the process from its PCB and immadiately restore it.
Hope this will help you
Answered by
7
When there is an interruption to the normal CPU clocking, the operating system prevents the PC from crashing by assigning the system control to a kernel clock interrupt handler. This handler ensures that the registers are in a steady state along with the floating point registers in the process PCB.
The OS instructs the scheduler to decide the next process to be executed. The state of this process is determined by the PCB and the registers are restored. The restoration resets the processor to the state it was at the time of interruption.
Similar questions
English,
8 months ago
English,
8 months ago
Social Sciences,
1 year ago
Science,
1 year ago
Social Sciences,
1 year ago
Science,
1 year ago