LRU: Least Recently Used: Whichever the process isn't used lately, will be replaced
Problem 3 (12 points) Given these sequential page accesses: 1 2 3 423412 13 1 4 and a system with...
Consider the following virtual page reference sequence: page 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3. This indicates that these particular pages need to be accessed by the computer in the order shown. Consider each of the following 4 algorithm-frame combinations: LRU with 3 frames FIFO with 3 frames LRU with 4 frames FIFO with 4 frames . For each of the 4 combinations, below, move from left to right as the virtual page numbers are...
Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1. Suppose that there are also three frames within our system. Using the FIFO replacement algorithm, what will be the final configuration of the three frames following the execution of the given reference string? A. 1, 2, 3 B. 4, 1, 2 C. 3, 1, 2 D. 4, 2, 1
Problem 6 (13 points) The page table below is for a system with 16-bit virtual as well as physical addresses and with 4,096-byte pages. The reference bit is set to 1 when the page has been referenced. Periodically, a thread zeroes out all values of the reference bit. A dash for a page frame indicates the page is not in memory. The LRll pagg-replacement algorithm is used. The numbers are given in decimal Page Frame eferepceit 14 10 13 15...
Problem 6 (13 points) The page table below is for a system with 16-bit virtual as well as physical addresses and with 4,096-byte pages. The reference bit is set to 1 when the page has been referenced. Periodically, a thread zeroes out all values of the reference bit. A dash for a page frame indicates the page is not in memory. The LRll pagg-replacement algorithm is used. The numbers are given in decimal Page Frame eferepceit 14 10 13 15...
9.3 (3 points for correct answer, 7 points for steps) Consider the following page reference string: 6, 1, 5, 5, 4, 6, 2, 6, 0 , 1, 7, 2, 3, 1, 4, 6, 7, 2, 5, 2,. Assuming demand paging with three frames, how many page faults would occur for the following replacement algorithms? • LRU replacement • FIFO replacement • Optimal replacement
Consider the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6. How many page faults would occur for the following replacement algorithms, assuming one, two, three, four, five, six, or seven frames? Remember all frames are initially empty, so your first unique pages will all cost one fault each. • LRU replacement • FIFO replacement • Optimal replacement
Consider the following page reference string for a three-frame memory: 6 3 1 5 3 4 3 2 5 4 3 4 5 1 5 3 1 6 3 1 Apply LRU, Clock and FIFO algorithms What will be the number of page faults for each replacement algorithm note that page faults at the beginning are counted?
Problem 3.4 What are the total number of page faults for programs 1 and 2? (4 points) Program structure int data[128][128]; one row is stored in four adjacent pages There are only four pages for data in a system, and the LRU page replacement algorithm is used. Program 1 for j 0; j <63; j++) for (i 0; i <65 ; i++) data[i 0; Program 2 for (i = 0; i < 65; i++) for (j = 0; j <...
Write a program that implements the FIFO, Optimal, MFU, and LRU page-replacement algorithms. Given a page-reference string, where page numbers range from 0 to 9, apply the page-reference string to each algorithm, and output the number of page faults incurred by each algorithm. Write your code so that the number of page frames in the page table can vary from 1 to 10. 1.0 Functional Requirements 1.1: Your program shall be run with the following: ./a.out Example: ./a.out datafile.txt 1.2:...
Consider the following page reference string: 1, 0, 3, 2, 6, 4, 5, 0, 1, 7, 7, 6, 4, 3, 5, 2, 1, 3, 2, 7 Assuming demand paging with three frames, how many page faults would occur for the following replacement algorithms? Show your work. (a) LRU replacement (b) FIFO replacement (c) Optimal replacement