3.4. System software
A subsection of Computer Science, 9608, through 3. Advanced Theory
Listing 10 of 52 questions
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
9608_w16_qp_31
THEORY
2016
Paper 3, Variant 1
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, Y. Page Presence flag Page frame address Additional data State two facts about Page 5. Process Y executes the last instruction in Page 5. This instruction is not a branch instruction. Explain the problem that now arises in the continued execution of process Y. Explain how interrupts help to solve the problem that you explained in part . When the next instruction is not present in main memory, the OS must load its page into a page frame. If all page frames are currently in use, the OS overwrites the contents of a page frame with the required page. The page that is to be replaced is determined by a page replacement algorithm. One possible algorithm is to replace the page which has been in memory the shortest amount of time. Give the additional data that would need to be stored in the page table. Complete the table entry below to show what happens when Page 6 is swapped into main memory. Include the data you have identified in part in the final column. 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 …………. ……… …… …………………….…… Process Y contains instructions that result in the execution of a loop, a very large number of times. All instructions within the loop are in Page 1. The loop contains a call to a procedure whose instructions are all in Page 3. All page frames are currently in use. Page 1 is the page that has been in memory for the shortest time. Explain what happens to Page 1 and Page 3, each time the loop is executed. Name the condition described in part .
9608_w16_qp_32
THEORY
2016
Paper 3, Variant 2
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
9608_w16_qp_33
THEORY
2016
Paper 3, Variant 3
Questions Discovered
52