Working Sets and Thrashing

Measure distinct active pages over a window and explain why adding runnable work can reduce total useful progress.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. A window defines the memory currently in use
  2. Evictions can turn a switch into recurring I/O

A window defines the memory currently in use

A working-set estimate can count distinct pages referenced over the last \(r\) memory accesses or a chosen time interval. A task scanning its active data may repeatedly need eight pages, then enter a phase with a different set. A large estimate relative to available frames signals pressure but depends on the observation window and phases.

Evictions can turn a switch into recurring I/O

With room for twelve different pages, two tasks repeatedly using disjoint sets of eight can cause each other’s active pages to be evicted. Resuming either then induces faults that displace pages the other soon needs. Reducing active concurrency or changing locality can improve useful work under this model. Page replacement selects the frames under pressure. Scheduler queues decide which working sets get interleaved.[1]

References

  1. Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, Operating Systems: Three Easy Pieces ↩