Question;

Paper Format: Number of pages: Type of work: Type of paper: Sources needed
APA 2 Double spaced Writing from scratch Essay 1
Subject   Computer Science Topic    Memory management = Least Recently Used (LRU)
Academic Level : Bachelor
Paper details

introduction (on one page)
advantage and disadvantage (the second page)

Answer;

Least Recently Used

Least Recently Used is a memory algorithm where the page to be substituted is least recently used based on the locality of reference. LRU is used in operating systems that utilise paging in management of memory, therefore, there is a need for page replacement algorithm which is a prerequisite for deciding which pages are to be replaced when new pages are needed. Whenever there is unavailability of a newly referred page in memory, page fault occurs and in response, the operating system replaces it with a newly needed page. There are several page replacement algorithms and each has a different approach in deciding which page to replace, however, regardless of the difference, the all page replacement algorithms seek to reduce number of page faults. A good page replacement algorithm is that which is based on the fact that heavily used pages are bound to be heavily used and on the contrary least used pages are bound to be least recently used. In LRU, the least recently used page over the longest period of time is thrown out as it increases vulnerability to page fault.

The implementation of an LRU calls for the use of special hardware which is equipped with a 64-bit counter, C, which is by design increased after each instruction. Moreover, each page table entry needs to have a field large enough to hold the counter and following each memory position, the current value of C is kept in the page table entry. In the case of a page fault, the OS evaluates all the pages to determine the least recently used. Another way to implement the LRU is through maintaining a correlated list of all pages in memory.

Advantages and Disadvantages

Advantages of the Least Recently Used

According to Shastri,Sharma,& Mansotra, (2016) least recently used memory page replacement algorithm does not suffer from Belady’s anomaly. In using first-in-first-out (FIFO) page replacement algorithm, there is the occurrence of Belady’s anomaly a phenomenon in which an increase in the number of page frames translates to an increase in the number of page faults for certain memory access patterns.  Another advantage of LRU is that it is relatively easy to implement as it is not very complex, relies on simple data structures and facilitates ease in page replacement. Least Recently Used page algorithms also facilitate optimal page replacement which has the least rate of occurrence of page faults which if too much affects the memory capacity.

Disadvantages of the Least Recently Used

Although the Least Recently Used page algorithms also facilitate optimal page replacement the process can be time-consuming. Another disadvantage is that error detection is difficult compared to using first-in-first-out (FIFO) page replacement algorithms. Also LRUs have limited applicability especially as not operating systems can implement the algorithm. LRUs are also very expensive to operate and call for technical expertise in their usage further adding to their operational costs as skilled manpower is often expensive to acquire and maintain.  LRU also suffers from difficulties in its basic form and the problem is that there are inconsistencies in page accesses, that is a page can easily and heavily be accessed for a second and remain unavailable for up to the next 10 seconds. In addition, Least Recently Used page algorithms are affected by the need for hardware support and that paging significantly slows down memory access because of large page sizes.

Did you know that effective analysis of concepts requires professionalism in handling academic research Papers? Do no compromise on your grade choose professional Research writers at elitetutorslab.com