Question

In: Computer Science

Consider the following page reference string: 1,2,3,5,4,2,1,5,4,2,6,3,1,2,6,3,1,2,4,7,5,4,3,5 How many page faults would occur for replaement by...

Consider the following page reference string:

       1,2,3,5,4,2,1,5,4,2,6,3,1,2,6,3,1,2,4,7,5,4,3,5
       
      How many page faults would occur for replaement by LRU, FIFO, optimal, for
      four frames?  All  frames  are
      initially empty and first unique page reference causes a page fault. Draw the frame for each page reference.

Solutions

Expert Solution

in fifo

string 1 2 3 5 4 2 1 5 4 2 6 3 1 2 6 3 1 2 4 7 5 4 3 5
frame 1 1 1 1 1 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3
frame 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 4 4 4 4 4 4
frame 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 7 7 7 7 7
frame 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 5 5 5 5
page fault y y y y y n y n y y y y n n n n n n y y y n n n

total page fault is 11

in lru

string 1 2 3 5 4 2 1 5 4 2 6 3 1 2 6 3 1 2 4 7 5 4 3 5
frame 1 1 1 1 1 4 4 4 4 4 4 4 4 1 1 1 1 1 1 1 1 5 5 5 5
frame 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
frame 3 3 3 3 3 1 1 1 1 6 6 6 6 6 6 6 6 4 4 4 4 3 3
frame 4 5 5 5 5 5 5 5 5 3 3 3 3 3 3 3 3 7 7 7 7 7
page fault y y y y y n y n n n y y y n n n n n y y y n y n

total page fault is 13+-

in optimal

string 1 2 3 5 4 2 1 5 4 2 6 3 1 2 6 3 1 2 4 7 5 4 3 5
frame 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 4 4 4 4 4
frame 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 7 7 7 7 7
frame 3 3 3 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3
frame 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 5 5 5 5
page fault y y y y y n n n n n y y n n n n n n y y y n n n

total page fault is 10


Related Solutions

Consider the following page reference string: 0, 1, 2, 3, 1, 0, 4, 5, 1, 0,...
Consider the following page reference string: 0, 1, 2, 3, 1, 0, 4, 5, 1, 0, 1, 2, 6, 5, 2, 1, 0, 1, 2, 5 How many page faults would occur for the following replacement algorithms, assuming one, three, five, and seven frames? Remember that all frames are initially empty, so your first unique pages will cost one fault each. Optimal replacement LRU replacement CLOCK replacement FIFO replacement
Page Replacement Algorithms. Consider the following page reference stream and 3 page frames: 0 1 2...
Page Replacement Algorithms. Consider the following page reference stream and 3 page frames: 0 1 2 3 2 4 3 1 1 5 2 4 6 3 3 4 6 3 4 7. For the MIN, FIFO, and LRU algorithms, show the contents of the page frame after each reference, and then compute the total number of page faults, divided in to cold misses and other misses.
Find LRU paging A program has the following page reference string 0 1 2 3 3...
Find LRU paging A program has the following page reference string 0 1 2 3 3 4 2 4 5 3 3 4 6 2 5 6 If we allocate 3 page frames to the program, 1. Please draw a figure to show the page allocation/replacement. 2. How many page faults will be generated?
.How many bits would be used to represent the following text string in extended ASCII? "I...
.How many bits would be used to represent the following text string in extended ASCII? "I like this HW!" .What is the hexadecimal value of the color black and the color white on the web? . What is the minimum length of the binary code I would need to use if I wanted to assign a unique binary code to 93 students in the class?
reference string 0123342453346256 If we allocate 3 page frames to the program, 1. Please draw a...
reference string 0123342453346256 If we allocate 3 page frames to the program, 1. Please draw a figure to show the LRU page allocation/replacement \. 2. How many page faults will be generated?
The following page-reference string: 1, 2, 4, 3, 2, 5, 4, 2, 4, 2, 1, 3,...
The following page-reference string: 1, 2, 4, 3, 2, 5, 4, 2, 4, 2, 1, 3, 2, 3, 1, 3, 6, 1, 6, 4. Main memory with 3 frames of 1 kilobyte available and they are all initially empty. Complete a figure, similar to Figure 8.14(in the slides or textbook), showing the frame allocation for each of the following page replacement policies: a. Optimal b. Least recently used c. First-in-first-out Then, find the relative performance of each policy with respect...
Write a 1-2-page paper (not including title page and reference page) that describes the following: Ø...
Write a 1-2-page paper (not including title page and reference page) that describes the following: Ø You are caring for a patient with c-diff as part of your workload assignment. Discuss what c-diff is and how it is transmitted (how you can get it)? Ø What actions will you take as a nurse to protect yourself and the other patients on the unit when taking care of your patient? You should include a minimum of 3 scholarly references (suggestion on...
Write a 1-2-page paper (not including title page and reference page) that describes the following: Ø...
Write a 1-2-page paper (not including title page and reference page) that describes the following: Ø You are caring for a patient with c-diff as part of your workload assignment. Discuss what c-diff is and how it is transmitted (how you can get it)? Ø What actions will you take as a nurse to protect yourself and the other patients on the unit when taking care of your patient? You should include a minimum of 3 scholarly references (suggestion on...
Consider the following string of page references: 5, 7, 8,9, 7, 3, 7, 4, 9, 3,...
Consider the following string of page references: 5, 7, 8,9, 7, 3, 7, 4, 9, 3, 7, 3, 9. showing the frame allocation for: a. Optimal b. LRU (least recently used) c. FIFO (first-in-first-out) d. List the total number of page faults for each policy. Count page faults only after all frames have been initialized.
Using a UTF-8 Unicode implementation, how many bytes would it require to store the string "Dog!"
Using a UTF-8 Unicode implementation, how many bytes would it require to store the string "Dog!"
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT