0
$\begingroup$

This is rather simple conceptual question. I can guess the answer, but no text explicitly discuss thrashing in the context of different page replacement algorithm. So I want to take your confirmation for my guessings.

The definition of the thrashing is[1]:

In computer science, thrashing occurs when a computer's virtual memory resources are overused, leading to a constant state of paging and page faults, inhibiting most application-level processing

My guessings about which page replacement algorithms may cause thrashing:

  1. Least Recently Used (LRU) page replacement algorithm[2]: I believe LRU can lead to thrashing. This may happen when pages are accessed in the order 12341234... and number of frames available is 3. In this case every page access results in page fault, leading to page movements and hence causes thrashing.

  2. Most Recently Used (MRU) page replacement algorithm: causes thrashing for reasons similar to LRU.

  3. Least Frequently Used (LFU) page replacement algorithm: causes thrashing for reasons similar to LRU. (I feel LFU can behave like FIFO in certain sequences of page accesses and as FIFO can cause thrashing, LRU can also cause thrashing.)

  4. First In First Out (FIFO) page replacement: causes thrashing for reasons similar to LRU.

  5. Optimal page replacement: I believe this is the only page replacement algorithm which does not cause thrashing.

I am write with these above five guesses?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.