UNIVERSITY OF WISCONSIN-MADISON
Computer Sciences Department | ||
CS 537
Spring 2001 | A. Arpaci-Dusseau | |
Quiz #6: April 4th -- Memory Management |
Name: | Student ID #: |
_________ Appropriate for any sequence of allocations or frees _________ Manipulated with malloc() and new() _________ Appropriate for procedure call frames _________ Fast and efficient _________ Keeps all free memory contiguous _________ Can lead to external fragmentation _________ Allocation algorithms include best-fit and first-fit
a. Static Relocation b. Dynamic Relocation c. Segmentation d. Paging ______ Requires no hardware support ______ Causes no external fragmentation ______ Requires that the entire address space is allocated contiguously ______ Provides no protection across address spaces ______ Cannot move address spaces after they have been placed ______ Requires only base and bounds registers in MMU ______ Enables efficient allocation of sparse address spaces ______ Requires additional memory accesses for address translation
b) Now worry about having each page table fit within a page. Assume that each page table entry contains a read and a write protection bit and that the maximum amount of physical memory supported by the architecture is 8MB. Redraw the logical address, showing the number of bits used to index into each level of the page tables.
(Hint: You need to calculate the size of each page table entry. As an intermediate step, you may find it helpful to calculate the number of pages that fit in physical memory. Then, how many bits in each PTE are needed to designate one of these pages? Add the two bits for read and write protection to determine the size of each PTE.)