Homework 1 - Due 31st July 18:00
Question 1 (5pts)
Consider a simple paging system with the following parameters: 2^32 bytes of physical memory; page size of 2^10 bytes; 2^16 pages of logical address space.
- a) How many bits are in a logical address?
- b) How many bytes in a frame?
- c) How many bits in the physical address specify the frame?
- d) How many entries in the page table?
- e) How many bits in each page table entry? Assume each page table entry includes a valid/invalid bit.
Question 2 (5pts)
- a)What improvements does paging make relative to allocating slabs of contiguous memory?
- b)When does a page fault occur? Describe what the operating system does to handle a page fault.
- c)Why is locality of reference so important for a virtual memory system?
- d)What is thrashing and how can an operating system take steps to avoid it?
- e)How is a logical address translated into a physical address on a system that uses pure paging? How is the translation done for a system that uses pure segmentation?