Virtual Memory and Address Translation · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.

Your own address space on shared memory

Computing · Computer Systems · ages 19-21
Name ______________________   Date ____________
  1. In page translation, which part of the address is left unchanged?

    • The page number
    • The offset inside the page
    • The whole address
  2. What is an address space?

    • The full set of addresses one program may use
    • The disk where files are stored
    • The cable linking computers
  3. Address translation happens on every memory access.

    Circle one:   True   False

  4. Page size is 100. Page 2 maps to frame 5 and the offset is 30. What is the physical address?

    Answer: ______________

  5. A virtual address has page 3 and offset 40. The table maps page 3 to frame 7, page size 100. What is the physical spot?

    • 703
    • 340
    • 740
  6. What does the translation lookaside buffer cache?

    • Recent page table entries
    • Program source code
    • File contents from disk
  7. A programmer says paging also stops bugs inside their own program. What is the error?

    • Paging removes the need for testing
    • Paging speeds up buggy code
    • Isolation separates programs; it never makes one program correct
  8. Two processes share one address space instead of separate ones. What breaks?

    • Translation gets faster
    • One program can read or smash the other by guessing numbers
    • Both programs gain more memory
LightMySky · lightmysky.comW1-mt_B-PiAyderj-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

Your own address space on shared memory W1-mt_B-PiAyderj-s1

  1. The offset inside the page · Only the page number maps to a frame; the offset rides along.
  2. The full set of addresses one program may use · An address space is one program's own room numbers.
  3. True · Each program address must be mapped before the hardware touches memory.
  4. 530 · Frame 5 times 100 plus offset 30 gives 530.
  5. 740 · Frame 7 times 100 plus offset 40 gives 740.
  6. Recent page table entries · It answers repeats from cached mappings instead of slow walks.
  7. Isolation separates programs; it never makes one program correct · Tables block cross program peeks, not self inflicted damage.
  8. One program can read or smash the other by guessing numbers · Separate tables are the isolation; sharing removes the guard.
Worksheet · LightMySky