Explain lru approximation page replacement, Operating System

Assignment Help:

LRU approximation page replacement

In this we are able to use the reference bit associated with the page entry to choose a page to be removed. The various algorithms used for the implementation is discussed below.

a. Second chance Algorithm

When a page is selected the reference bit is checked to see whether it has been referenced before. If that is the case afterward it is given a second chance. The page is moved as of head to tail and its reference bit is made 0. If it hasn't been referenced then it is removed.

Example Consider 1,2,3,4,3,5,6. Now 1, 2, 3 are entered in to memory and when 4 comes 1 is removed. While 5 come 2 is removed. While 6 come 4 is removed instead of 3 as 3 has been referenced in between.

b. Enhanced Second chance algorithm

In this a modify bit is as well used. Now if the ordered pair of reference and modify is

(0,0) neither recently used nor modified - the best page to replace.

(1,1) both referenced and modified- the worst to  replace

(1,0) referenced but not modified

(0,1) not recently used but modified.

This algorithm is utilized in the Macintosh virtual memory management scheme.

c. Additional Reference bits algorithm

Here we keep an 8-bit byte for every page in memory. At standard intervals the reference bit is shifted by the OS. If a shift register contains 00000000 then the page hasn't been used for the last 8 time periods. A page with a history 11000000 is more recently used than 01000000. The no of bits are able to be varied accordingly to the needs of the OS.


Related Discussions:- Explain lru approximation page replacement

Explain the booting process for a windows xp system, Q. Explain the booting...

Q. Explain the booting process for a Windows XP system? Answer: (1) Since the hardware powers on the BIOS begins executing From ROMand loads as well as executes the bootstrap

Plot a function for value of heights, The performance of a file system depe...

The performance of a file system depends upon the cache hit rate (fraction of blocks found in the cache). If it takes 1 msec to satisfy a request from the cache, but 40 msec to sat

Rf, whta is an operating system ? what sorts services are provided by an op...

whta is an operating system ? what sorts services are provided by an operating system ?

What is the main advantage of multiprogramming, What is the main advantage ...

What is the main advantage of multiprogramming? Multiprogramming makes efficient use of the CPU by overlapping the demands for the CPU and its I/O devices from various users. I

Perform alpha-beta pruning on the following tree, Perform alpha-beta prunin...

Perform alpha-beta pruning on the following tree. Put an "X" over each node that is pruned. Put the final value next to all other nodes. Indicate which action MAX should take: to B

How can the deadlock be prevented-safe state, How can the deadlock be preve...

How can the deadlock be prevented-Safe State Safe state : A state is safe if the system is able to allocate resources to each process in some order and still avoid deadlock.

Suggest a scheme for implementing this policy, Q. Consider a calculating e...

Q. Consider a calculating environment where a process is given the privilege of accessing object only n times. Suggest a scheme for implementing this policy. Answer: Add an i

Illustrate the handshaking protocol, Q. The instance of handshaking used 2...

Q. The instance of handshaking used 2 bits: a busy bit as well as a command-ready bit. Is it probable to implement this handshaking with only 1 bit? If it is illustrate the protoc

Role of discovery and prototype, Discuss the role of discovery and developm...

Discuss the role of discovery and developmental prototypes in defining requirements for this project.Are throwaway prototypes appropriate, or should the project team quickly gather

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd