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 the lesson's page translation, which address component remains unchanged?

    • The virtual page number being translated
    • The offset within the page
    • The complete virtual address being translated
  2. An address belongs to a process's virtual address space. Does that alone mean the process can access it?

    • No; it may be unmapped or lack permission for that access
    • Yes; membership maps it and permits every attempted access
    • Yes; membership keeps its page resident and writable in RAM
  3. With virtual memory and backing storage, every valid virtual page must remain in RAM at the same time.

    Circle one:   True   False

  4. Page size is 256 address units. Virtual address 877 lies on page 3, which maps to frame 6. What is its physical address?

    Answer: ______________

  5. In a toy system, page size is 100 address units. Virtual page 4 has offset 65 and maps to physical frame 8. What is the physical address?

    • 465
    • 800
    • 865
  6. What information does a TLB cache for address translation?

    • Virtual-page to physical-frame mappings and permissions
    • The full data bytes read from each translated memory page
    • The source-code lines used to calculate every virtual address
  7. A program writes an unintended value to its own permitted writable page. Does this alone show that address translation or permission checking failed?

    • Yes; every permitted write must preserve all earlier program data
    • Yes; page translation should repair the program's update logic
    • No; access permission does not prove the algorithm correct
  8. Two processes have separate page tables, but the OS intentionally maps one writable page in each to the same physical frame. What follows?

    • Both are isolated from every byte of that shared frame
    • Both can change the shared frame where writing is allowed
    • Both lose the ability to access any other mapped memory page
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 within the page · The table selects a physical frame for the virtual page. The position within that page stays the same.
  2. No; it may be unmapped or lack permission for that access · Belonging to an address space does not guarantee a mapping or permission for an access. Membership alone therefore does not guarantee access.
  3. False · Some valid page contents can be kept in backing storage and loaded when needed.
  4. 1645 · The offset is 877 - 3 times 256 = 109. Frame 6 starts at 1536, so the physical address is 1645.
  5. 865 · Frame 8 begins at 8 times 100 = 800. Add unchanged offset 65 to get 865.
  6. Virtual-page to physical-frame mappings and permissions · The TLB caches translation information. The data at a translated address is handled by the memory system, not supplied by the TLB.
  7. No; access permission does not prove the algorithm correct · Translation and permissions can work correctly while the program chooses an unintended value for an allowed write.
  8. Both can change the shared frame where writing is allowed · Separate tables can contain mappings to the same frame. Writable shared mappings let both processes change that frame's data.
Worksheet · LightMySky