Home CS439

CS439: Principles of Computer Systems

Homework 7

Due: 8:45a Friday, March 22, 2012

Homeworks will be submitted electronically. Please refer to the homework turnin instructions.

  1. Explain the steps that an operating system executes when the CPU receives an interrupt.
  2. Consider a paging system with 16 pages and a page size of 256 bytes. The system has 1024 bytes of physical memory.
    • How many bits are in a physical address?
    • How many bits represent the page number?
    • How many bits are in the complete virtual address?
    • What size are the page frames?
  3. 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?

  4. Question 9.19, page 852, B&O.