0% found this document useful (0 votes)
27 views1 page

Lec 30 Notes

The document discusses thrashing which occurs when a process does not have enough memory frames to hold its active pages, causing it to continuously page fault and replace pages. Techniques like the working set model and monitoring page fault frequency can help control thrashing by allocating more frames if faults are too high or removing frames if faults are too low.

Uploaded by

ranaaditi02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

Lec 30 Notes

The document discusses thrashing which occurs when a process does not have enough memory frames to hold its active pages, causing it to continuously page fault and replace pages. Techniques like the working set model and monitoring page fault frequency can help control thrashing by allocating more frames if faults are too high or removing frames if faults are too low.

Uploaded by

ranaaditi02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

LEC-30: Thrashing

1. Thrashing
a. If the process doesn’t have the number of frames it needs to support pages in active use, it will
quickly page-fault. At this point, it must replace some page. However, since all its pages are in active
use, it must replace a page that will be needed again right away. Consequently, it quickly faults
again, and again, and again, replacing pages that it must bring back in immediately.
b. This high paging activity is called Thrashing.
c. A system is Thrashing when it spends more time servicing the page faults than executing
processes.

p
el
eH
d. Technique to Handle Thrashing
i. Working set model
1. This model is based on the concept of the Locality Model.
2. The basic principle states that if we allocate enough frames to a process to
od

accommodate its current locality, it will only fault whenever it moves to some
new locality. But if the allocated frames are lesser than the size of the current
locality, the process is bound to thrash.
ii. Page Fault frequency
1. Thrashing has a high page-fault rate.
2. We want to control the page-fault rate.
3. When it is too high, the process needs more frames. Conversely, if the page-fault
C

rate is too low, then the process may have too many frames.
4. We establish upper and lower bounds on the desired page fault rate.
5. If pf-rate exceeds the upper limit, allocate the process another frame, if pf-rate
fails falls below the lower limit, remove a frame from the process.
6. By controlling pf-rate, thrashing can be prevented.

You might also like