When the system is overcommitted (more process demand than RAM), it spends more time swapping pages in/out than doing useful work.
Thrashing is a state where the OS spends most of its time handling page faults and swapping, leaving little CPU time for actual process execution.
- System runs many processes, total memory demand > RAM
- Page fault rate increases dramatically
- OS responds by swapping pages out to disk
- Pages immediately needed again → more page faults
- CPU utilization drops (most time spent in page fault handling)
- Caused by overcommitment (too many active processes)
- CPU utilization drops to near zero
- System becomes unresponsive
- Fix: reduce degree of multiprogramming (fewer processes)
- Built from: Virtual Memory, Swap Space
- Builds into: Demand Paging
- Related: Page Fault, Paging
- Contrasts with: Normal Execution (working vs thrashing)
- Can cascade: thrashing in one process causes others to thrash too
- Monitor page fault rate to detect early
- Fix: suspend/kill processes, or add more RAM