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