• Home
  • University of the People
  • Data Structures (proctored course) CS 3303
  • Data Structures (proctored course) CS 3303 - Page Replacement Algorithms

Data Structures (proctored course) CS 3303 - Page Replacement Algorithms

Questions: Option 1 on the menu (FIFO) 1. Describe the heuristic used in menu option 1 As the name implies the algorithm picks the page which is first brought into the main memory among the wide range of various pages as the replacement one. The pages are entered to the tail of the queue which is a first in first out (queue) data structure. 2. Under what condition will this heuristic not be efficient? In this context an efficient buffer, is one that has the highest potential to provide a block of data out of the buffer and not have to go back to disk. In your answer consider whether this heuristic is the most effective approach is the value 5 is used more frequently than any other value. In the event of page faults, the page at the FIFO queue's head will be replaced. The more the page faults, the less the performance. This algorithm is not efficient since the page at the head of the queue might be used very often, in this case 5. Removing the value 5 will lead to an extra page fault. 3. Describe a situation where this heuristic would be efficient. For a hint think about read-ahead capabilities. This heuristic would be efficient in congestion control and resource allocation in software-based routers that ensures that the first data packets that arrives at the router is the first to be transmitted. (Medhi & Ramasamy, 2018) Questions: Option 2 on the menu (LRU) 1. Describe the heuristic used in menu option 2. Here, the pages which are used intensely in the last couple of instructions are thought to be used heavily again or the pages which are not used for a long time are thought to be most likely not used at all. In the event of a page fault, it is best to replace the page which is not utilized recently among the wide range of various pages. The implementation can be done using the linked list with the page which is most recently used at the head and the one which is least recently used at the tail of the linked list. The pages are only replaced from the tail of the linked list. Since the algorithm consistently moves the recently used pages to the head of the list, the list needs to be changed after each page reference. (Subramaniyam, 2017) 2. Provide an example or define the characteristics of a situation where this heuristic would be efficient. In this context, efficient, This study source was downloaded by 100000812556430 from CourseHero.com on 12-03-2021 11:20:21 GMT -06:00 https://www.coursehero.com/file/98435377/CS-3303-Discussion-Assignment-Unit-7docx/ means a situation where reguired the data can be supplied from the buffer and not from an external source such as the disk. A hint is to Iook at what data occurs most frequently. In this case it is the value 5. A Least Recently Used (LRU) acts as a cache that keeps and organizes items in order of use. That is, from most-recently used to