Lru implementation details, Operating System

Now, let us discuss two related algorithms for deciding which pages to evict. The clock algorithm is one of the most popular choices. It works by keeping frames in a circular structure. (Note that this circle may be very large: a 32-bit machine with 4k pages can have up to 220  1 million frames.) When a page fault occurs, it checks the reference bit of the next frame. If that bit is zero, it evicts that page and sets its bit to 1; if the reference bit is 1, the algorithm sets the bit to 0 and advances the pointer to next frame. 

An implementation which is often used in real operating systems is a segmented queue. This type of algorithm divides all existing pages into two sets of pages. The most-active one-third of all pages use a clock algorithm. After that, pages that are evicted out of the clock are moved to a "uncommon" linked list, in which we use exact LRU. This way, we approximate LRU for the frequently-referenced pages (1/3 of the page frames - fast clock algorithm), and at the same time use exact LRU on the infrequently accessed pages (2/3 of all page frames). Since the pages in the uncommon list are not accessed very frequently, it is okay if their accesses are a little slower due to some pointer manipulation.

Posted Date: 3/12/2013 6:01:10 AM | Location : United States

Related Discussions:- Lru implementation details, Assignment Help, Ask Question on Lru implementation details, Get Answer, Expert's Help, Lru implementation details Discussions

Write discussion on Lru implementation details
Your posts are moderated
Related Questions
Q. Name two differences between logical and physical addresses? Answer: A logical address doesn't refer to an actual existing address rather it refers to an abstract address in

Q. What is Multiprogramming? Multiprogramming When two or more programs are in memory at the same instance, sharing the processor is referred to multiprogramming opera

Q. Show that a few schedules are possible under the two-phase locking protocol however not possible under the timestamp protocol and vice versa. Answer: A schedule that is auth

Processes have valid and invalid entries on their page tables. The valid entries all point to some where "real" (e.g. a physical page, or some portion of disk in case of non-reside

Explain the Peterson's solution for the critical section problem? In Peterson's solution two variables a) flag and b) turn are used as shared variables. If the both shared vari

Acyclic Graph Directories In this kind of directory structure the shared directories or files can exist in the file system in two or more places at once. A tree structure excl

demonstrate ergonomics

MEMORY MANAGEMENT USING BIT MAPS   In this memory is separated into different allocation units each of some particular size(a few bites).consider every space of size 4k. A

Define the WindowsNT WindowsNT provides a two-level approach to resource management: process and thread. The process is the uppermost level and contains most of the application

List ways to share files among directories in operating systems. a. Copy file from one account into another. b. Link directory entry of "copied" file to directory entry of o