Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Principles of Operating
Systems
Fall 2000
Geoffrey M. Voelker
Lecture 1 Overview
l Discuss handouts
l What is an operating system?
l Brief history of operating systems
l Class overview
1
What is an operating system?
l The operating system is the software layer between
user applications and the hardware
Applications
Operating System
Hardware
2
The OS and Hardware (2)
l Benefits to applications
u Simpler (no tweaking device registers)
u Device independent (all network cards look the same)
u Portable (same program on Windows95/98/ME/NT/2000/…)
u Transportable (same program across different OSes (Java))
3
OS Metaphors
l Service provider
u The OS provides a standard set of facilities/services that
enable programs to be simple and portable
l Executive/bureaucrat/big brother/juggler
u The OS controls access to shared resources, and allocates
resources for the greater good
l Caretaker
u The OS monitors and recovers from exceptional conditions
l Cop/security guard
u The OS mediates access to resources, granting or denying
requests to use resources
4
Spooling
l Disks provided a much faster I/O device than card
readers, mag tape, and line printers
l Motivated development of spooling (Simultaneous
Peripheral Operation On-Line)
u Use disk to overlap I/O of one job with computation of others
u Move program/data from card reader onto disk while another
job computes
u When done, next job ready to be loaded from disk
u Can spool multiple programs onto disk, OS can choose which
job to run next (job scheduling)
u But, CPU still idle when job reads/writes to disk
Multiprogramming
l Multiprogramming increased system utilization
u Keeps multiple runnable jobs loaded in memory
u Overlaps I/O processing of a job with computation of another
u Benefits from I/O devices that can operate asynchronously
u Requires the use of interrupts and DMA
u Optimizes system throughput (number of jobs finished in a
given amount of time) at the cost of response time (time until
a particular job finishes)
5
Timesharing
l Timesharing supports interactive use of computer by
multiple users
u Terminals give the illusion that each user has own machine
u Optimizes response time (time to respond to an event like a
keystroke) at the cost of throughput
u Based on timeslicing – dividing CPU time among the users
u Enabled new class of applications – interactive!
u Users now interact with viewers, editors, debuggers
l The MIT Multics system (mid-late 60s) was an early,
aggressive timesharing system
l Unix is also a timesharing system …what about
Windows?
September 20, 2000 CSE 120 -- Lecture 1 -- Course Intro 11
6
Parallel Operating Systems
l Support parallel applications trying to get speedup of
computationally complex tasks across multiple CPUs
l Requires basic primitives for dividing single task into
multiple parallel activities
l Supports efficient communication among activities
l Supports synchronization of activities to coordinate
data sharing
l Early parallel systems used dedicated networks and
custom CPUs, now common to use networks of high-
performance PC/workstations
7
CSE 120
l This course addresses classic OS concepts
u The services provided by the OS
u OS implementation on modern hardware
u Co-evolution of hardware and software
u Techniques for implementing software systems that are
» Large and complex
» Long-lived and evolving
» Concurrent
» Performance-critical
u Remove all mysteries
Fundamental OS Issues
l The fundamental issues/questions in this course are:
u Structure: how is an operating system organized?
u Sharing: how are resources shared among users?
u Naming: how are resources named (by users and programs)?
u Protection: how are users/programs protected from each
other?
u Security: how can information access/flow be restricted?
u Communication: how to exchange data?
u Reliability and fault tolerance: how to mask failures?
u Extensibility: how to add new features?
8
Fundamental OS Issues (2)
u Concurrency: how to control parallel activities?
u Performance: how to make efficient use of resources, reduce
OS overhead?
u Scale and growth: how to handle increased demand?
u Compatibility: can we ever do anything new?
u Distribution: how to coordinate remote operations?
u Accountability: how to charge for/restrict use of resources?
Course Components
l Course material provided through class lectures,
textbook readings, and handouts
l Course assignments are homework questions from the
book and a series of class projects
u Approximately five spaced throughout the quarter
l Discussion sections are a forum for asking questions
u Will have mailing list and online discussion forums, too
9
Nachos
l Nachos is an instructional operating system
u It is a user-level operating system and a machine simulator
» Not necessarily unlike the Java runtime environment
» Will become abundantly clear (or not so clear) very soon
u Written in C++
u Programming environment will be Unix (Linux)
u The projects will require serious time commitments
l There will be three projects using Nachos
u Concurrency and synchronization
u Virtual memory
u File system
l You will work in groups of four on the projects
September 20, 2000 CSE 120 -- Lecture 1 -- Course Intro 19
10