Home CS439

CS439: Principles of Computer Systems

Homework 7, Part 1

Due: 8:45a Friday, March 21, 2014

Part 1 of the homeworks must be submitted electronically. Please refer to the homework turnin instructions.

  1. Name two advantages of paging over relocation.
  2. Consider a multi-level paging system with 128 pages and a page size of 256 bytes. The system has 1024 bytes of physical memory and is byte addressable. Assume the first-level page table holds 8 entries.
    1. How many bits are in a physical address?
    2. How many bits of the virtual address represent the first-level page table?
    3. How many bits of the virtual address represent the page number?
    4. How many bits are in the complete virtual address?
    5. What size are the page frames?
  3. Question 9.19, page 852, B&O.
  4. The Operating System gives memory to the heap memory manager k page(s) at a time. Why?
  5. In some operating systems, I/O from/to disk is done directly to/from a buffer in the user program's memory. The user program does a system call specifying the address and length of the buffer (the length must be a multiple of the disk record size).

    The disk controller needs a physical memory address, not a virtual address. Ben Bitdiddle proposes that when the user does a write system call, the operating system should check that the user's virtual address is valid, translate it into a physical address, and pass that address and the length (also checked for validity) to the disk hardware.

    This won't quite work. In no more than two sentences, what did Ben forget?