Download CS-3013 Week 0:- Introduction

Document related concepts

Process management (computing) wikipedia , lookup

OS-tan wikipedia , lookup

Unix wikipedia , lookup

RSTS/E wikipedia , lookup

Linux adoption wikipedia , lookup

Smallfoot wikipedia , lookup

DNIX wikipedia , lookup

Copland (operating system) wikipedia , lookup

OS/2 wikipedia , lookup

Plan 9 from Bell Labs wikipedia , lookup

VS/9 wikipedia , lookup

Mobile operating system wikipedia , lookup

Berkeley Software Distribution wikipedia , lookup

Distributed operating system wikipedia , lookup

Spring (operating system) wikipedia , lookup

CP/M wikipedia , lookup

Unix security wikipedia , lookup

Security-focused operating system wikipedia , lookup

Transcript
CS-3013
Operating Systems
A-term 2008
(Slides include materials from Modern Operating Systems, 3rd ed., by Andrew Tanenbaum and from
Operating System Concepts, 7th ed., by Silbershatz, Galvin, & Gagne)
CS-3013 A-term 2008
Introduction
1
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 very likely)
– “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)
CS-3013 A-term 2008
Introduction
2
This Course
• Two 2-hour classes per week, 7 weeks
• 8:00 AM to 9:50 AM
• August 29 – October 14
• (Nearly) identical to first half of CS-502
• First graduate course in Operating Systems
• Concentrated reading and project work
• Project work inside Linux kernel
CS-3013 A-term 2008
Introduction
3
Textbook and Web
• Textbook:
– (required) Modern Operating Systems, 3rd
edition, by Andrew S. Tanenbaum, Pearson
Prentice-Hall, 2008
– (required) Linux Kernel Design, 2nd edition, by
Robert Love, Novell Press, 2005
• Course Information:
– http://www.cs.wpi.edu/~cs3013/a08/
CS-3013 A-term 2008
Introduction
4
Prerequisites
• Prerequisites:
– C/C++ programming
• Especially a low-level language such as C
– Data structures
– Computer Organization
– Unix/Linux user experience and access
• Reading assignment
– Tanenbaum Chapter 1
• Quiz on Chapter 1 Friday, September 5, 8:00 AM
CS-3013 A-term 2008
Introduction
5
Prerequisites
• Prerequisites:
–
–
–
–
C/C++ programming
Data structures
Computer Organization
Unix/Linux user experience and access
• Reading assignment
– Tanenbaum Chapter 1
• Quiz on Chapter 1 Friday, September 5, 8:00 AM
CS-3013 A-term 2008
Introduction
6
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
CS-3013 A-term 2008
Introduction
7
Schedule & Logistics
• Schedule
–
–
–
–
–
–
Fuller Labs – Room 320
8:00 AM to 9:50 AM
One 5 minute break
14 classes
One final exam
Several quizzes during the term,
possible unannounced.
• 4 Programming Projects
• Avoid food and drink in class
• Office Hours
– by appointment or immediately
after class
– Fridays noon–1:00PM
• Contacts
– <Professor’s last name> @
cs.wpi.edu
– Fuller 137:– (508) 831-5493
• Class e-mail lists
– 1week each except last one
• Mobile Phones, pagers and other
similar devices OFF during
class
CS-3013 A-term 2008
– cs3013-all or cs3013-staff @
same domain
• Teaching assistants
Introduction
– Li, Feng – Fuller 317
Thangam V. Seenivasan
Josh Nedelka (SA)
– Office hours in Fossil Lab
8
Textbook (Tanenbaum)
• This course covers in depth
• Chapter 2 – Processes, threads, and synchronization
• Chapter 3 – Virtual memory
• Chapter 5 – Input/Output
• In addition, you are responsible for
• Chapter 1 – Introduction
• Chapter 11 – Case Study: Windows Vista
• Both will be covered in quizzes or Final Exam
CS-3013 A-term 2008
Introduction
9
Exams and Quizzes
• Final exam, October 14, 8:00 AM
• Exam rules
– 1–1.5 hour
– May include lecture material introduced earlier that
same class
– Closed book, one 8½ x 11 sheet of prepared notes
(2 sides)
– Bring calculator
• Quizzes my announced or unannounced
– Closed book, no notes
– Calculator may be useful
CS-3013 A-term 2008
Introduction
10
Grading
• Grading
– Exams & quizzes – 40%
– Programming Projects – 40%
– Class participation – 20%
• Optional two-person teams on some project work
• Late Policy – 10% per day
– But contact Professor for extenuating circumstances
– Please note that Yom Kippur occurs one day before the
major project is due!
• WPI Academic Honesty policy
CS-3013 A-term 2008
Introduction
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.
CS-3013 A-term 2008
Introduction
12
Ground Rule #2
• Help each other!
• Even if a project or assignment 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.
• When you have the answer, write it in your own
words (or own coding style)
CS-3013 A-term 2008
Introduction
13
Programming Projects
• Project work based on OpenSUSE Linux
10.3
• Each student will get a “virtual machine”
• What is a virtual machine? (§1.7.5 and §8.3 in
Tanenbaum)
• Build, modify, install Linux kernel on your
virtual machine
• Debug, analyze, crash
• Restore, try again
CS-3013 A-term 2008
Introduction
14
Fossil Lab
(Free Open-Source Software Laboratory)
• Recently upgraded
• 30 Dell 2.4 GHz Core Duo PCs, 2 gigabytes RAM
• One Fossil server, 400+ 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.
CS-3013 A-term 2008
Introduction
15
Fossil Lab (continued)
• This is the second time for CS-3013 to use
the upgraded Fossil Lab
• Still a few teething troubles, etc.
• This is the second class to use virtual
machines in the Fossil Lab
• Ditto
• However, we have used virtual machines for CS-502
for three terms
CS-3013 A-term 2008
Introduction
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.
CS-3013 A-term 2008
Introduction
17
Virtual Machine 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
• E.g., your own PC
• Guest system:– The virtual hardware and
the operating system that is being simulated
• E.g., OpenSUSE Linux 10.3 for this course
CS-3013 A-term 2008
Introduction
18
Using a Virtual Machine
• Use VMware Workstation in Fossil Lab
• Create a clone of master virtual machine
• P:\cs3013\A-term 2008\Clonable SUSE Linux 10.3
(32-bit)
• 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
CS-3013 A-term 2008
Introduction
19
Project Textbook
• Preferred
– Robert Love, Linux Kernel Design, 2nd edition,
Novell Press, 2005
• Alternative
– Daniel Bovet & Marco Cesari, Understanding
the Linux Kernel, 3rd edition, O’Reilly Media,
2006
– This is denser and more encyclopedic; aimed at
professional Linux kernel developers
CS-3013 A-term 2008
Introduction
20
Questions?
CS-3013 A-term 2008
Introduction
21
Outline for Today
• Logistics and Details of this Course
• Introductions
• Discussion – What is an Operating
System?
• Project Assignment
• Virtual Machines
• Introduction to Concurrency
CS-3013 A-term 2008
Introduction
22
Instructor — Hugh C. Lauer
Half-time 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
…
CS-3013 A-term 2008
Introduction
23
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)
CS-3013 A-term 2008
Introduction
24
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
CS-3013 A-term 2008
Introduction
25
Sample images from VolumePro
CS-3013 A-term 2008
Introduction
26
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
CS-3013 A-term 2008
•
•
•
•
•
•
•
•
•
Introduction
MACH
Apollo DOMAIN
Unix (System V & BSD)
Apple Mac (v.1 – v.9)
MS-DOS
Windows NT, 2000, XP
various embedded systems
Linux
…
27
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
CS-3013 A-term 2008
Introduction
28
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
CS-3013 A-term 2008
Introduction
29
Class Discussion
What is an Operating System?
(Laptops closed, please!)
CS-3013 A-term 2008
Introduction
30
What is an Operating System?
• Characteristics
• Functions
– Large, complex set of
programs
– Long-lived,
evolutionary
– Worked on by many
people over many
years
CS-3013 A-term 2008
Introduction
– Creates abstractions
– Multiplexes concurrent
activities
– Manages resources
– Mediates access to
hardware devices
– Provides a variety of
services to users and
applications
– …
31
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)
CS-3013 A-term 2008
Introduction
32
Abstraction
The most important word in this
course!
CS-3013 A-term 2008
Introduction
33
What is an operating system? (cont’d)
• See §1.1 of Tanenbaum
• 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
CS-3013 A-term 2008
• Definition — Same as
judicial definition of
pornography
• “I cannot define it, but I
sure can recognize one
when I see it!”
Introduction
34
Operating Systems – a Study of Evolution
• Simple managing of time of expensive computers
• Managing concurrency between I/O and computation
… and users
… and applications
• Managing memory
• Managing files, communication, GUIs
• Creating abstractions for all of the above
• … and more!
CS-3013 A-term 2008
Introduction
35
What is an Operating System
XYZ Office
Prog. Tools
Media Player Business Appl.
Services
UI/Shell/GUI
Practical
OS Kernel
Traditional
OS
OS
Hardware Interfaces – Registers, etc.
CPU
CS-3013 A-term 2008
I/O Controllers
Introduction
36
Computer System Organization
CS-3013 A-term 2008
Introduction
37
Operating System Organization
Utilities, tools, other stuff
System Libraries (user space)
Kernel
CS-3013 A-term 2008
Introduction
38
Operating System Organization (continued)
Utilities, tools, other stuff
System Libraries (user space)
Kernel
Drivers & modules
CS-3013 A-term 2008
File Systems
Introduction
39
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?
CS-3013 A-term 2008
Introduction
40
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?
• Is user interface package part of operating system?
CS-3013 A-term 2008
Introduction
41
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
CS-3013 A-term 2008
Introduction
42
Kinds of operating systems
• See §1.4 of Tanenbaum – Operating System Zoo
–
–
–
–
–
–
–
–
–
–
Mainframe Operating Systems
Server Operating Systems
Multiprocessor Operating Systems
Personal Computer Operating Systems
Handheld Computer Operating Systems
Embedded Operating Systems
Sensor Node Operating Systems
Real-time Operating Systems
Smart-card Operating Systems
…
CS-3013 A-term 2008
Introduction
43
Two Important Operating Systems
• Linux — Chapter 10
• Windows — Chapter 11
• Spans PCs, servers, multiprocessors, etc.
CS-3013 A-term 2008
Introduction
44
OS History – Unix & Linux
• Unix
– Descendant of Multics
– First “C” version in 1973 (DEC PDP-11)
• Timesharing for < 10 users on 32K Memory
• Many Unix versions at Bell Labs – different goals
• Source code made available to Universities – BSD
– Posix (start 1981) defines standard Unix system
calls
– AT&T licensing!
CS-3013 A-term 2008
Introduction
45
OS History - Linux
• Open Source – Linux.org
• First Version 1991, Linus Torvalds, 80386
processor
– v.01, limited devices, no networking,
– with proper Unix process support!
• 1994, v1.0
– networking (Internet)
– enhanced file system
– many devices, dynamic kernel modules
CS-3013 A-term 2008
Introduction
46
OS History - Linux
• 1996, v2.0
– multiple architectures, multiple processors
– threads, memory management ….
• Gnome UI – introduced in 1999
• Recent
–
–
–
–
V2.6 – 3 million lines of code
7-10 million users
Growth by 25%/year through 2003
Growing use in business server market
• Note: development convention
– Odd numbered minor versions “development”
– Even numbered minor versions “stable”
CS-3013 A-term 2008
Introduction
47
OS History – Windows NT/2000/XP
• Key designer – David Cutler also designed
VAX/VMS
• 1988, v1 – Win32 API – “microkernel”
• 1990, v3.1– Server and Workstation versions
• 1996, v4.0
–
–
–
–
Win95 interface
Graphics to kernel
More NT licenses sold than all Unix combined
Microkernel de-emphasized
CS-3013 A-term 2008
Introduction
48
OS History – Windows NT/2000/XP
• Windows 2000 – NT5.0
– Multi-user (with terminal services)
– Professional - desktop
– Server and Advanced Server - Client-server application
servers
– Datacenter Server - Up to 32 processors, 64 GB RAM
• Windows XP
– Windows 2000 code base
– Revised UI
– EOL for DOS/Windows line
CS-3013 A-term 2008
Introduction
49
OS History – Windows NT/2000/XP
•
•
•
•
•
Microsoft has 80% to 90% of OS market
Wintel – Windows + X86
WinNT 4.x is 12 million lines of code
Win2000 is 18 million lines of code
Windows XP – approaching 108 lines of
code
• Windows Vista – early 2007
CS-3013 A-term 2008
Introduction
50
Windows Vista
• See Chapter 11 of Tanenbaum!
CS-3013 A-term 2008
Introduction
51
OS and Hardware
• OS mediates programs’ access to hardware
– Computation – CPU
– Storage – volatile (memory) and persistent
(disk)
– Networks – NIC, protocols
– I/O devices – sound cards, keyboards, displays
CS-3013 A-term 2008
Introduction
52
Abstraction
The most important word in this
course!
CS-3013 A-term 2008
Introduction
53
Four fundamental Abstractions
• Processes & threads
• This course (Tanenbaum, Chapter 2)
• Virtual memory
• This course (Tanenbaum, Chapter 3)
• Files & persistent storage
• CS-4513 Distributed Systems (Tanenbaum, Chapter 4)
• Sockets & connections
• CS-4514, Computer Networks
CS-3013 A-term 2008
Introduction
54
Break
CS-3013 A-term 2008
Introduction
55