9608_w16_qp_31
A paper of Computer Science, 9608
Questions:
6
Year:
2016
Paper:
3
Variant:
1

Login to start this paper & get access to powerful tools

1
2
3
A computer operating system (OS) uses paging for memory management. In paging: • main memory is divided into equal-size blocks, called page frames • each process that is executed is divided into blocks of the same size, called pages • each process has a page table that is used to manage the pages of this process The following table is the incomplete page table for a process X. Page Presence flag Page frame address Additional data When a particular page of the process is currently in main memory, the Presence flag entry in the page table is set to 1. If the page is not currently present in memory, the Presence flag is set to 0. The page frame address entry for Page 2 is 245. State what the value 245 could represent. Process X executes until the next instruction is the first instruction in Page 4. Page 4 is not currently in main memory. State a hardware device that could be storing this page. When an instruction to be accessed is not present in main memory, its page must be loaded into a page frame. If all page frames are currently in use, the contents of a page frame will be overwritten with this new page. The page that is to be replaced is determined by a page replacement algorithm. One possible algorithm is to replace the page that has been resident in main memory for the longest time. Give the additional data that would need to be stored in the page table. Complete the table entries below to show what happens when Page 4 is swapped into main memory. Assume that Page 5 is the one to be replaced. In the final column, give an example of the data you have identified in part . Page Presence flag Page frame address Additional data An alternative algorithm is to replace the page that has been used least. Give the different additional data that the page table would now need to store. In the following table, complete the missing data to show what happens when Page 3 is swapped into main memory. Assume that Page 1 is the one to be replaced. In the final column, give an example of the data you have identified in part . Page Presence flag Page frame address Additional data Explain why the algorithms given in part may not be the best choice for efficient memory management. Longest resident Least used
4
5
6