{ "q1": { "type": "multiple", "question": "\n\n\nWhich of the following statements regarding segmentation\nand paging are true (select all that apply)?\n\n\n", "responses": { "seg_sharing": "Segmentation allows for code sharing between different processes.", "pag_sharing": "Paging allows for code sharing between different processes.", "seg_fixed": "Segmentation allocates fixed size blocks of memory.", "pag_fixed": "Paging allocates fixed size blocks of memory.", "seg_internal": "Segmentation is prone to internal fragmentation.", "pag_internal": "Paging is prone to internal fragmentation.", "seg_external": "Segmentation is prone to external fragmentation.", "pag_external": "Paging is prone to external fragmentation." } }, "q2": { "type": "multiple", "question": "\n\n\nWhich of the following statements regarding swapping and page\nreplacement are true (select all that apply)?\n\n\n", "responses": { "pagefault": "If a page is not present in physical memory, then the hardware triggers a page fault.", "segfault": "If a page is not present in physical memory, then the hardware triggers a segfault.", "oom_evict": "If there are no free frames in physical memory, then the OS evicts one to disk.", "oom_crash": "If there are no free frames in physical memory, then the OS crashes.", "replace_mru": "During page replacement, we generally want to select the most recently used page.", "replace_lru": "During page replacement, we generally want to select the least recently used page.", "clock_lru": "The clock algorithm is an approximation of the LRU strategy.", "clock_used": "The clock algorithm involves checking and clearing the used bit of each PTE." } }, "q3": { "type": "blank", "question": "\n\n\nGiven a virtual memory system with the following properties:\n\n\n\n
Sketch all the data structures needed to support a multi-level paged\nvirtual memory system by filling in the table below. When appropriate, you\nwrite the solution as a power of 2 (ie. 2^14) or simplify\nthe number in terms of K, M, G, or T units (ie. 16K).
\n\n\n
\n
\n