DISPATCHER in Operating Systems | OS Tutorials YASH PAL, June 6, 2026June 6, 2026 In an operating system, the dispatcher is an important component involved in CPU Scheduling. Basically, the dispatcher is the module that gives control of the CPU to the process selected by the short-term scheduler.Table of Contents DispatcherDispatch LatencyDispatcherThe functioning of the dispatcher involves the following things –Switching ContextSwitching to User modeJumping to the proper location in the user program to restart that program.The dispatcher should be as fast as possible, since it is invoked during every process switch.Dispatch LatencyTime taken by the dispatcher to stop one process and start another running is known as the dispatch latency. Figure 1 shows the dispatch latency.Figure 1: Dispatch LatencyTo keep dispatch latency low, we need to allow system calls to be preemptible. There are several ways to achieve this goal.One is to insert preemption points in long-duration system calls, which checks to see whether a high-priority process needs to be turned.If so, a context switch takes place, and when the high-priority process terminates, the interrupted process continues with the system call.Preemption points can be placed at only “safe” locations in the kernel, where kernel data structures are not being modified.Even with preemption points, dispatch latency can be charged because only a few preemption points can be practically added to a kernel.Another method for dealing with preemption is to make the entire kernel preemptible.Priority Inversion: If the higher-priority process needs to read or modify kernel data that is currently being accessed by another, lower-priority process, then the high-priority process would be waiting for a lower-priority one to finish. This situation is known as priority inversion.The conflict phase of dispatch latency has three components:Preemption of any process running in the kernel.Low-priority processes releasing resources needed by the high-priority process.Context switching from the current process to the high-priority process. engineering subjects Operating System Operating System