LearnYourBasics

Spread your knowledge

Process Queues or Scheduling Queues

Process Queues or Scheduler queues are data structures the OS uses to organize processes based on their status, making it easier to pick the right one for execution or resource allocation. They act like waiting lines at different stages: some hold new jobs, others ready-to-run processes, and more for blocked ones. Each queue links to the Process Control Blocks (PCBs) of its processes, and the schedulers (long-term, short-term, medium-term) move things between them during state changes. This setup ensures efficient flow without chaos, with queues often implemented as linked lists or arrays for quick inserts and removals. Common types include job, ready, device, and sometimes intermediate or terminated queues, varying by OS but following the core model.

  • Job Queue (or Input Queue): This holds all newly submitted processes or jobs that enter the system, stored on disk until the long-term scheduler decides to admit them. It’s the starting point for everything—think of it as the entry gate where jobs wait before getting memory or attention. The queue can grow large in batch systems, and the scheduler picks based on mix (CPU vs. I/O bound) to keep the system balanced, preventing overload by limiting admissions.

  • Ready Queue: Contains processes fully loaded in memory and waiting for CPU time, managed by the short-term scheduler. It’s usually at the heart of multitasking, holding PCBs of ready-state processes in a queue structure. The CPU scheduler scans this to select the next runner, often using algorithms like round-robin for fairness; if multiple CPUs exist, there might be one per core.

  • Device Queue (or I/O Queue/Waiting Queue): Dedicated to processes blocked waiting for I/O devices like disks, printers, or networks—each device has its own queue to avoid bottlenecks. When a process requests I/O, it moves here from running; once done (via interrupt), it shifts back to ready. This keeps the CPU free for others, with the OS handling queuing policies per device to optimize throughput.

  • Intermediate Queue (or Swap Queue): Used by the medium-term scheduler for processes swapped to disk during low memory, holding suspended ready or waiting processes. It’s temporary storage to reduce active load, and processes return to ready or waiting queues when space opens up. Not always separate but often part of extended models in virtual memory systems.

Scroll to Top