What is Thrashing in OS? If this page fault and then swapping happening very frequently at higher rate, then operating system has to spend more time to swap these pages. This state is called thrashing. Because of this, CPU utilization is going to be reduced.
Effect of Thrashing
Whenever thrashing starts, operating system tries to apply either Global page replacement Algorithm or Local page replacement algorithm.
Global Page Replacement
Since global page replacement can access to bring any page, it tries to bring more pages whenever thrashing found. But what actually will happen is, due to this, no process gets enough frames and by result thrashing will be increase more and more. So global page replacement algorithm is not suitable when thrashing happens.
Local Page Replacement
Unlike global page replacement algorithm, local page replacement will select pages which only belongs to that process. So there is a chance to reduce the thrashing. But it is proven that there are many disadvantages if we use local page replacement. So local page replacement is just alternative than global page replacement in thrashing scenario.
Techniques to Handle Thrashing
We already seen Local replacement is better than Global replacement to avoid thrashing. But it also has disadvantages and not suggestable. Some more techniques are
Working Set Model
This model is based on locality. What locality is saying, the page used recently can be used again and also the pages which are nearby this page will also be used. Working set means set of pages in the most recent D time. The page which completed its D amount of time in working set automatically dropped from it. So accuracy of working set depends on D we have chosen. This working set model avoid thrashing while keeping the degree of multiprogramming as high as possible.
Page Fault Frequency
Page Fault Frequency
It is some direct approach than working set model. When thrashing occurring we know that it has few number of frames. And if it is not thrashing that means it has too many frames. Based on this property we assign an upper and lower bound for the desired page fault rate. According to page fault rate we allocate or remove pages. If the page fault rate become less than the lower limit, frames can be removed from the process. Similarly, if the page fault rate become more than the upper limit, more number of frames can be allocated to the process. And if no frames available due to high page fault rate, we will just suspend the processes and will restart them again when frames available.
#GateComputerScience
#UGCNETComputerScience
#NetComputerScience
#GATEOperatingSystem
#NETOperatingSystem
#OperatingSystemVideos
#OperatingSystemVideosInHindi
#OperatingSystemTutorials
#OperatingSystemTutorialsInHindi
#OperatingSystemLectures
#OperatingSystemLectureInHindi
#OperatingSystemInHindi
UGC NET computer Science operating system | UGC NET Operating System Lectures | GATE computer Science operating system | GATE Operating System Lectures
6.27- What Is Effective Memory Access Time In Memory Management In Operating System In Hindi
6.28- FIFO- Page Replacement Algorithm In Memory Management In Operating System In Hindi By Deepak
6.29- Belady's Anomaly In FIFO Page Replacement In Memory Management Hindi | OS Lectures By Deepak
6.30- Optimal Page Replacement Algorithm In Operating System In Hindi | OS Lectures By Deepak Garg
6.31- LRU Page Replacement Algorithm In Operating System In Hindi | OS Lectures By Deepak Garg
Thrashing- Working Set Model In Memory Management In Operating System In Hindi | BTech-BE-MCA

0 Comments