Chapter 4 · OS
Process Synchronization & Deadlocks
6 topics in 2 parts
Key ideas
| Kernel Dimension | User Space Perspective | Kernel Space Perspective |
|---|---|---|
| Privilege Level | Ring 3 (Restricted instruction set) | Ring 0 (Full hardware & MMU access) |
| Context Switch Cost | Zero (stays in thread context) | High (TLB flush, register save to PCB/trapframe) |
| Memory Isolation | Isolated Virtual Address Space | Direct access to physical DRAM & page tables |
| Failure Impact | Process segmentation fault (isolated termination) | Kernel panic / BSOD (system crash) |
All 6 topics in Process Synchronization & Deadlocks
Synchronization
- Race Conditions & Critical Section
- Peterson Solution & Mutex
- Counting vs Binary Semaphores
- Classical IPC Problems
Deadlocks
- Deadlock & 4 Coffman Conditions
- Banker's Algorithm