
	 
	 OS Concepts And Design
	 
	 
    
                    
-  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.  Don't know how common these actually are.  TinyOS
  
 -  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.
    	fileread1.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 write library call.
  
 -  i386
  	assembly Hello, World!.
  
 -  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. 
     -  VM is difficult on i386 hardware.
      
      -  Privileged instructions in user mode are ignored instead of trapped.
      
 -  Use a form of JIT translation.
      
 -  Add a kernel module (modify to host kernel) to add support.
      
 
     -  Paravirtulization.
      
      -  Modify the guest OS to behave differently when run under another OS.
      
 -  Remove the privileged instructions and let it make syscalls like
      	  everyone else.