Thrashing - Causes of Thrashing and How to Prevent Thrashing in Operating System


We can say that when page fault ratio decreases below level, it is called thrashing. There are many causes of thrashing and there are several techniques to prevent thrashing

Meaning of Thrashing


If the process does not have number of frames it needs to support pages in active use, it will quickly page-fault. The high paging activity is called thrashing.

In other words we can say that when page fault ratio decreases below level, it is called thrashing.

Causes of Thrashing


It result in severe performance problems.

1) If CPU utilization is too low then we increase the degree of multiprogramming by introducing a new process to the system. A global page replacement algorithm is used. The CPU scheduler sees the decreasing CPU utilization and increases the degree of multiprogramming.

2) CPU utilization is plotted against the degree of multiprogramming.

3) As the degree of multiprogramming increases, CPU utilization also increases.

4) If the degree of multiprogramming is increased further, thrashing sets in and CPU utilization drops sharply.

5) So, at this point, to increase CPU utilization and to stop thrashing, we must decrease the degree of multiprogramming.

To limit the effect of thrashing


To limit the effect of thrashing we can use local replacement algorithm. With Local replacement algorithm, if the process starts thrashing, it cannot steal frames from another process and cause the latter to thrash as well. The problem is not entirely solved.

Thus the effective access time will increase even for the process that is not thrashing

How to prevent Thrashing


We must provide a process with as many frames as it needs. Several techniques are used.

The Working of Set Model (Strategy) It starts by looking at how many frames a process is actually using. This defines the locality model.

Locality Model It states that as a process executes, it moves from locality to locality.

A locality is a set of pages that are actively used together.

A program is generally composed of several different localities which overlap.


Related Articles

How to prevent acne scars?

This article explains various measures which keep acne under control. This decreases inflammation and consequently chances of formation of acne scars too decreases. Actions like not picking at skin, proper hydration, using sunscreen lotions, proper skin care regime etc prevent formation of acne scars.

How To Control Anger?

Have you ever been angry and later on felt sad for being angry on some one or something? Do you want to control your anger ? Is anger good or not ? The following article will discuss about anger and measures through which we can control our anger.

How to remove blood stains from delicate fabrics and specific surfaces?

This article explains various tips and methods to get rid of blood stains from delicate fabrics like silk, satin, woolen, linen etc and from specific surfaces like concrete, hardwood floors, mattress, quilt, leather, carpets etc. These methods used can make them free from blood stains.

Top 9 tips and exercises to sharpen the mind and boost brainpower

The brain needs constant stimulation to remain alert and active. Practice good habits that can sharpen your memory and help you stay alert and on top of your game at all times. Simple lifestyle changes that involve the number of you sleep or what you eat or how you relax can play a great role in how your brain functions. Find out what you need to do right, to get the best out of your grey cells.

How to become a pathologist with top hospitals in India

Are you looking for a career in medicine as a clinical pathologist? Need to know how to start a pathology lab? This article provides complete information on the different specializations in pathology and a career guide on starting a career as a pathologist. You will also get a general idea on the approximate costs of setting up your own path lab.

More articles: How to

Comments



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: