Quiz 12.2

DIRECTIONS: Read each question carefully. Then click on the dot next to the answer that most closely fits the question. Try to answer all questions on this quiz and when you are done, click on the grade me button at the bottom.


Coverage: Section 12.2

  1. How big is virtual memory in the following picture?

GIFs/virtual-real.gif
8191K
8K
4K
8192K

  1. What might happen if the virtual memory of a computer were vastly larger than the physical memory and the application program used many different addresses of that virtual memory?
the computer would run much faster
there would be too much swapping
programmers would find themselves running out of memory addresses

  1. What do we call the address where a program begins executing?
entry point
starting address
initial page

  1. When a program begins on a demand paged virtual memory system, where is the program at the very beginning of execution?
in real memory
on disk
a combination of real memory and disk

  1. Suppose that the following real memory existed alongside the virtual memory, and that the sequence of memory operations given below occurred. Which pages would be in real memory at the end of the sequence?

GIFs/virtual-real2.gif
pages 1, 2, 3
pages 0, 1, 2
pages 0, 5, 7
pages 0, 5, 6

  1. Referring to the above question, which page would be dirty?
page 0
page 1
page 2
page 5

  1. Again referring to the above question, how many frames would be in use?
2
3
4
6

  1. Again, think of a virtual memory that has 8 pages (numbered 0 to 7), with a 4-page real memory. Below is a picture of real memory at some point in time. The next memory operation reads from page 3 of virtual memory. Which of the following actions would not be valid? (The shading means page 2 has been altered.)

GIFs/4-page-real.gif
page 3 is copied into frame 2
page 3 is copied into frame 3
page 3 is copied into frame 2 after page 2 is saved to disk
page 3 is copied into frame 3 after page 2 is saved to disk

  1. When a frame's contents are overwritten with a new page from disk, we say the old page was ....
killed
reused
evicted
purged

  1. When we need a frame of memory to hold a new page, what is the best possible choice we could make?
the page that was used farthest in the past
the page that was most recently used
the page that will be used farthest in the future
there is no beest choice; any random choice will do

  1. Which frame can page 0 be put into?

GIFs/4-page-real.gif
only frames 0 and 1
only frames 0 and 2
frames 0, 2, 4 or 6
any of the four frames

  1. Which component of a computer system selects victims?
the operating system
the compiler
the memory hardware
the instruction controller

  1. What extra hardware is required to implement the LRU victim selection algorithm?
an extra register for each frame to record time stamps
an extra memory word for each page to record time stamps
an extra multiplexor to channel the page into the correct frame
an extra adder to add the virtual address to the page number