Question

Consider the following virtual page reference sequence: page 1, 2, 3, 4, 2, 1, 5, 6,...

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 requested in sequence. Put each virtual page into one of the frames by writing its number there (initially while empty frames remain, load them from top down). When all frames are already occupied by other pages, choose the right page to displace according to the applicable algorithm (LRU or FIFO) and mark the event with an F for Fault. (Do not count a fault when loading a missing page at a time when there is a frame unoccupied, in other words on the first 3 or 4 loads.) When finished, total the number of page faults and write it in where indicated.

Submit the printout. The assignment will be graded on 8 items: the 4 final page configuration figures at the extreme right (correct or incorrect), and the 4 page fault totals written (correct or incorrect). Please work carefully.

THREE Page Frames

Least-recently-used (LRU) method:

1 2 3 4 2 1 5 6 2 1 2 3

Number of page faults for LRU/3:                     

First-in-First-out (FIFO) method:

1 2 3 4 2 1 5 6 2 1 2 3

Number of page faults for FIFO/3:                     

FOUR Page Frames

Least-recently-used (LRU) method:

1 2 3 4 2 1 5 6 2 1 2 3

Number of page faults for LRU/4:                     

First-in-First-out (FIFO) method:

1 2 3 4 2 1 5 6 2 1 2 3

Number of page faults for FIFO/4:   

0 0
Add a comment Improve this question Transcribed image text
Answer #1

THREE page frames

Least Recently used method:

1 2 3 4 2 1 5 6 2 1 2 3
1 1 1 4 4 4 5 5 5 1 1 1
2 2 2 2 2 2 6 6 6 6 3
3 3 3 1 1 1 2 2 2 2
F F F F F F F

Number of page faults for LRU/3: 7


First in First out Method:

1 2 3 4 2 1 5 6 2 1 2 3
1 1 1 4 4 4 4 6 6 6 6 3
2 2 2 2 1 1 1 2 2 2 2
3 3 3 3 5 5 5 1 1 1
F F F F F F F


Number of page faults for FIFO/3: 7

FOUR page frames

Least Recently used method:

1 2 3 4 2 1 5 6 2 1 2 3
1 1 1 1 1 1 1 1 1 1 1 1
2 2 2 2 2 2 2 2 2 2 2
3 3 3 3 5 5 5 5 5 3
4 4 4 4 6 6 6 6 6
F F F

Number of page faults for LRU/4: 3

First in First out Method:

1 2 3 4 2 1 5 6 2 1 2 3
1 1 1 1 1 1 5 5 5 5 5 3
2 2 2 2 2 2 6 6 6 6 6
3 3 3 3 3 3 2 2 2 2
4 4 4 4 4 4 1 1 1
F F F F F


Number of page faults for FIFO/4: 5

Please give thumbs up if you like it. Thanks.

Add a comment
Know the answer?
Add Answer to:
Consider the following virtual page reference sequence: page 1, 2, 3, 4, 2, 1, 5, 6,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Consider the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1,...

    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 process with 5 virtual pages, and three frames...

    Consider the following page reference string, for a process with 5 virtual pages, and three frames in memory, and fill in the tables for the LRU. B. LRU. Reference string: ABCBDEABCDA Page Page Reference Fault Total Page Faults

  • Question 7 30 pts Consider the following page reference string: {1,2,3,4,1,5,6,2,1,2,3,7,6,3} Assume that the system has...

    Question 7 30 pts Consider the following page reference string: {1,2,3,4,1,5,6,2,1,2,3,7,6,3} Assume that the system has 4 page frames allocated to these 7 pages. Follow the page placement and replacement using the following three replacement algorithms: • LRU replacement • FIFO replacement • Optimal replacement How many page faults will occur for these three algorithms? Assume that all frames are initially empty, so your first unique pages will all cost one fault each USE ENCLOSED TABLES! Show all calculations in...

  • Consider the following page reference string for a three-frame memory: 6 3 1 5 3 4...

    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?

  • Consider the following page reference using four physical frames that are initially empty. (a) (5 points)...

    Consider the following page reference using four physical frames that are initially empty. (a) (5 points) Find the page faults using LRU algorithm, where the page reference sequence: 5,2,5,1,4,5,2,0,4,2,3,1,2,1,0,0,2,4,5,1? (b) (5 points) Find the page faults using FIFO algorithm, where the page reference sequence: 5,2,1,5,1,0,3,1,2,1,4,0,5,4, 2,3,3, 4,2,1? (c) (5 points) Find the page faults using LRU algorithm, where the page reference sequence: 5, 0, 4, 4, 0, 3, 0, 4, 1, 0, 2, 0, 5, 3, 0, 1?

  • 3. Assume a virtual memory system with the following properties: • The physical memory available to...

    3. Assume a virtual memory system with the following properties: • The physical memory available to an application consists of four-page frames, with frame numbers 0, 1, 2, and 3. The application has six pages of data in its virtual address space, using page numbers 0, 1, 2, 3, 4, and 5. Build a table showing which frame is used to bring in each page for the following sequences of page references using FIFO, MIN, and LRU as page replacement...

  • Answer the following questions based on the Memory Management tasks of an Operating System. 5 Consider...

    Answer the following questions based on the Memory Management tasks of an Operating System. 5 Consider the following sequence of page references: 5, 6, 7, 6, 8, 7, 9, 5, 9, 6, 8, 9 Assuming that all frames are initially empty, indicate the contents of memory after each reference, and how many page faults are found for each of the following page replacement algorithms: First In First Out (FIFO):                                   [2 .5 M]                                               Reference String 5 6 7 6 8 7...

  • Consider the following sequence of page references 8, 5, 1, 8, 2, 5, 1, 4, 2, 3, 5, 3, 2, 8, 4. Assume that the memory h...

    Consider the following sequence of page references 8, 5, 1, 8, 2, 5, 1, 4, 2, 3, 5, 3, 2, 8, 4. Assume that the memory has 3 frames which initially are free. What is the number of page faults using each of the following algorithms? a. FIFO b. LRU c. Clock d. Optimal

  • Problem 6 (13 points) The page table below is for a system with 16-bit virtual as well as physica...

    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...

  • Name Olbinna COSC414/514 Quiz3 (1) Suppose a computer has 4 physical pages, and a process referen...

    Name Olbinna COSC414/514 Quiz3 (1) Suppose a computer has 4 physical pages, and a process references its virtual pages (page o through page 7) in the following order: 021354637473355311172341 Also suppose the first four pages have been loaded in the physical memory as the following figure: Frame 0 Frame 1 Frame 2 Frame 3 a. Suppose the kernel uses First-In-First-Out (FIFO) page replacement algorithm. How many page faults would the process have? Which page references are page faults? b. Suppose...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT