LearnViz CompSci
Home / Learn / Operating Systems / Thrashing

Intermediate Topic 32 of 51 Operating Systems

Thrashing

Excess paging that cripples performance.

How it works

Thrashing occurs when a system spends more time swapping pages in and out than executing useful work, because the combined working sets of active processes exceed physical memory. Each process faults constantly and evicts pages others need, CPU utilization drops, and a naive scheduler may even start more processes, worsening it. The working-set model and page-fault frequency control address it.

Step-by-step walkthrough

  1. Too many processes share too little memory.
  2. Each constantly faults and evicts pages the others need.
  3. The disk is busy servicing faults.
  4. CPU utilization collapses as processes wait.
  5. Reducing the number of running processes or adding RAM restores performance.

Where it is used

Overloaded servers, machines with too many applications or with memory-hungry jobs experience thrashing, seen as high disk activity and an unresponsive system.

Common pitfall

Adding processes or lowering priorities does not fix it; reducing the multiprogramming level, adding RAM, tuning working sets or limiting memory per process does. Local replacement limits damage between processes. Monitoring swap in and out rates and page-fault frequency gives early warning, and containers should have memory limits.

Where it fits in the course

Thrashing is topic 32 of 51 in Operating Systems, rated Intermediate. It follows Page Replacement Algorithms. The next topic is Memory Allocation.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Operating Systems quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is Thrashing?
Excess paging that cripples performance. It belongs to Operating Systems and is an intermediate-level topic.
Where do people use Thrashing?
Overloaded servers, machines with too many applications or with memory-hungry jobs experience thrashing, seen as high disk activity and an unresponsive system.
What is the most common mistake with Thrashing?
Adding processes or lowering priorities does not fix it; reducing the multiprogramming level, adding RAM, tuning working sets or limiting memory per process does.
What should I learn before this topic?
Start with Page Replacement Algorithms, the topic just before it in Operating Systems.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Operating Systems quiz.
Is Thrashing hard to learn?
It is an Intermediate topic. Be comfortable with the Beginner topics in this area first, then read the common pitfall carefully, since it is where most mistakes happen.
How long does it take to learn Thrashing?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Thrashing?
Page Replacement Algorithms, Memory Allocation, Page Faults are closely connected. The full list is in the related topics section of this page.
What should I study after Thrashing?
Continue with Memory Allocation, the next topic in Operating Systems.

Related topics