WEEK 1
COURSE INTRODUCTIONINTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM STRUCTURES
Operating SystemsCS3013 / CS502
Agenda
Course Introduction
Introduction to Operating System
Operating System Concepts
Operating System Structures
2
Course Information
Website http://nile.wpi.edu/~clee01/teaching/cs3013/
6:00-9:50pm class on Mondays 7 weeks for CS3013, 10 weeks for CS502
Office Hours TBD
Textbook Silberschatz, Galvin, and Gagne, Operating Systems
Concepts, Seventh Edition, John Wiley and Sons, 2005.
3
Why an Operating Systems Course?4
WPI CS requirement “Core area” for both undergrads and grads
Understanding of inner workings of “systems”
Combines CS concepts Algorithms, languages, data structures, hardware System design with tradeoffs
Better use of the computer
Prerequisites5
C/C++ Programming
Data Structures
Computer Organization
Unix/Linux user experience and access
Homework, Projects and Exams6
Homework Designed to get you ready for exam Review ideas taught in class
Projects 2 for CS3013 and 3 for CS502 Implementation in Unix environment
Exams 2 for CS3013 and 3 for CS502 Closed book, Closed notes
Grading7
Grading Homework – 10% Projects – 30% Exams – 60%
WPI Academic Honesty Policy http://www.wpi.edu/Pubs/Policies/Honesty/policy.html
Late Policy – 25% per day Contact Professor for extenuating circumstances
8
Questions?
Professor Background
Choong-Soo Lee PhD Candidate in Computer Science Department
Interest in Systems Area Operating Systems Network Performance Multimedia Performance
9
Student Background
Basic Information Name Class (freshman, sophomore, …) Major (CS, EE, …)
C ExperienceCS Courses TakenLinux ExperienceOperating System(s)
10
Agenda11
Objectives12
Identify operating systems
Explain the major OS issues
Describe the history of OS
Explain OS concepts
Identify services provided by OS
Describe different types of OS structures
Class Discussion13
What operating systems do you know?
What is an operating system?
What do you like/dislike about OS(es) you know?
Components of a Computer System14
Program Interface
User Programs
OS Interface
Operating System
Humans
Hardware Interface/Privileged Instructions
CPU/Memory/Disk/etc
Functions of Operating System15
Beautification Principle Hide the details of the physical machine and provide a
more pleasant virtual machine
Resource Principle Allocate resources to processes
Major OS Issues16
OS History17
Single program execution No OS Assembly or lower level language
Batch (Spooling) Introduced notion of interrupts
Multiprogramming Illusion of executing several programs simultaneously Introduced notion of process
Distributed and Network Operating SystemsSpecialized Operating Systems
OS History - Unix and Linux18
Unix Descendant of MULTICS First “C” version in 1973 Posix (1981) defines standard Unix system calls
Linux Open Source 1991, v.01 by Linus Torvalds for 80386 processor
Proper Unix process support
OS History – Linux19
1994, v1.0 Enhanced file system More devices, dynamic kernel modules
1995, v1.2 More hardware support
1996, v2.0 Multiple architectures, multiple processors Threads, memory management
Today, v2.6 0.64% by Net Applications 5.2 million source lines of code (according to
wikipedia)
OS History - Windows20
1988, v1 Win32 API
1990, v3.1 Server and Workstation versions
1996, v4 (Windows 95) Win95 Interface Graphics to Kernel
OS History - Windows21
2000, v5 (Windows 2000) Micro-kernel Multi-user (with terminal services) 4 versions
2005, Windows XP 4 versions: Home, Professional, Media Center, Tablet
2007, Windows Vista 5 versions: Ultimate, Home Premium, Home Basic,
Business, Enterprise
2009?, Windows 7
OS History - Windows22
Today 91.65% by Net Applications Aiming at robust, server market Intel x86 only Lines of code (according to wikipedia)
Windows NT 4.0 : 11-12 million Windows 2000 : more than 29 million Windows XP : 40 million Windows Vista Beta 2 : 50 million
Objectives23
Identify operating systems
Explain the major OS issues
Describe the history of OS
Explain OS concepts
Identify services provided by OS
Describe different types of OS structures
Agenda24
Operating System Concepts25
Processes
Memory Management
Input/Output
Files
System Calls
Process26
Program vs. Process Program : a set of data and code that manipulate it Process : a program in execution
States of a Process Running, Waiting, Ready, etc.
Process “Tree”
Memory Management27
One chunk of physical memory
Shared by all processes
32 bit architecture 232 bytes 4GB
Process 1
Process 2
Process 3Process 4
???
Input/Output28
OS manages resources including other devices
Significant fraction of codeWant to be simple to use
System Bus
CPUDisk
ControllerPrinter
ControllerMemory
Files29
Store data on diskDirectory “Tree”Working DirectoryProtection bitsAbstraction of I/O devicePipe
root
cs1101cs1101
classes jobs
microsoft cisco
System Calls30
Way processes communicate with OS
OS specific
POSIX (1980s) Portable Operating System Interface
Shells31
User’s interface to OS
Simple commands “cd”, “cat”, “top”
Modifiers ‘&’, ‘|’, ‘>’
Agenda32
Services Provided by OS33
User InterfaceProgram ExecutionI/O OperationsFile-system ManipulationCommunicationsError DetectionResource AllocationAccountingProtection and Security
User Interface34
Command Interpreter Included in the kernel, or
External Program Shells
bash, csh, tcsh, etc.
Provides some basic functionality
User Interface35
Graphical User Interface 1970s, Xerox PARC Research Facility
1980s, Popular by Apple Macintosh
Windows 1.0
Unix Desktop Environments
User Interface36
Graphical User Interface
Simple Systems37
Started small and grew, no hardware supportExample
MS-DOS, Embedded Systems
MS-DOS Drivers
ROM - BIOS Device Drivers
Resident System Programming
Application Programming
Simple Systems38
Example Linux
With Modules
Terminal Device Memory
Abstract layersCan only talk to lower layers
Layer NUser interface
.
.
.
Layer 1
Layered Systems39
Layer 0 Hardwar
e
Microkernel40
Minimal Functions in MicrokernelProvide communication facility between
applications and servicesExample
Mach Tru64 Unix, QNX
Kernel
User Process File ServerMemory Server
Virtual Machine41
Abstract the hardware of a single computer into several different execution environments
Example: IBM VM/370 VMWare
Hardware
Virtual Machine
Operating System Operating System Operating System
ProcessProcessProcess
Virtual Machine42
Example Java Virtual Machine
Hardware
Operating System
Java VM Process Process
Java OS
Java Program
Objectives43
Identify operating systems
Explain the major OS issues
Describe the history of OS
Explain OS concepts
Identify services provided by OS
Describe different types of OS structures