What is the difference between a scheduler and a dispatcher in the context of process planning

I am currently studying undergraduate courses in operating systems. I am somewhat confused by the functions of the dispatcher and scheduler in process planning. Based on what I found out, the mid-term scheduler selects the process to replace both internally and once the processes are selected, the actual swap operation is performed by the dispatcher by switching contexts. Also, the short-term scheduler is responsible for scheduling processes and allocating their processor time based on the scheduling algorithm. Please correct me if I am wrong. I am really confused by the functions of the medium-term scheduler and dispatcher, as well as the differences between swap switching and context.

+6
source share
3 answers

You describe things in terms of a system.

Scheduler and dispatcher can be the same. However, they are often divided so that the scheduler maintains the process queue, and the dispatcher processes the actual context switch.

If you divide the scheduler into long-term, medium-term, and short-term, this separation (if it exists at all) is specific to the operating system.

Rearrangement in the process of deleting a process from memory. The process can be executed without the possibility of execution through the context switch, but cannot be replaced. Swapping is usually planning independent. However, the process should be replaced by a start, and memory management will try to avoid replacing executable processes.

+6
source

The planner evaluates the request service requirement and thereby imposes order.

0
source

Basically, everything you knew about the scheduler and dispatcher is correct. Sometimes they are called the same device or scheduler (in this case, a short time) contains the dispatcher as a whole and together is responsible for distributing the process on the CPU for execution. Sometimes they are called two separate blocks, the scheduler selects the process according to some algorithm, and the dispatcher is the software that is responsible for the actual context switch.

0
source

Source: https://habr.com/ru/post/979450/


All Articles