(Latest Revision: 
Sep  9, 2008
)  
Chapter One -- Introduction -- Lecture Notes
-  1.0 Chapter Goals
     
     -  Tour of OS Components
     
 -  Describe Computer System Organization
     
 
 -  1.1 What Operating Systems Do
     
     -  Provide An Interface above the Level of the Bare Machine
     
 -  Make the Computer More Efficient
     
 -  Make Computer Use More Convenient
     
 -  Controls and Coordinates Use of the Hardware - esp. I/O - prevents
	  error and misuse.
     
 -  Allocates Resources: CPU time, storage, devices ...
     
 -  Provide Functions Commonly Needed by Application Programs
     
 
 -  1.2 Computer-System Organization
     
     -  The Typical System consists of one or more general-purpose CPU's and
	  special purpose controllers sharing a common bus, including a memory
	  controller.
     
 -  A ROM-resident routine runs at boot time to perform initializations
	  and load & execute the OS.
     
 -  Hardware devices can interrupt the CPU - a signal sent along the
	  system bus
     
 -  A process can interrupt the CPU - by executing a special
	  instruction - also by making an error.
     
 -  An interrupt automatically causes suspension of the currently
	  running process and transfer of execution to some predetermined
	  section of code - typically a part of the operating system - an
	  interrupt handler.
     
 -  When an Interrupt Occurs, everything that will be needed to restart
	  the currently running process must be saved.  The interrupt
	  automatically does some of the saving - for example the saving of
	  the address of the current instruction.  The interrupt handler code
	  may perform other "context-saving" actions.
     
 -  Typically methods for controlling peripheral devices are quite
	  diverse and complex.  Operating systems have "device driver" code -
	  drivers corresponding to each type of device controller.  The job of
	  the device driver is to receive simple high level commands from the
	  OS, translate the commands, and communicate with the device to
	  achieve the desired effects.
          
     
 -  Typically drivers have to load bit patterns into registers within
	  the devices in order to "command" the device to perform an action.
     
 -  Typically, when a device finishes performing a data transfer it
	  notifies the OS by sending an interrupt.
     
 -  With Direct Memory Access (DMA) a controller can transfer an entire
	  block of data between device and primary memory, and interrupt the
	  CPU only once, after the entire block has been transferred.
     
 
 -  1.3 Computer-System Architecture
     
     -  OS's must rise to the challenge of operating various kinds of
	  multiprocessor systems efficiently: SMP's, multiple cores, blade
	  servers & clustered systems.
     
 
 -  1.4 Operating-System Structure
     
     -  Multiprogramming was development pushed into existence by the need
	 for greater CPU utilization.  A "QUANTUM LEAP" in sophistication of
	 the OS was required -- e.g. context switching, memory management,
	 scheduling, concurrency management, protection, and security.
     
 -  Time-sharing was a "natural" follow-on to multiprogramming that
	  allowed a return to "interactive" computing.
     
 -  Time-sharing tends to make greater demands for swapping and virtual
	  memory. 
     
 -  Traditional time-sharing requires implementing a file system -- not
	  the same as just the ability to write and read disk sectors.
     
 
 -  1.5 Operating-System Operations
     
     
     -  Hardware Protection mechanisms: The hardware and OS should prevent
	  processes from harming the system and each other.  The OS must be
	  protected.  We must be concerned about illegal I/O, illegal memory
	  access, and "hogging" of the CPU.  Tools: traps -- dual mode
	  operation -- memory protection -- base and limit registers --
	  privileged instructions -- timers.  
     
 
     -  In your mental model of how an OS works, do you see the OS as a part
	  of the system that is always executing and always monitoring user
	  processes?  Typically "the OS" is NOT running all the time.  In fact
	  this would make it impossible for user processes ever to execute on
	  a uniprocessor.  An OS can employ hardware protection mechanisms to
	  ensure that it will not lose control of the system, even during
	  periods when the OS is suspended.
     
 
 -  1.6 Process Management 
     
     -  A process is a program in execution.  An OS has to create, delete,
          suspend, resume, and synchronize processes.
     
 -  An OS must provide a mechanisms by which processes can 
          communicate.
     
 
 -  1.7 Memory Management
     
     -  The OS has to allocate memory to processes and deallocate memory
	  that is no longer in use.  It has to keep track of which portions of
	  memory belong to which processes
     
 -   Sometimes an OS has to take memory away from a process temporarily.
     
 
 -  1.8 Storage Management
     
     -  OS's are responsible for implementing file systems on secondary
	  storage: e.g. creating and deleting files & directories, and
	  allocating/deallocating storage space on disk.
     
 
 -  1.9 Protection and Security
     
     -  Although the difference between computer protection and security has
	  become blurred, our text makes an effort to preserve a clear
	  distinction between the two.
     
 -  An OS must perform "gatekeeper" functions - making sure that users
	  provide proper credentials before being given access to system
	  resources.  This is "protection".  The doorman at an expensive hotel
	  and the sentry at a military facility are doing protection work.
     
 -  gatekeepers, door men and sentries certainly cannot adequately work
	  to prevent damage or failure that happens inside the facility that
	  they guard.  Besides protection, an OS must also be concerned with
	  "security" - insuring that processes always use resources properly.
	  When casino owners watch people gambling, it's security work.  The
	  bouncer in a bar is there for the security of the establishment.
          
     
 
 -  1.10 Distributed Systems
     
     -  A distributive system is basically a bunch of computers connected to
	 each other via a network.
     
 -  A distributed operating system is and operating system that makes a
	  distributed system operate as if it were a single computer.
     
 -  A major challenge of the current generation is to build reliable and
	 efficient distributed operating systems.  
 
 -  1.11 Special Purpose Systems 
 -  1.12 Computing Environments