OS Concepts And Design
  1. Types of operating system.
    1. Mainframe.
      1. Batch processing. Legacy apps.
      2. OS/390. Unix variants.
      3. Often multiple instances under VM.
    2. Server. Unix/Linux or Windows.
    3. Multi-processors.
      1. Multiple CPUs.
      2. Now a common case with multiple cores.
      3. Effects O/S design.
    4. PC Operating System.
      1. Mostly Windows variants and MacOS.
      2. (Except for us non-conformists.)
    5. Hand-held/mobile.
      1. He mentions Symbian and Palm OS.
      2. Now more often the smart phone OSes: iOS, Android.
    6. Sensor node.
      1. Tiny devices with minimal hardware and electrical power.
      2. Home automation devices.
      3. Minimal OS; more like a library.
    7. Real-time.
      1. Industrial processes.
      2. Vehicle control.
      3. Hard and soft.
    8. Smart card.
  2. Concepts and Abstractions.
    1. Processes.
      1. Identity and ownership.
      2. Communication and control.
      3. A process operates in an address space.
    2. Address space.
    3. Files.
      1. Files and directories.
      2. Hierarchy.
      3. Permissions.
      4. Opening files and file handles. fileread.cpp
      5. Some files have special behavior.
        1. Directories (folder) are special files.
        2. Some files represent physical devices.
    4. Protection.
      1. Hardware modes give the O/S secure control.
      2. OS then implements other restrictions.
        1. File permission.
        2. Memory controls.
    5. I/O.
      1. O/S performs all I/O; forbids user.
      2. Users ask the O/S for service.
      3. See above.
    6. Shell (command interpreter). Text or graphical.
  3. System Calls.
    1. Process creation, destruction and control.
    2. I/O of any kind.
    3. Creation of files and directories.
    4. Hello using a write library call.
    5. Hello using syscall library call.
    6. assembly Hello, World! (32-bit)
    7. assembly Hello, World! (64-bit)
      1. Place parameters in pre-defined register locations.
      2. Traditional, enter the OS with a trap.
      3. Newer: syscall instruction jumps to an address specified by the the OS and enters kernel mode.
      4. Linux assigns different syscall codes under the different methods.
    8. There are many system calls. See the textbook.
  4. Structure.
    1. Monolithic. Collection of functions, any of which can call another.
    2. Layered system.
      1. Functions are collected into layers.
      2. Functions only call to the next layer down.
      3. Provides some organization. May have hardware to enforce it.
    3. Microkernels
      1. Functions are removed from the kernel to minimize it.
      2. Instead, provided by local server processes.
      3. Process communicate by passing messages.
      4. Client-server version distinguishes processes by type.
      5. Robust, flexible.
        1. Crashed service processes may be restarted.
        2. Variations of basic services w/o modifying the kernel.
      6. Limited commercial use for performance reasons.
    4. Virtual machines.
      1. Software simulates hardware; O/S runs on the simulated hardware.
      2. Early: IBM on the 360/370 hardware.
        1. When the guest kernel executes a privileged instruction, hardware traps.
        2. The trap handler simulates the effect of the privileged instruction on the simulated machine.
      3. Presently, on PC hardware.
      4. Type 1 and 2.
        1. Type one runs straight on the hardware; there is no host OS.
        2. Type two runs as a process on a host OS, and runs a guest OS under itself.
        3. Typical type 2 hypervisors include a kernel module which improves performance, and actually creates a sort of 1-2 hybrid.
      5. VM is difficult on i386 hardware.
        1. Privileged instructions in user mode are ignored instead of trapped.
        2. Originally used a form of JIT translation. VMWare pioneered this technique.
        3. Intel has since updated its hardware to assist virtualization.
      6. Paravirtulization.
        1. Change the hardware design a little to make it easier and more efficient to virtualize.
        2. Build a hypervisor that implements the improved machine.
        3. Port the OS to run on the machine you implemented.
        4. Improves efficiency.
        5. Sacrifices generality since VM no longer supports a vanilla OS.
        6. The leading example seems to be a system called Xen which runs VMs on Linux.