当前位置:网站首页>Scheduler (Long-term,Short-term, Medium-term Scheduler) & Dispatcher
Scheduler (Long-term,Short-term, Medium-term Scheduler) & Dispatcher
2022-08-04 05:33:00 【学习溢出】
What is scheduler?
To execute many processes together on the CPU.
The scheduler selects the process form the ready queue and allocates the CPU to that process…
Ready queue is maintained by any of the scheduling algorithms like First come first served, shortest job first or priority scheduling algorithm etc.
Long-term scheduler
The long-term scheduler selects a job from the job queue and allows a process to load it into the main memory. It means that this is the schedule that handles that how much maximum jobs/processes can be loaded on the main memory.
Sometimes the number of processes submitted to the system are more than it can be executed immediately. Then in such cases, the processes are spooled on the mass storage, where they reside to get executed later.
The Long-Term Scheduler then select the process from this spool which is also called as Job Pool and load them in the Ready Queue for their further execution.
Job Scheduler
Short term scheduler
Short term scheduler selects a process from ready queue and allocates CPU to that process. After this state of a process is change from ready state to running state.
CPU Scheduler
The frequency of Long-Term Scheduler to pick up the processes from Job pool is less as compared to the Short-Term Scheduler.
Differences between Long-term Scheduler & Short-term Scheduler
| BASIS FOR COMPARISON | BASIS FOR COMPARISON | SHORT-TERM SCHEDULER |
|---|---|---|
| Basic | It picks up the process from Job Pool/Job Queue. | It picks up the process from Ready Queue. |
| Frequency | Long-Term Scheduler selects the process less frequently. | Short-Term Scheduler select the process more frequently. |
| Control | It controls the Degree of Multiprogramming. | It has less control over the Degree of Multiprogramming. |
| Alternative | Alternatively, it is called Job Scheduler. | Alternatively, it is called CPU Scheduler. |
| Important | Long-Term Scheduler is there in Batch Systems but it may or may not be present in Time Sharing System. | Short-Term Scheduler is there in Batch System and is minimally present in the Time Sharing System also. |
Key Differences Between Long-Term Scheduler and Short-Term Scheduler
- The Long -Term Scheduler select the processes from the Job pool. On the other hand, the Short-Term Scheduler selects the processes from the Ready queue.
- The Short Term Scheduler executes more frequently as compared to the Long-Term Scheduler.
- Long-Term scheduler controls the degree of multiprogramming whereas, the Short-Term Scheduling has less control over the degree of Multiprogramming.
- Long-Term Scheduling is also called Job Scheduler. On the other hand, the Short-Term Scheduling is also called CPU Scheduler.
- The Long-Term Scheduler is necessarily there in Batch System and may or may not be minimally present in the Time sharing system. On the other hand, the Short-Term Scheduler is there in Batch System and also minimally present in the Time Sharing System.
Medium-term scheduler
Most often, a running process needs I/O operation which doesn’t requires CPU. Hence during the execution of a process when a I/O operation is required then the operating system sends that process from running queue to blocked queue. When a process completes its I/O operation then it should again be shifted to ready queue. ALL these decisions are taken by the medium-term scheduler. Medium-term scheduling is a part of swapping.
The medium-term scheduler can be added if the degree of multiple programming needs to decrease
The degree of multiprogramming describes the maximum number of processes that a single-processor system can accommodate efficiently.
A medium-term scheduler is responsible for swapping. Some jobs are swapped from hard disk to the main memory and some jobs can be swapped out from the main memory to the hard disk.
Dispatcher
The dispatcher is the module that gives a process control over the CPU after it has been selected by the short-term scheduler.
Function as Following Steps:
- Context Switching
- Switch to user mode
- Jumping to proper location when process again restarted
The time taken by dispatcher is called dispatch latency.
Reference
https://techdifferences.com/difference-between-long-term-and-short-term-scheduler.html
https://www.geeksforgeeks.org/difference-between-dispatcher-and-scheduler/
边栏推荐
猜你喜欢
随机推荐
Uos统信系统 CA根证书搭建
Usage of SFTP
【HIT-SC-MEMO1】哈工大2022软件构造 复习笔记1
Tensorflow/Pytorch安装(Anaconda环境下,无版本冲突,亲测有效)
Pipe redirection
实现高并发服务器(二)
bitnami/mongodb-sharded在AWS EKS扩展shard失败解决
基于Webrtc和Janus的多人视频会议系统开发6 - 从Janus服务器订阅媒体流
JUC并发容器——跳表
华为鲲鹏arm服务器下使用webrtc和boost踩坑记--编译篇
树和二叉树
基于Webrtc和Janus的多人视频会议系统开发5 - 发布媒体流到Janus服务器
更改软件的默认安装位置
Shell脚本执行的三种方式
最全的最详细的指针讲解(C语言)
用chrome dev tools 强制js注入
用PPAPI插件技术在Web上显示会议视频、桌面、PPT等
基于Webrtc和Janus的多人视频会议系统开发4 - 改造信令交互系统完成sdp交换过程
gRPC intro 1:RPC
Unity Day01





![虚幻引擎 5 完整指南[2022六月最新课程学习内容]](/img/b3/fe90bca8166108e2e577d5a5e2ea6a.png)



