Exercises On Memory Management
Exercises On Memory Management
1. Assume the base and limit registers contain the same value, 16,384.
Is this just an accident, or are they always the same? It is just an
accident, why are they the same in this case?
3. Using the page table on slide 31 in the class notes, what are the physical
addresses of the logical addresses
(a) 4,096
(b) 2,062
(c) 8,949
(d) 11,266
0 4
1 8
2 16
3 17
4 9
The page size is 4KB and the maximum physical memory size of the
machine is 2 megabytes.
(a) How many bits are required for each page table entry?
(b) What is the maximum number of entries in a page table?
(c) How many bits are there in a virtual address?
(d) To which physical address will the virtual address 1524 translate
to?
(e) Assuming that frame 0 starts at the physical address 0, that con-
secutive frame numbers have consecutive physical addresses (the
first address of frame i + 1 follows immediately the last address
of frame i), then, which virtual address will translate to physical
address 65536?
(a) If a memory reference takes 400ns, how long does it takes to fetch
data through the page table?
(b) If we add a TLB, and 85% of all page-table references are found
in the TLB (i.e. hit rate is 85%), what is the effective memory
reference time? (Assume that finding a page-table entry in the
associative registers takes zero time, if the entry is there.)
6. Consider a paging system with the page table stored in memory. As-
sume the overhead to read an entry in the page table is 5ns (access to
the page table is 5 ns). To reduce this overhead, a TLB is installed,
where a look up in the TLB cost 1ns. What hit rate is needed to reduce
the average overhead to access the page table to 2ns?
The page size is 2KB (211 ) and the maximum physical memory size of
the machine is 1 megabyte (220 bytes).
(a) How many bits are required for each page table entry?
(b) What is the maximum number of entries in a page table?
(c) How many bits there is in virtual addresses generated by the CPU?
(d) To which physical address will the virtual address 9812 translate
to?
(e) Assuming that frame 0 starts at the physical address 0, that con-
secutive frame numbers have consecutive physical addresses (the
first address of frame i + 1 follows immediately the last address
of frame i), then, which virtual address will translate to physical
address 33768?