Day 01 Part 17(A)- Schedulers in operating system long term, short term and midium term schedulers
Contents
- 0.1 Schedulers in Operating System (OS) – Long-Term, Short-Term & Medium-Term Schedulers
- 0.2 Long-Term Scheduler (Job Scheduler)
- 0.3 Short-Term Scheduler (CPU Scheduler)
- 0.4 Comparison of Schedulers
- 0.5 Key Points to Remember
- 0.6 Day 01 Part 17(A)- Schedulers in operating system long term, short term and midium term schedulers.
- 0.7 Operating System Concepts (7th Edition) 600 dpi
- 1 Schedulers in Operating System
- 2 1. Long-Term Scheduler (Job Scheduler)
- 3 2. Short-Term Scheduler (CPU Scheduler)
- 4 3. Medium-Term Scheduler (Swapper)
- 5 Comparison Table
- 6 Memory Tip:
- 7 Summary:
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?
Day 01 Part 17(A)- Schedulers in operating system long term, short term and midium term schedulers.
Operating System Concepts (7th Edition) 600 dpi
Here’s a simple, clear explanation of Schedulers in Operating System (Day 01 Part 17(A)) — covering Long-term, Short-term, and Medium-term Schedulers — useful for beginners, competitive exams, and CS students.
Schedulers in Operating System
Schedulers are components of the OS that manage process execution by selecting which process will run when and where.
There are 3 types:
1. Long-Term Scheduler (Job Scheduler)
Purpose:
Controls the admission of processes into the system (from job pool to ready queue).
Feature | Details |
---|---|
Selects | Which jobs to admit |
Controls | Degree of multiprogramming |
Frequency | Runs less frequently |
Input Queue | Job Pool → Ready Queue |
Involved in | Batch systems mostly |
2. Short-Term Scheduler (CPU Scheduler)
Purpose:
Selects one process from the ready queue and assigns it to the CPU.
Feature | Details |
---|---|
Selects | Which process runs next |
Controls | CPU execution |
Frequency | Runs very frequently (ms level) |
Input Queue | Ready Queue → CPU |
Works in | All systems (batch, time-sharing) |
3. Medium-Term Scheduler (Swapper)
Purpose:
Temporarily removes processes from memory to reduce load (swapping), and brings them back later.
Feature | Details |
---|---|
Selects | Which process to suspend/resume |
Controls | Memory usage |
Frequency | Runs occasionally |
Involved in | Swapping (Suspend/Resume) |
Used in | Time-sharing and multitasking OS |
Comparison Table
Scheduler Type | Controls | Frequency | Queue Movement | Key Role |
---|---|---|---|---|
Long-Term Scheduler | Degree of multiprogramming | Low (Infrequent) | Job Pool → Ready Queue | Job selection |
Short-Term Scheduler | CPU usage | High (Frequent) | Ready Queue → CPU | Process execution |
Medium-Term Scheduler | RAM usage | Medium | Memory |
Load balancing |
Memory Tip:
“Long brings in, Short runs, Medium swaps out.”
Summary:
- Long-Term: Decides who can enter the system.
- Short-Term: Decides who runs on CPU next.
- Medium-Term: Decides who stays or swaps in memory.
Would you like:
- A diagram to visualize all 3 schedulers?
- A PDF of notes for revision?
- Practice questions on this topic?
Let me know!