OPERATING SYSTEMS
CS160
HISTORY OF OPERATING SYSTEMS
Operating Systems
FUNCTIONS OF AN OPERATING SYSTEM
 Oversee operation of computer
 Store and retrieve files
 Schedule programs for execution
 Coordinate the execution of programs
BATCH PROCESSING
INTERACTIVE PROCESSING
OPERATING SYSTEM ARCHITECTURE
Operating Systems
SOFTWARE CLASSIFICATION
OPERATING SYSTEM ARCHITECTURE
Application
Shell
Kernel
Hardware
WINDOWS XP SYSTEM ARCHITECTURE
WINDOWS XP SYSTEM ARCHITECTURE
OPERATING SYSTEM ARCHITECTURE
Application
Shell
Kernel
Hardware
THE BOOT PROCESS: BIOS
 Custom settings are read from CMOS
 Complementary Metal-Oxide Semiconductor
 Memory used to store configurable system
settings
 System setup utility
 Power-on self-test (POST) is run to check
system function
THE BOOT PROCESS: POST
 POST
 BIOS instructs CPU to read code stored at various
locations and compares it to known values
 BIOS loads low-level drivers and interrupt handlers
for basic hardware
 Checks video card
 Initializes video BIOS
 Tests video card and video memory
 BIOS information (version, date, manufacturer)
is displayed
THE BOOT PROCESS: WARM VS COLD BOOT
 BIOS checks memory location 0x0472
 Value of 0x1234 indicates a reboot and rest of
post is skipped
 Any other value indicates a cold boot and the
following steps are performed
 RAM is tested
 Values are written then read from each memory
cell
 BIOS tests for existence of floppy disks, hard
drive, and optical drives
THE BOOT PROCESS: HANDOFF
 After POST BIOS hands off control to operating
system
 BIOS instructs CPU to begin executing the
operating system boot loader
 Code found in sector zero of primary HDD
 Operating system replaces many of the device
drivers and interrupt vectors that BIOS loaded
THE BOOT PROCESS: PLUG AND PLAY
ENUMERATION
 The operating system adds special device
drivers called enumerators
 ISA bus enumerator
 SCSI bus enumerator
 PCI bus enumerator
 PCIe bus enumerator
 Port enumerator
 Operating system asks each enumerator to
identify which devices it has and what
resources they require
THE BOOT PROCESS: RESOURCE ARBITRATION
 Operating system assigns resources to each
enumerated device
 IRQ
 DMA
 Memory addresses
 If no new devices are discovered, stored PnP
information is used
 Operating system loads appropriate high-level
device drivers for each PnP device
 Drivers initialize each device
THE BOOT PROCESS: FINISHING UP
 Operating system mounts disk drives for use
 Video drivers are installed to allow for use of
video hardware
 Operating system services are initialized
 User logon screen displayed
COORDINATING THE MACHINE’S
ACTIVITIES
Operating Systems
PROCESSES
 Program: a set of instructions given to a
computer
 Process: a program in execution
 Process state: the current status of a process
including the contents of the relevant CPU
registers
PROCESS STATE DIAGRAM
New
Ready
Admitted
Running
Scheduler dispatch
TerminatedExit
Interrupt
Waiting
I/O or event waitI/O or event completion
PROCESS ADMINISTRATION
 Processes compete for operating system
attention and computer resources
 Operating system coordinates execution of
processes
 Scheduler
 Dispatcher
SCHEDULER
 Scheduler manages a
pool of processes
which are currently
being executed
 Adds new processes
 Removes completed
processes
 This pool is a
collection of process
control blocks (PCBs)
DISPATCHER
 Responsible to ensuring processes get
scheduled for CPU time
 The act of changing from one process to
another is called a context switch
 PCBs are packed/unpacked
 Cooperative multitasking
 Processes remove themselves from running state
 Preemptive multitasking
 Dispatcher evicts process when time slice expires
 Occurs on interrupt
CONTEXT SWITCHING
HANDLING COMPETITION AMONG
PROCESSES
Operating Systems
SEMAPHORES
DEADLOCK
SECURITY
Operating Systems
USER ACCOUNTS
 Privileges assigned according to account type
 Super User or Administrator
 Standard user
 Other role-based accounts
HIERARCHICAL PROTECTION DOMAINS
(PROTECTION RINGS)
Least Privileged
Most Privileged
Application
Shell
Ring 3
Ring 2
Kernel
Ring 1
Hardware
Ring 0

Cs160 chapter 3

  • 1.
  • 2.
    HISTORY OF OPERATINGSYSTEMS Operating Systems
  • 3.
    FUNCTIONS OF ANOPERATING SYSTEM  Oversee operation of computer  Store and retrieve files  Schedule programs for execution  Coordinate the execution of programs
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
    WINDOWS XP SYSTEMARCHITECTURE
  • 10.
    WINDOWS XP SYSTEMARCHITECTURE
  • 11.
  • 12.
    THE BOOT PROCESS:BIOS  Custom settings are read from CMOS  Complementary Metal-Oxide Semiconductor  Memory used to store configurable system settings  System setup utility  Power-on self-test (POST) is run to check system function
  • 13.
    THE BOOT PROCESS:POST  POST  BIOS instructs CPU to read code stored at various locations and compares it to known values  BIOS loads low-level drivers and interrupt handlers for basic hardware  Checks video card  Initializes video BIOS  Tests video card and video memory  BIOS information (version, date, manufacturer) is displayed
  • 14.
    THE BOOT PROCESS:WARM VS COLD BOOT  BIOS checks memory location 0x0472  Value of 0x1234 indicates a reboot and rest of post is skipped  Any other value indicates a cold boot and the following steps are performed  RAM is tested  Values are written then read from each memory cell  BIOS tests for existence of floppy disks, hard drive, and optical drives
  • 15.
    THE BOOT PROCESS:HANDOFF  After POST BIOS hands off control to operating system  BIOS instructs CPU to begin executing the operating system boot loader  Code found in sector zero of primary HDD  Operating system replaces many of the device drivers and interrupt vectors that BIOS loaded
  • 16.
    THE BOOT PROCESS:PLUG AND PLAY ENUMERATION  The operating system adds special device drivers called enumerators  ISA bus enumerator  SCSI bus enumerator  PCI bus enumerator  PCIe bus enumerator  Port enumerator  Operating system asks each enumerator to identify which devices it has and what resources they require
  • 17.
    THE BOOT PROCESS:RESOURCE ARBITRATION  Operating system assigns resources to each enumerated device  IRQ  DMA  Memory addresses  If no new devices are discovered, stored PnP information is used  Operating system loads appropriate high-level device drivers for each PnP device  Drivers initialize each device
  • 18.
    THE BOOT PROCESS:FINISHING UP  Operating system mounts disk drives for use  Video drivers are installed to allow for use of video hardware  Operating system services are initialized  User logon screen displayed
  • 19.
  • 20.
    PROCESSES  Program: aset of instructions given to a computer  Process: a program in execution  Process state: the current status of a process including the contents of the relevant CPU registers
  • 21.
    PROCESS STATE DIAGRAM New Ready Admitted Running Schedulerdispatch TerminatedExit Interrupt Waiting I/O or event waitI/O or event completion
  • 22.
    PROCESS ADMINISTRATION  Processescompete for operating system attention and computer resources  Operating system coordinates execution of processes  Scheduler  Dispatcher
  • 23.
    SCHEDULER  Scheduler managesa pool of processes which are currently being executed  Adds new processes  Removes completed processes  This pool is a collection of process control blocks (PCBs)
  • 24.
    DISPATCHER  Responsible toensuring processes get scheduled for CPU time  The act of changing from one process to another is called a context switch  PCBs are packed/unpacked  Cooperative multitasking  Processes remove themselves from running state  Preemptive multitasking  Dispatcher evicts process when time slice expires  Occurs on interrupt
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
    USER ACCOUNTS  Privilegesassigned according to account type  Super User or Administrator  Standard user  Other role-based accounts
  • 31.
    HIERARCHICAL PROTECTION DOMAINS (PROTECTIONRINGS) Least Privileged Most Privileged Application Shell Ring 3 Ring 2 Kernel Ring 1 Hardware Ring 0