CPU Scheduling

Julie Ohยท2025๋…„ 7์›” 29์ผ

Operating system

๋ชฉ๋ก ๋ณด๊ธฐ
9/14

๐Ÿ”„ I/O-Bound vs CPU-Bound Processes

๐Ÿงฉ Process Types

  • I/O-bound process: Spends more time performing I/O operations than computations(frequent I/O bursts)
  • CPU-bound process: Spends more time performing computations with minimal I/O(frequent CPU busrts)

    Most processes alternate between running and blocked states

๐Ÿง  Process Scheduling
OS determines the priority of each process and stores it in Process Control Block(PCB)

  • I/O bound process is given higher priority to keep I/O devices busy and reduce system idle time.
  • However, checking every PCB to find the highest-priority process can be inefficient.

๐Ÿงท Scheduling Queues
To manage process flow, the OS maintains several queues:

  • Ready queue: processes waiting to be assigned to the CPU
  • Waiting queue: processes waiting for I/O operations to complete(blocked state)

โš–๏ธ CPU Scheduling Types
๐Ÿƒโ€โ™‚๏ธ Preemptive Scheduling:

  • OS can interrupt and reassign the CPU from a running process to another
  • Increase responsiveness but introduces overhead due to frequent context switching

๐Ÿง˜ Non-Preemptive Scheduling: A running process keeps the CPU until it completes, becomes Blocked, or Ready

0๊ฐœ์˜ ๋Œ“๊ธ€