22C:116, Lecture Notes, Jan. 18, 1995

Douglas W. Jones
University of Iowa Department of Computer Science

  1. The course title says something important about this class

  2. REVIEW -- The target hardware is an example of a kind of system, composed of several subsystems.
       CPU   CPU   CPU     -- central processing units
        |      \   /
       MEM      MEM        -- memory
        |        |
       IOP------IOP-----   -- I/O processing units, with an
        |        |              interconnection network
      other    other
       I/O      I/O
    The focus of a traditional operating system course is on a system with a single CPU and no network. In this course, as suggested by the above figure, we will concentrate on systems that may include multiple CPUs, and indeed, systems that may include many computers interconnected by a network.

  3. Focus in on the CPU's; these are complex subsystems in their own right.
    Control      Registers
    Unit         |  PC   | The program counter
    	     |       |        and
    ALU <------> |_______| Some operand registers

    Within the CPU, we will be concerned with the set of registers visible to the programmer, and not such details as the presence or absence of pipeline stage registers, microprogram support registers, or other registers hidden inside the CPU.

    The most important operation on the registers that will concerns us is that of context switching. This involves first saving all registers of one context and then restoring all registers to build a new context.

  4. Focus on Memory
    	      Lens            Real Memory
    Virtual       ----            |         |
    Memory        \  /            |         |
    	       ||             |         |
    (CPU's        /  \            |         |
     viewpoint)   ----            |_________|
    A Memory Management Unit is present in most larger computer systems, sometimes as a component of the CPU, and sometimes as a separate component. This unit serves as the "lens" through which programs operating on the CPU observe the memory. As with any lens, we will takl about the real memory and the image of memory as seen through the memory management unit, the virtual memory.

    The memory management unit contains registers that may (or may not) be part of the context, as described in the following:

    If the MMU registers are saved and restored as part of the context switching operation, the operation takes longer and the operation changes the memory address space. If the switch does not save the MMU registers, it is fast, but both the old and new contexts must share the same address space.

    This is why we see systems with two levels of processes -- lightweight threads which share address spaces with each other, and heavyweight processes each of which has its own address space. This allows multiple processes acting on behalf of a single application to coexist at very low cost, while allowing separate address spaces to be allocated to each application.

  5. Focus on Register Input/Output
     * send( data, device )         -- output
     * data = get( device )         -- input
     * repeat until ready( device ) -- wait for transfer complete
    In register I/O, data is tranferred is by the program, one byte or word at a time.

  6. Focus on Direct Memory Access Input/Output
     * select device and address on device
     * select buffer in main memory
     * start transfer in or out
     * await transfer complete
    When direct memory access I/O hardware is employed, data is transferred one block at a time, in parallel with program execution. I/O is initiated by a program running on the CPU, and then it takes place in parallel with program execution. When done, a signal is sent to the CPU indicating that the transfer is complete.