DEV Community

Cover image for Thrashing | Operating System - M05 P16
Rahul Mishra
Rahul Mishra

Posted on • Originally published at programmingport.hashnode.dev

Thrashing | Operating System - M05 P16

This is a multipart blog article series, and in this series I am going to explain you the concepts of operating system. This article series is divided into multiple modules and this is the fifth module which consists of 26 articles.

In this article we will see that what is thrashing? Why it is used and what are the problems thrashing has and also how can be solve those problems.

Thrashing

  • We divide process into multiple pages and load them in RAM. Our main focus is to increase degree of multiprogramming so CPU utilization can also increase.
  • One way to do this is we can load one page of every process in RAM so degree of multiprogramming would be highest.
  • But there is a problem with this approach that suppose CPU request a page from P1 process which is not present in RAM than it will be termed as page fault and there could be a worst case scenario that RAM is full with different pages of different processes but CPU call a page which is not present in RAM.
  • In this scenario to recover from page fault a large amount of time is required, and during that time CUP utilization will also decrease.

Thrashing-300x236.png

  • When the system is recovering from page fault and CPU utilization is less that is known as thrashing.
  • We can remove thrashing when we use long term scheduler.

So this was all about thrashing. Hope you liked it and learned something new from it.

If you have any doubt, question, quires related to this article or just want to share something with me, than please feel free to contact me.

πŸ“± Contact Me

Twitter
LinkedIn
Telegram
Instagram

πŸ“§ Write a mail

rahulmishra102000@gmail.com

πŸš€ Other links

GitHub
HackerRank

Top comments (0)