Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
What are Scheduling Queues?
Scheduling queues are data structures used by the operating system to organize processes in different states. The OS maintains several types of queues to efficiently manage process scheduling and resource allocation.
Types of Scheduling Queues
The operating system uses three main types of scheduling queues −
Job Queue − Contains all processes entering the system
Ready Queue − Stores processes in the ready state waiting for CPU allocation
Device Queues − Hold processes waiting for specific I/O devices
Process Flow Through Queues
A new process is first placed in the ready queue where it waits for CPU allocation. Once assigned to the CPU, one of these events may occur −
The process issues an I/O request and is placed in the appropriate device queue
The process creates a child process and waits for its termination
The process is interrupted and returned to the ready queue
In the first two cases, the process eventually returns to the ready state. This cycle continues until the process terminates and is removed from all queues.
Types of Schedulers
The operating system uses three types of schedulers to manage these queues −
Long-Term Scheduler (Job Scheduler)
The long-term scheduler controls which processes are admitted from the job queue into the ready queue. It runs less frequently and manages the degree of multiprogramming by maintaining an optimal balance between process creation and completion rates.
Short-Term Scheduler (CPU Scheduler)
The short-term scheduler selects which process from the ready queue should be executed next. It runs very frequently (milliseconds) and aims to maximize CPU utilization and system throughput.
Medium-Term Scheduler
The medium-term scheduler handles swapping by temporarily removing processes from memory to reduce the degree of multiprogramming. These processes can later be swapped back into memory to continue execution.
Comparison of Schedulers
| Scheduler | Frequency | Function | Queue Management |
|---|---|---|---|
| Long-term | Seconds/Minutes | Admission control | Job ? Ready |
| Short-term | Milliseconds |
