Often, while learning about Operating System [OS], you would have encountered the term "Kernel Pre-emption" . Be it Linux or any other Modern Operating System, the support for Kernel Pre-emption is now becoming a standard feature that one can expect of. In lieu of this, it becomes absolutely necessary to truly understand the meaning of kernel pre-emption and the impact of this on the other parts of the Operating System [OS].
Kernel pre-emption is a mechanism in which a scheduler is allowed to forcibly evict the currently running process and replace it with another process of same or higher priority, even if the current process can still continue to run if allowed to.
In case of kernel pre-emption, if interrupts are enabled, a high priority process can take over the execution over currently executing process. In this way, the first process' control path will be left unfinished.
In this situation, no other process code, other than that of an interrupt or exception handling can get executed in a uniprocessor system. In case of a multiprocessor system, this is not the case though!
The only way the first process can reclaim the control of CPU is after the completion of execution of the higher priority process context.
Post a Comment