Day 01 Part 17(A)- Schedulers in operating system long term, short term and midium term schedulers.
Day 01 Part 17(A)- Schedulers in operating system long term, short term and midium term schedulers
Contents [hide]
- 1 Schedulers in Operating System (OS) – Long-Term, Short-Term & Medium-Term Schedulers
- 2 Long-Term Scheduler (Job Scheduler)
- 3 Short-Term Scheduler (CPU Scheduler)
- 4 Comparison of Schedulers
- 5 Key Points to Remember
- 6 Day 01 Part 17(A)- Schedulers in operating system long term, short term and midium term schedulers.
- 7 Operating System Concepts (7th Edition) 600 dpi
Schedulers in Operating System (OS) – Long-Term, Short-Term & Medium-Term Schedulers
Schedulers in an Operating System (OS) are responsible for managing process execution by selecting processes to run in the CPU. There are three types of schedulers:
Long-Term Scheduler (Job Scheduler)
Short-Term Scheduler (CPU Scheduler)
Medium-Term Scheduler (Swapper)
Long-Term Scheduler (Job Scheduler)
Function: Selects which processes should be admitted into the ready queue from the job pool.
Frequency: Runs infrequently (e.g., once every few seconds or minutes).
Main Purpose: Controls degree of multiprogramming (number of processes in memory).
Works in: Batch Systems (e.g., old mainframe systems).
Example: If there are 100 processes in the job pool, the long-term scheduler chooses 10 to bring into RAM.
Key Role: Determines which programs enter execution.
Short-Term Scheduler (CPU Scheduler)
Function: Selects which process will execute next in the CPU from the ready queue.
Frequency: Runs very frequently (millisecond level).
Main Purpose: Decides which process gets CPU time for execution.
Works in: All systems (Batch, Time-Sharing, Real-Time).
Example: A process in the ready queue gets scheduled every few milliseconds for execution.
Key Role: Improves CPU utilization & response time.
Medium-Term Scheduler (Swapper)
Function: Removes some processes from memory (swaps out) and brings them back later (swaps in).
Frequency: Runs occasionally, based on memory needs.
Main Purpose: Reduces memory load and improves CPU efficiency.
Works in: Time-Sharing & Virtual Memory Systems.
Example: If RAM is full, it moves an inactive process to disk (swap space) and loads an active process.
Key Role: Manages swapping of processes to optimize RAM usage.
Comparison of Schedulers
Feature | Long-Term Scheduler | Short-Term Scheduler | Medium-Term Scheduler |
---|---|---|---|
Other Name | Job Scheduler | CPU Scheduler | Swapper |
Purpose | Selects which processes enter RAM | Selects which process gets CPU time | Manages swapping of processes |
Frequency | Runs infrequently | Runs very frequently | Runs occasionally |
Speed | Slowest | Fastest | Medium speed |
Affects | Multiprogramming level | CPU efficiency | RAM usage |
Key Points to Remember
Long-Term Scheduler → Decides which jobs enter execution
Short-Term Scheduler → Decides which job gets CPU time
Medium-Term Scheduler → Decides which jobs to swap (suspend/resume)
Would you like examples of scheduling algorithms like FCFS, Round Robin, or Priority Scheduling?