Back to the 2019 paper

Module 2: Processes & Scheduling

201914m

What is process control block? Explain it.

Discuss the difference among short-term, medium-term and long-term scheduling.

Worked SolutionAI Assisted

(a) Process Control Block (PCB)

PCB is data structure per process maintained by kernel. Contents: Process ID, State (new/ready/running/waiting/terminated), Program Counter, CPU registers, Scheduling info (priority, queue pointers), Memory info (page tables, limits), I/O status (open files, devices), Accounting (CPU time, limits). Kernel uses PCB for context switch.

(b) Schedulers

  • Long-term (Job scheduler): selects processes from job pool on disk to ready queue in memory. Controls degree of multiprogramming. Infrequent, slow. Absent in time-sharing.
  • Medium-term: swapping — suspends/resumes processes to balance load, moves between memory/disk.
  • Short-term (CPU scheduler): selects from ready queue to CPU frequently (ms). Must be fast; dispatcher then context-switches.
    Tradeoff: LT controls admission, MT handles memory pressure, ST ensures responsiveness.

Similar questions

AI LearningWeb Platform

Coursify — Personal AI Course Generator

Struggling with a difficult subject or concept? Turn any engineering topic into a structured course with interactive lessons, quizzes, and research-backed explanations.