Operating Systems
Thrashing
Definition
Thrashing is a condition in which a computer's virtual memory subsystem is in a constant state of paging, i.e., exchanging data in memory for data on disk. This results in the computer's performance degrading or collapsing.
Why It Matters
Thrashing is a worst-case scenario for virtual memory. It indicates that the system does not have enough physical RAM for the workload it is trying to handle, and the OS is spending more time managing memory than executing applications.
Contextual Example
If you try to open too many large applications on a computer with very little RAM, you might see the hard drive activity light stay constantly on and the computer become extremely slow and unresponsive. This is thrashing.
Common Misunderstandings
- The only real solution to thrashing is to add more physical RAM or to reduce the memory usage by closing applications.
- It is a symptom of severe memory pressure.