Operating Systems chapters
  1. 01OS Structures & System Calls
  2. 02Process & Thread Management
  3. 03CPU Scheduling Algorithms
  4. 04Process Synchronization & Deadlocks
  5. 05Memory Management & Virtual Memory

Chapter 4 · OS

Process Synchronization & Deadlocks

6 topics in 2 parts

Key ideas

NEW Admitted READY Scheduler Dispatch Interrupt / Time Slice RUNNING Exit TERMINATED WAITING / I/O
Process Synchronization & Deadlocks
Kernel DimensionUser Space PerspectiveKernel Space Perspective
Privilege LevelRing 3 (Restricted instruction set)Ring 0 (Full hardware & MMU access)
Context Switch CostZero (stays in thread context)High (TLB flush, register save to PCB/trapframe)
Memory IsolationIsolated Virtual Address SpaceDirect access to physical DRAM & page tables
Failure ImpactProcess segmentation fault (isolated termination)Kernel panic / BSOD (system crash)

All 6 topics in Process Synchronization & Deadlocks

  1. Synchronization

    • Race Conditions & Critical Section
    • Peterson Solution & Mutex
    • Counting vs Binary Semaphores
    • Classical IPC Problems
  2. Deadlocks

    • Deadlock & 4 Coffman Conditions
    • Banker's Algorithm