Section 12.5
Review Questions
Address spaces and page tables
-
What is the virtual address space?
answer...
the set of all memory addresses that a program can generate regardless
of whether they correspond to real memory or not
-
How large is the virtual address space relative to the physical address
space?
answer...
usually much larger
-
How many bits long are VAX addresses?
answer...
32
-
If there are K bits in a memory address, what is the function that tells
how large the virtual address space is?
answer...
2K
-
How long were the CDC's addresses?
answer...
18
-
Draw a picture of a typical page table.
answer...
-
Of the following fields of a page table, which field(s) always has (have)
significance, no matter where the page is (in a frame of real memory or
only on the disk.)
present/absent bit
dirty bit
frame #
disk address
answer...
present/absent bit
disk address
-
Order the following steps in a sequence that occurs when a program attempts
to access a word of memory. Put 1 next to the first step, 2 next to the
second, and so on.
_____ A page fault event is sent to the operating system.
_____ The hardware translates the address using the page table.
_____ The operating system schedules a disk read to copy the page into a
frame.
_____ The operating system suspends the program, which does not run any
more instructions.
_____ The operating system marks the program as able to resume.
_____ The operating system uses a victim selection algorithm to find a
frame in memory to overwrite.
_____ The program generates an address during a memory read or write.
_____ The hardware detects via the present/absent bit that the page is not
in memory.
answer...
__4__ A page fault event is sent to the operating system.
__2__ The hardware translates the address using the page table.
__7__ The operating system schedules a disk read to copy the page into a
frame.
__5__ The operating system suspends the program, which does not run any
more instructions.
__8__ The operating system marks the program as able to resume.
__6__ The operating system uses a victim selection algorithm to find a
frame in memory to overwrite.
__1__ The program generates an address during a memory read or write.
__3__ The hardware detects via the present/absent bit that the page is not
in memory.
-
List all the components in a disk address.
answer...
- disk drive number
- platter or surface
- track number
- sector number
-
How does a page's dirty bit always start out, 1 or 0?
answer...
0
-
If dirty=1, what significance does the frame number have?
answer...
the frame number is not bogus; there really is a page in that frame of
physical memory (otherwise it could not be dirty!)
-
Why should the operating system attempt to minimize page faults?
answer...
Each page fault requires a slow and expensive disk read (and possibly
also a disk write if the victim's frame is dirty).