Virtual Memory Thrashing


<details><summary>

Since lack of free frame(low RAM), process > physical memory then page fault rate will be very high</summary>

![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F42e6be14-9a28-4c41-9344-709852b69ee1%2Ftemp.jpg?table=block&id=7f7afe8b-044d-458c-af60-912fb3450ba1&cache=v2)
</details>

→ os use all time to swapping
Solution Method two - working set, ppf
> 
### 1. Working set,
locality set + others for continity = working set
***Working Set***: set of actively used pages
`math: \Delta`  : working-set window : fixed number of page references (ex. 10,000 instruction)
> ex. WS(t1) = {1,2,3,4,5} ,한꺼번에 반납, 대여
$$\Sigma WSSi = total demand frames$$
OS monitor direct D, and if D > total number of frames in physical them swap process
***then how to direct?: ***like sampled lru use ***reference bit*** and ***interval time***
increasing bit will make performance better 2^bit per interrupt

### 2. Page-fault Frequency Allocation
Window's method
directly measure and control page-fault rate
establish acceptable page fault frequency
- too high rate → increase number of frames
- too low rate → decrease number of frames