COMP 2432 Operating Systems Tutorial 10
1. Virtual Memory Page Replacement.
Consider the following reference string generated by a process for which 3 memory frames are allocated for the process. Indicate the content of the frames after each page indicated by the reference string is accessed, including the page fault. How many page faults are generated from the reference string? Answer the question based on different page replacement algorithms: (a) FIFO, (b) Optimal, and (c) LRU.
012302340123423
Copyright By PowCoder代写 加微信 powcoder
2. Virtual Memory Page Replacement.
Consider the following reference string generated by a process for which 3 memory frames are allocated for the process. Indicate the content of the frames after each page indicated by the reference string is accessed, including the page fault. How many page faults are generated from the reference string? Answer the question based on different page replacement algorithms: (a) FIFO, (b) Optimal, (c) LRU based on counter approach, and (d) LRU based on stack approach. Repeat the question with 4 memory frames.
01234023450135432123
3. Virtual Memory Page Replacement.
Consider the following reference string generated by a process for which 3 memory frames are allocated for the process. Indicate the content of the frames after each page indicated by the reference string is accessed, including the page fault. How many page faults are generated from the reference string? Answer the question based on different page replacement algorithms: (a) FIFO, (b) Optimal, and (c) LRU. Repeat the question with 4 memory frames and then 5 memory frames. You may want to see how many possible answers there are in Optimal.
012341214351312313502424
Do you have any observation on the number of page faults generated with respect to the number of frames?
4. Virtual Memory Page Replacement.
Compare your results with those from Question 3 based on the following ¡°longer¡± reference string on the three algorithms with an additional reference to page 2 inserted somewhere in the middle. Do you have any interesting observation with respect to the number of page faults generated?
0123412143513123123502424
Again, compare your results with those from Question 3 based on the following ¡°shorter¡± reference string on the three algorithms with the indicated reference to page 1 somewhere in the middle being removed. Do you have any interesting observation with respect to the number of page faults generated?
012341214351312313502424
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com