Beruflich Dokumente
Kultur Dokumente
Slide 1-2
Introduction
Learn to design an OS
Even so, OS is pure overhead of real work
Application programs have the real value to
person who buys the computer
Slide 1-3
open()
malloc()
fork()
read-disk
start-printer
track-mouse
Application
Software
System
Software
Application
Software
System
Software
Application
Software
System
Software
Hardware
Hardware
Hardware
(b) Application
Programmer
View
(c) OS Programmer
View
Slide 1-4
System Software
Independent of individual applications, but
common to all of them
Examples
C library functions
A window system
A database management system
Resource management functions
The OS
Copyright 2004 Pearson Education, Inc.
Slide 1-5
System Software
Software
SoftwareAPI
API
Command
Command
Line
Line
Interpreter
Interpreter
Compiler
Compiler
Loader
Loader
Libraries
Libraries
Libraries
Libraries
Libraries
Libraries
Database
Database
Management
Management
System
System
Window
Window
System
System
OS
OS
Hardware
Copyright 2004 Pearson Education, Inc.
Slide 1-6
Human-Computer Interface
Application Software
API
System Software
(More Abstract Resources)
OS Interface
Trusted OS
(Abstract Resources)
Software-Hardware Interface
Hardware Resources
Copyright 2004 Pearson Education, Inc.
Slide 1-7
Slide 1-8
Resource Abstraction
Slide 1-9
Disk Abstractions
Slide 1-10
Application
Programmer
OS Programmer
load();
seek();
out();
void write() {
load();
seek()
out()
}
(b) write()
abstraction
int fprintf() {
...
write()
(c) fprintf()
abstraction
Abstract Resources
User Interface
Application
Abstract Resources (API)
Middleware
OS Resources (OS Interface)
OS
Hardware Resources
Copyright 2004 Pearson Education, Inc.
Slide 1-11
Abstract Machines
Slide 1-12
Abstract
Machines
Idea
Program
Program
Physical
Machine
Result
Result
Idea
Program
Program
Result
Result
Idea
Program
Program
Result
Result
Resource Sharing
Space- vs time-multiplexed sharing
To control sharing, must be able to isolate
resources
OS usually provides mechanism to isolate,
then selectively allows sharing
How to isolate resources
How to be sure that sharing is acceptable
Concurrency
Copyright 2004 Pearson Education, Inc.
Slide 1-13
The OS as a Conductor
Slide 1-14
Multiprogramming
Abstract
Machine Pi
Abstract
Machine Pj
Abstract
Machine Pk
OS Resource Sharing
PPi Memory
i Memory
PPk Memory
k Memory
Time-multiplexed
Physical Processor
PPj Memory
j Memory
Space-multiplexed
Physical Memory
Copyright 2004 Pearson Education, Inc.
Slide 1-15
Slide 1-16
Multiprogramming(2)
Technique for sharing the CPU among
runnable processes
Process may be blocked on I/O
Process may be blocked waiting for other
resource, including the CPU
Time-multiplexed CPU
Process 4
Space-multiplexed Memory
Slide 1-17
Wash
Vacuum
Inside
Wash
(b) The Parallel Car Wash
Copyright 2004 Pearson Education, Inc.
Dry
Slide 1-18
Dry
Slide 1-19
Multiprogramming Performance
Pis Total Execution Time, ti
0
ti
Time
PN
Time
OS Strategies
Batch processing
Timesharing
Personal computer & workstations
Process control & real-time
Network
Distributed
Small computers
Slide 1-20
Slide 1-21
Batch Processing
Job 19
Input Spooler
Input Spool
Copyright 2004 Pearson Education, Inc.
Job 3
Output Spooler
Output Spool
Batch Processing(2)
Slide 1-22
Uses multiprogramming
Job (file of OS commands) prepared offline
Batch of jobs given to OS at one time
OS processes jobs one-after-the-other
No human-computer interaction
OS optimizes resource utilization
Batch processing (as an option) still used
today
Slide 1-23
cc -g -c menu.c
cc -g -o driver driver.c menu.o
driver < test_data > test_out
lpr -PthePrinter test_out
tar cvf driver_test.tar menu.c driver.c test_data test_out
uuencode driver_test.tar driver_test.tar >driver_test.encode
Timesharing Systems
Abstract
Machines
Result
Physical
Machine
Command
Result
Command
Result
Command
Copyright 2004 Pearson Education, Inc.
Slide 1-24
Timesharing Systems(2)
Slide 1-25
Uses multiprogramming
Support interactive computing model
(Illusion of multiple consoles)
Different scheduling & memory allocation
strategies than batch
Tends to propagate processes
Considerable attention to resource isolation
(security & protection)
Tend to optimize response time
Copyright 2004 Pearson Education, Inc.
Personal Computers
CPU sharing among one persons processes
Power of computing for personal tasks
Graphics
Multimedia
Slide 1-26
Slide 1-27
Networks
LAN (Local Area Network) evolution
3Mbps (1975) 10 Mbps (1980) 100 Mbps
(1990) 1 Gbps (2000)
High speed communication means new way to do
computing
Shared files
Shared memory
Shared procedures/objects
???
Slide 1-28
Slide 1-29
Distributed OS
Wave of the future
App
App
App
App
App
App
Distributed OS
Small Computers
PDAs, STBs, embedded systems became
commercially significant
Have an OS, but
Not general purpose
Limited hardware resources
Different kinds of devices
Touch screen, no keyboard
Graffiti
Slide 1-30
Slide 1-31
Evolution of Modern OS
Timesharing
Memory Mgmt
Scheduling
Batch
Protection
Memory Mgmt
Protection
Scheduling
Files
Devices
Network OS
PC & Wkstation
System software
Human-Computer
Interface
Protocols
Real-Time
Scheduling
Small Computer
Modern OS
Client-Server Model
Network storage,
Resource management
Examples of Modern OS
UNIX variants (e.g. Linux) -- have evolved
since 1970
Windows NT/2K -- has evolved since 1989
(much more modern than UNIX
Win2K = WinNT, V5
Slide 1-32
Windows
WindowsNT/2000/XP
NT/2000/XP
Slide 1-33
Microsoft Windows NT
Heavily window-oriented
Foundation behavior is windowsindependent
We will focus on the foundation
Use only the MS-DOS prompt -- cmd.exe
OS API
NT Executive
NT Kernel
Copyright 2004 Pearson Education, Inc.
NT User Interface
and Graphics
Slide 1-34
Windows NT (cont)
Slide 1-35
VxWorks Organization
Applications
Applications
VxWorks
VxWorksRuntime
RuntimeSystem
System
VxWorks
VxWorksConfigurable
Configurable
Core
CoreOS
OSExtension
Extension
Wind
WindMicrokernel
Microkernel
Slide 1-36
Windows CE Organization
Shells and Applications
Win32 API (& Network Extensions)
Kernel
Object
Store
Network
Graphics,
and
Window Mgr,
Comm
and
Services
Event Mgr
Device Drivers
Slide 1-37