introductioncs-3013 c-term 20081 cs-3013, operating systems c-term 2008 hugh c. lauer adjunct...
TRANSCRIPT
IntroductionCS-3013 C-term 2008 1
CS-3013, Operating Systems C-term 2008
Hugh C. LauerAdjunct Professor
(Slides include materials from Operating System Concepts, 7th ed., by Silbershatz, Galvin, & Gagne and from Modern Operating Systems, 2nd ed., by Tanenbaum)
IntroductionCS-3013 C-term 2008 2
Outline for Today
• Logistics and Details of this Course
• Introductions
• Discussion – What is an OperatingSystem?
• Project Assignment• Virtual Machines
• Introduction to Concurrency
IntroductionCS-3013 C-term 2008 3
Why an Operating Systems course?
• WPI CS requirements• “Core area” for both grads and undergrads
• Understanding of inner workings of “systems”• Exposure to diversity of operating systems• OS-related assignments you may see in real life:–
– “Design and develop an operating system to do THIS” (not probable)
– “Select an operating system for an application that will do THAT” (probable)
– “Design and develop this application on THAT system to exploit its special features” (likely)
IntroductionCS-3013 C-term 2008 4
This Course
• Two 2-hour classes per week, 7 weeks• 8:00 AM to 9:50 AM• January 11 – February 26
• (Nearly) identical to first half of CS-502• First graduate course in Operating Systems
• Concentrated reading and project work
• Introducing the newly upgraded Fossil Lab
IntroductionCS-3013 C-term 2008 5
Textbook and Web
• Text Book:– (required) Operating Systems Concepts, 7th edition, by
Silberschatz, Galvin, and Gagne, John Wiley and Sons, 2005
– (required) Linux Kernel Design, 2nd edition, by Robert Love, Novell Press, 2005
– (supplemental) Modern Operating Systems, 2nd edition, by Andrew S. Tanenbaum, Prentice Hall, 2001
• Course Information:– http://www.cs.wpi.edu/~cs3013/c08/
IntroductionCS-3013 C-term 2008 6
Prerequisites
• Prerequisites:– C/C++ programming– Data structures– Computer Organization– Unix/Linux user experience and access
• Reading assignment– Silbershatz Chapters 1 and 2
• Especially §2.8 about virtual machines
IntroductionCS-3013 C-term 2008 7
More on Prerequisites
• No time to try to “pick up” C programming• Java-only programmers will find it challenging
• C++-only programmers may also find it challenging
• Time required• 15+ hours per week average, 7 weeks total
• Computing resources• Fossil Lab
• Room B17, Fuller
• ID card operates lock; separate login account and password
• Web-based Turnin system for projects
IntroductionCS-3013 C-term 2008 8
Schedule & Logistics
• Schedule– Atwater Kent – Room 223– 8:00 AM to 9:50 AM – One 5 minute break– 28 classes– One mid-term exam and one
final exam– One or more unannounced
quizzes
• 4 Programming Projects– 1-2 weeks each
• Mobile Phones, pagers and other similar devices OFF during class
• Avoid food and drink in class– If absolutely necessary, please
be QUIET and inconspicuous
• Office Hours– by appointment– or immediately after class
• Contacts– <Professor’s last name> @
cs.wpi.edu– Adjunct office phone:–
(508) 831-6470 (shared)
• Teaching assistants– Li, Feng – Fuller 317
Rick SkowyraJosh Nedelka (SA)
IntroductionCS-3013 C-term 2008 9
Exams and Quizzes
• Mid-term exam approx February 1• Final exam, February 26, 8:00 AM• Exam rules
– One hour– May include lecture material introduced earlier that
same class– Closed book, one 8½ x 11 sheet of prepared notes
(2 sides)– Bring calculator
• One or more unannounced quizzes– Closed book, no notes– Calculator may be useful
IntroductionCS-3013 C-term 2008 10
Grading
• Grading– Exams & quizzes – 40%
– Programming Projects – 40%
– Class participation and written homework – 20%
• Unless otherwise noted, assignments are to be completed individually, not groups
• Late Policy – 10% per day– But contact Professor for extenuating circumstances
• WPI Academic Honesty policy
IntroductionCS-3013 C-term 2008 11
Ground Rule #1
• There are no “stupid” questions.
• It is a waste of your time and the class’s time to proceed when you don’t understand the basic terms.
• If you don’t understand it, someone else probably doesn’t it, either.
IntroductionCS-3013 C-term 2008 12
Ground Rule #2
• Help each other to understand.
• Even if a project is specified as individual, ask your friends/colleagues about stuff you don’t understand.
• It is a waste of your time try to figure out some obscure detail on your own when there are lots of resources around.
IntroductionCS-3013 C-term 2008 13
Programming Projects
• Project work based on OpenSUSE Linux 10.3
• Each student will get a “virtual machine”• What is a virtual machine? (§2.8 in Silbershatz)
• Build, modify, install Linux kernel on your virtual machine
• Debug, analyze, crash
• Restore, try again
IntroductionCS-3013 C-term 2008 14
Fossil Lab(Free Open-Source Software Laboratory)
• Newly upgraded• 30 Dell 2.4 GHz Core Duo PCs, 2 gigabytes RAM
• One Fossil server, 340 gigabytes of user storage
• Gigabit local area network; isolated from campus
• Virtual Machines• Stored on Fossil server
• May be run on any Fossil PC– VMware Workstation
• May be suspended, resumed, restored, etc.
IntroductionCS-3013 C-term 2008 15
Fossil Lab (continued)
• This is the first class to use the newly upgraded Fossil Lab
• Expect teething troubles, miscues, etc.
• This is the first class to use virtual machines in the Fossil Lab
• Ditto
• However, we have used virtual machines for CS-502 for three terms
IntroductionCS-3013 C-term 2008 16
What is a Virtual Machine?
• An application that simulates a computer with enough fidelity and performance to mimic an actual hardware system
• Concept originated in 1960s, and has been used occasionally in large systems
• Established in mainstream of enterprise systems by VMware in early 2000s.
IntroductionCS-3013 C-term 2008 17
Definitions
• Host system:– The hardware and operating system that supports the virtualization application
• E.g., the Windows PC in the Fossil Lab
• E.g., a departmental server
• Guest system:– The virtual hardware and the operating system that is being simulated
• E.g., OpenSUSE Linux 10.3 for this course
IntroductionCS-3013 C-term 2008 18
Using a Virtual Machine
• Use VMware Workstation in Fossil Lab• Create a clone of master virtual machine
• P:\cs3013\c08\VirtualMachine
• May be suspended, resumed, moved to another PC, etc.
• Indistinguishable from real hardware• on network and display• in most behaviors
• Alternative• Run your virtual machine on your own PC using free VMware
Player or your own VMware Workstation license
IntroductionCS-3013 C-term 2008 19
Questions?
IntroductionCS-3013 C-term 2008 20
Outline for Today
• Logistics and Details of this Course
• Introductions
• Discussion – What is an OperatingSystem?
• Project Assignment• Virtual Machines
• Introduction to Concurrency
IntroductionCS-3013 C-term 2008 21
Instructor — Hugh C. LauerAdjunct Professor
• Ph. D. Carnegie-Mellon 1972-73– Dissertation “Correctness in Operating Systems”
• Lecturer: University of Newcastle upon Tyne, UK• Approximately 30 years in industry in USA• Research topics
– Operating Systems– Proofs of Correctness– Computer Architecture– Networks and Distributed Computing– Real-time networking– 3D Volume Rendering– Surgical Simulation and Navigation– …
IntroductionCS-3013 C-term 2008 22
Systems Experience
• IBM Corporation• University of Newcastle• Systems Development Corporation• Xerox Corporation (Palo Alto)• Software Arts, Inc.• Apollo Computer• Eastman Kodak Company• Mitsubishi Electric Research Labs (MERL)• Real-Time Visualization
• Founded and spun out from MERL• Acquired by TeraRecon, Inc.
• SensAble Technologies, Inc.• Dimensions Imaging, Inc. (new start-up)
IntroductionCS-3013 C-term 2008 23
VolumePro™
• Interactive volume rendering of 3D data such as• MRI scans
• CT scans
• Seismic scans
• Two generations of ASICs, boards, software• VolumePro 500 – 1999
• VolumePro 1000 – 2001
• CTO, Chief Architect of VolumePro 1000• 7.5-million gate, high-performance ASIC
• 109 Phong-illuminated samples per second
IntroductionCS-3013 C-term 2008 24
Sample images from VolumePro
IntroductionCS-3013 C-term 2008 25
Operating Systems I have known
• IBSYS (IBM 7090)
• OS/360 (IBM 360)
• TSS/360 (360 mod 67)
• Michigan Terminal System (MTS)
• CP/CMS & VM 370
• MULTICS (GE 645)
• Alto (Xerox PARC)
• Pilot (Xerox STAR)
• CP/M
• MACH
• Apollo DOMAIN
• Unix (System V & BSD)
• Apple Mac (v.1 – v.9)
• MS-DOS
• Windows NT, 2000, XP
• various embedded systems
• Linux
• …
IntroductionCS-3013 C-term 2008 26
Other
• Two seminal contributions to computer science
• Duality hypothesis for operating system structures (with Roger Needham)
• First realization of opaque types in type-safe programming languages (with Ed Satterthwaite)
• 21 US patents issued• Computer architecture• Software reliability• Networks• Computer graphics & volume rendering
IntroductionCS-3013 C-term 2008 27
Outline for Today
• Logistics and Details of this Course
• Introductions
• Discussion – What is an Operating System?
• Introduction to Concurrency
• Project Assignment
• Virtual Machines
• Term Project Assignment
IntroductionCS-3013 C-term 2008 28
Class Discussion
What is an Operating System?
(Laptops closed, please!)
IntroductionCS-3013 C-term 2008 29
What is an Operating System?
• Characteristics– Large, complex set of
programs
– Long-lived, evolutionary
– Worked on by many people over many years
• Functions– Creates abstractions
– Multiplexes concurrent activities
– Manages resources
– Mediates access to hardware devices
– Provides a variety of services to users and applications
– …
IntroductionCS-3013 C-term 2008 30
Definition – Abstraction
• The distillation of a complex mechanism into a simple, conceptual model
• User of abstraction does not need to worry about details
• Implementer of abstraction does not need to worry about how user will use it (within limits)
IntroductionCS-3013 C-term 2008 31
Abstraction
The most important word in this course!
IntroductionCS-3013 C-term 2008 32
What is an operating system? (cont’d)
• Abstractions:–– Processes, threads, and
concurrent computation
– Virtual memory. For managing memory
– Files. Persistent storage of information
– Sockets & connections for network communication
• Controls I/O & peripherals
• Implements security and accessibility
• Definition — Same as judicial definition of pornography
• “I cannot define it, but I sure can recognize one when I see it!”
IntroductionCS-3013 C-term 2008 33
What is an Operating System
Hardware Interfaces – Registers, etc.
OS Kernel
Prog. Tools Services UI/Shell
XYZ Office Media Player Business Appl.
CPU I/O Controllers
Traditional
OS
Practical
OS
IntroductionCS-3013 C-term 2008 34
Computer System Organization
IntroductionCS-3013 C-term 2008 35
Operating System Organization
Kernel
System Libraries (user space)
Utilities, tools, other stuff
IntroductionCS-3013 C-term 2008 36
Operating System Organization (continued)
Kernel
System Libraries (user space)
Utilities, tools, other stuff
Drivers & modules File Systems
IntroductionCS-3013 C-term 2008 37
Major OS Issues
• structure: how is the OS organized?• sharing: how are resources shared across users?• naming: how are resources named (by users or programs)?• security: how is the integrity of the OS and its resources ensured?• protection: how is one user/program protected from another?• performance: how do we make it all go fast?• reliability: what happens if something goes wrong – hardware or software• extensibility: can we add new features?• communication: how do programs exchange information• concurrency: how are parallel activities created and controlled?• scale: what happens as demands or resources increase?• persistence: how do you make data last longer than program executions?• distribution: how do multiple computers interact with each other?• accounting: how do we keep track of resource usage, and charge for it?
IntroductionCS-3013 C-term 2008 38
Operating Systems
• Large, complex programs• Typically
– Long-lived– Frequently extended and updated– Worked on by many developers– Used and, maybe abused by a variety of users with
varying expertise and expectations
• Essential to create an acceptable computing environment to create and execute other programs that achieve business or personal goals
IntroductionCS-3013 C-term 2008 39
Kinds of operating systems
• Stand-alone machines – no OS• Simple batch monitors• Concurrent I/O and programs• Time-sharing, multiple users, interactive• Servers, non-stop systems, transaction processing• PC’s, workstations• Multiple processor systems• Real-time systems• Embedded systems
IntroductionCS-3013 C-term 2008 40
Kinds of operating systems (1)
• Stand-alone machines – no OS– Manually scheduled
“jobs,” reset between jobs
– Early business computers
• E.g., IBM 1401/1460
– Early mini-computers• E.g., PDP1, PDP5,
PDP8, etc.
• Simple batch monitors– Simple “monitor
routine” switches between jobs
– Input loaded onto tape or other media off-line
– Output to tape is punched and/or printed off-line
– Typical university computing centers
• IBM 7090, Univac, etc.
IntroductionCS-3013 C-term 2008 41
Kinds of operating systems (2)
• Concurrent I/O and programs– SPOOL-ing (Simultaneous Peripheral Operation On
Line)• Allows direct input & output
– Multiple programs resident in memory at once• Keeps processor busy
– On-line file storage– Some support for terminals, telecommunications
– Early business computers• E.g., IBM 7070, IBM 360 & 370
– Scientific computing• E.g., Control Data 6600, IBM 360/91
IntroductionCS-3013 C-term 2008 42
Kinds of operating systems (3)
• Time-sharing, multiple users, interactive– Many concurrent users “logged on”– Interactive editing and computing– Self submission of batch jobs– Protection among users, protection among jobs– Fair allocation of resources
– All university computing centers since about 1970• E.g., MULTICS, IBM 360/67, DEC PDP-10, PDP-20
– Advanced minicomputers• DEC, Data General, Prime, etc.• Unix
IntroductionCS-3013 C-term 2008 43
Kinds of operating systems (4)
• Servers, non-stop systems, transaction processing– Banking, airline reservation
– Online databases
– Many very short “transactions”
– Tandem, Stratus, Sequoia
– Unix, Linux, Solaris, HP-UX
– Windows Server 2000, 2003
– Oracle, SAP (?)
IntroductionCS-3013 C-term 2008 44
Kinds of operating systems (5)
• PC’s, workstations– CP/M, DOS, MS-DOS
– Apollo Domain
– Unix, Solaris, HP-UX
– Mac OS
– Windows 95, 98, Me
– Windows 2000, XP
– Linux
• Multiple processor systems– Beowulf clusters
– Unix, Solaris, HP-UX, Linux server systems
IntroductionCS-3013 C-term 2008 45
Kinds of operating systems (6)
• Real-time systems– SAGE (North
American air defense)
– Process control (steel mills, refineries, etc.)
– Large and small; computers you never heard of
– VxWorks, etc.
• Embedded systems– Auto ignition
– Cell phone, PDA
– Appliances
– …
IntroductionCS-3013 C-term 2008 53
Four fundamental Abstractions
• Processes & threads• This course
• Virtual memory• This course
• Files & persistent storage• CS-4513, Distributed Systems
• Sockets & connections• CS-4514, Computer Networks
IntroductionCS-3013 C-term 2008 54
Break