Operating Systems: Basic Concepts and History: What Is An Operating System?
Operating Systems: Basic Concepts and History: What Is An Operating System?
Key questions:
Why is the application interface defined the way it is?
Should we push more functionality into applications, the OS, or
the hardware?
What are the tradeoffs between programmability, complexity,
and flexibility?
1 2
Service provider
Provide standard facilities Convenience
File system
v
Provide a high-level abstraction of physical resources
v Standard libraries
v Window system Enable the construction of more complex software systems
…
v
Enable portable code
Coordinator: three aspects
Security: prevent jobs from interfering with each other
Communication: enable jobs to interact with each other
Efficiency
Resource management: facilitate sharing of resources across Share limited or expensive physical resources
jobs
Provide protection
Examples
Single-function devices (embedded controllers, Nintendo, …)
v OS provides a collection of standard services
Multi-function/application devices (workstations and servers)
v OS manages application interactions
3 4
Evolution of Operating Systems History of Operating Systems: Phases
Why do operating systems change? Phase 1: Hardware is expensive, humans are cheap
Key functions: hardware abstraction and coordination
User at console: single-user systems
Principle: Design tradeoffs change as technology changes
Batching systems
Underlying technology has changed immensely over the past two decades !!
Multi-programming systems
Comparing computing systems from 1981 and 2000
Batching v. sequential execution of jobs Operating system = loader + sequencer + output processor
Operating System
Card Reader: Read
Read Batch
Batch 11 Batch
Batch 22 Batch
Batch 33
Input Output
9 10
Keep several jobs in memory and multiplex CPU Keep several jobs in memory and multiplex CPU
between jobs between jobs
program PP
program Simple, “synchronous” input: Program 1 OS
I/O
begin Device
begin What to do while we wait
User Program n :: User Program n main{
Read(var) for the I/O device?
Read(var)
:: read{
...
...
k: read()
end PP
end
User Program 2 User Program 2 startIO()
waitIO()
system call Read
system call Read()()
User Program 1 begin
begin User Program 1
StartIO(input device)
StartIO(input device) endio()
“System Software” WaitIO(interrupt)
WaitIO(interrupt) “System Software” interrupt
EndIO(input
EndIO(inputdevice)
device) k+1:
:: }
Operating System Operating System
end Read
end Read
}
11 12
Multiprogramming (‘65-‘80) History of Operating Systems: Phases
Keep several jobs in memory and multiplex CPU Phase 1: Hardware is expensive, humans are cheap
between jobs User at console: single-user systems
Batching systems
I/O
Program 1 OS Program 2 Device Multi-programming systems
User Program n main{
Phase 2: Hardware is cheap, humans are expensive
read{
...
k: read() Time sharing: Users use cheap terminals and share servers
User Program 2 startIO()
main{
schedule() Phase 3: Hardware is very cheap, humans are very expensive
}
User Program 1 Personal computing: One system per user
endio{
“System Software” interrupt Distributed computing: lots of systems per user
k+1: schedule()
}
Operating System Phase 4: Richer services
} Real-time operating systems
13 14
A timer interrupt is used to multiplex CPU among Phase 1: Hardware is expensive, humans are cheap
User at console: single-user systems
jobs
Program 1 OS Program 2 Batching systems
main{ Multi-programming systems
User Program n
timer Phase 2: Hardware is cheap, humans are expensive
...
interrupt
k: schedule{ Time sharing: Users use cheap terminals and share servers
main{
User Program 2 }
Phase 3: Hardware is very cheap, humans are very expensive
timer
User Program 1 interrupt Personal computing: One system per user
schedule{
“System Software” Distributed computing: lots of systems per user
k+1: }
Operating System timer Phase 4: Richer services
interrupt
schedule{ Real-time operating systems
15 16
Operating Systems for PCs Distributed Operating Systems
User
User User
User
Evolution Program
Program Program
Program
OS
OS OS file
file system
system
Initially: OS as a simple service provider process process name
name services
services
process process management
management
(simple libraries) management
management memory
memory management
management mail
mail services
services
NetworkLAN/WAN
17 18
Phase 1: Hardware is expensive, humans are cheap A system with a dual notion of correctness
User at console: single-user systems Logical correctness — “it does the right thing”
Batching systems
Temporal correctness — “it does it on time”
Multi-programming systems
Phase 2: Hardware is cheap, humans are expensive A system wherein predictability is more important
Time sharing: Users use cheap terminals and share servers than performance
Example: Digital video playout
Phase 3: Hardware is very cheap, humans are very expensive
Personal computing: One system per user /* Main processing loop */
loop
Distributed computing: lots of systems per user data = read( network)
video_frame = decompress(data)
write( frame_buffer, video_frame)
Phase 4: Richer services end loop
Real-time operating systems
Timing constraint: Execute loop once every 33 ms.
19 20
Course Overview
Real-time Operating Systems: Issues
CPU scheduling
Dedicated system — real-time performance iff
time(loop) ≤ 33 ms Memory management
Real-time computing is a programming problem
(“Just buy a faster processor”) Secondary storage management & file systems
21 22