![Page 1: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/1.jpg)
1
Operating System Overview
![Page 2: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/2.jpg)
2
Today’s Objectives Explain the main purpose of operating systems and
describe milestones of OS evolution Explain fundamental machine concepts such as:
Instruction processing, Memory hierarchy, Interrupts, and I/O
Explain fundamental OS concepts such as: System calls, processes, synchronization, Files
Explain the POSIX standard (UNIX specification)
![Page 3: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/3.jpg)
3
Today’s Applications
Browser Second LifeYahoo
Chat ClientPop Mail
Application Software
Hardware Network
![Page 4: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/4.jpg)
4
Application Requirements
Browser Second LifeYahoo
Chat ClientPop Mail
Application Software
Hardware Network
Read/w
rite
Display
Store Send/receive
![Page 5: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/5.jpg)
5
Browser Second LifeYahoo
Chat ClientPop Mail
Application Software
Hardware Network
Read/w
rite
Display
StoreRead
/writ
eD
ispla
y
PrintStore
Send/receive
Send/receive
Application Requirements
![Page 6: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/6.jpg)
6
Browser Second LifeYahoo
Chat ClientPop Mail
Application Software
Hardware NetworkRead/w
rite
Display
StoreRead
/writ
eD
ispla
y
PrintStore
Send/receive
Send/receiveRead/w
rite
Display
Prin
tSto
re Send/receive
Application Requirements
![Page 7: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/7.jpg)
7
Browser Second LifeYahoo
Chat ClientPop Mail
Application Software
Hardware NetworkRead/w
rite
Display
StoreRead
/writ
eD
ispla
y
PrintStore
Send/receive
Send/receiveRead/w
rite
Display
Prin
tSto
re Send/receive
Send/re
ceiv
e
Display
Stor
e
Prin
tRead/write
Application Requirements
![Page 8: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/8.jpg)
8
Delegate Common Functions?
Browser Second LifeYahoo
Chat ClientPop Mail
Application Software
Hardware NetworkRead/w
rite
Display
StoreRead
/writ
eD
ispla
y
PrintStore
Send/receive
Send/receiveRead/w
rite
Display
Prin
tSto
re Send/receive
Send/re
ceiv
e
Display
Stor
e
Prin
tRead/write
![Page 9: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/9.jpg)
9
Delegate Common Functions to an Operating System
Web Server Second LifeYahooChat
Pop Mail
Application Software
Operating System
NetworkHardware
Read/WriteStandardOutput
DeviceControl
FileSystem
Communication
![Page 10: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/10.jpg)
10
OS Exports a Virtual Machine Interface
Web Server Second LifeYahooChat
Pop Mail
Application Software
Operating System
NetworkHardware
Read/WriteStandardOutput
DeviceControl
FileSystem
Communication
Standard Operating System Interface (Virtual Machine)
![Page 11: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/11.jpg)
11
Increase Portability = Minimize Machine-Specific Code
Web Server Second LifeYahooChat
Pop Mail
Application Software
NetworkHardware
Machine specific part
Read/WriteStandardOutput
DeviceControl
FileSystem
Communication
Operating System (machine independent part)
Standard Operating System Interface (Virtual Machine)
![Page 12: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/12.jpg)
12
Web Server Second LifeYahooChat
Pop Mail
Application Software
NetworkHardware
Machine specific part
Read/WriteStandardOutput
DeviceControl
FileSystem
Communication
Operating System (machine independent part)
Standard Operating System Interface (Virtual Machine)
Port
ab
le
Increase Portability = Minimize Machine-Specific Code
![Page 13: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/13.jpg)
13
Web Server Second LifeYahooChat
Pop Mail
Application Software
Read/WriteStandardOutput
DeviceControl
FileSystem
Communication
Operating System (machine independent part)
Standard Operating System Interface (Virtual Machine)
Port
ab
le
OS Runs on Multiple Platforms while Presenting same Interface
![Page 14: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/14.jpg)
14
Web Server Second LifeYahooChat
Pop Mail
Application Software
NetworkHardware
Machine specific part
Read/WriteStandardOutput
DeviceControl
FileSystem
Communication
Operating System (machine independent part)
Standard Operating System Interface (Virtual Machine)
Port
ab
le
OS Runs on Multiple Platforms while Presenting same Interface
![Page 15: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/15.jpg)
15
POSIX – The UNIX Interface Standard
Web Server Second LifeYahooChat
Pop Mail
Application Software
NetworkHardware
Machine specific part
Read/WriteStandardOutput
DeviceControl
FileSystem
Communication
Operating System (machine independent part)
The POSIX Standard Specifies UNIX Interface
Port
ab
le
![Page 16: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/16.jpg)
16
A peek into Unix
Application
Portable OS Layer
Libraries
Machine-dependent layer
User space/level
Kernel space/level
• User/kernel modes are supported by hardware
•Some systems do not have clear user-kernel boundary
![Page 17: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/17.jpg)
17
Unix: Application
Application (E.g., emacs)
Portable OS Layer
Libraries
Machine-dependent layer
Written by programmerCompiled by programmerUses function calls
![Page 18: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/18.jpg)
18
Unix: Libraries
Application
Portable OS Layer
Libraries (e.g., stdio.h)
Machine-dependent layer
Provided pre-compiledDefined in headersInput to linker (compiler)Invoked like functionsMay be “resolved” when
program is loaded
![Page 19: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/19.jpg)
19
Typical Unix OS Structure
Application
Portable OS Layer
Libraries
Machine-dependent layer
system calls (read, open..)All “high-level” code
![Page 20: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/20.jpg)
20
Typical Unix OS Structure
Application
Portable OS Layer
Libraries
Machine-dependent layer
BootstrapSystem initializationInterrupt and exception I/O device driverMemory managementKernel/user mode
switchingProcessor management
![Page 21: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/21.jpg)
21
Summary:What is an Operating System?
It is an extended machine Hides the messy details which must be performed Presents user with a virtual machine, easier to use
It is a resource manager Each program gets time with the resource Each program gets space on the resource
![Page 22: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/22.jpg)
22
History of Operating Systems
Early systems bring cards to 1401 read cards to tape put tape on 7094 which does computing put tape on 1401 which prints output
Batch Multiprogramming Time sharing Personal
![Page 23: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/23.jpg)
23
History of Operating Systems
Structure of a typical job – 2nd generation
![Page 24: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/24.jpg)
24
History of Operating Systems
Multiprogramming/timesharing system – three jobs in memory – 3rd generation
![Page 25: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/25.jpg)
25
History of Operating Systems
Multiprogramming/timesharing system – three jobs in memory – 3rd generation
Memory Management
Process Management
![Page 26: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/26.jpg)
26
History of Computer Generations
First generation 1945 – 1955 vacuum tubes, plug boards
Second generation 1955 - 1965 transistors, batch systems
Third generation 1965 – 1980 ICs and multiprogramming
Fourth generation 1980 – present personal computers
![Page 27: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/27.jpg)
27
Computer Hardware Review
Components of a simple personal computerBus
![Page 28: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/28.jpg)
28
Large Pentium system
![Page 29: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/29.jpg)
29
Computer Hardware Review
Components of a simple personal computer
Bus
CPU
![Page 30: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/30.jpg)
30
CPU Fetch instruction from code memory Fetch operands from data memory Perform operation (and store result) Go to next instruction
![Page 31: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/31.jpg)
31
CPU Registers Fetch instruction from code memory Fetch operands from data memory Perform operation (and store result) Go to next instruction
Note: CPU must maintain certain state Current instructions to fetch (program
counter) Location of code memory segment Location of data memory segment
![Page 32: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/32.jpg)
32
CPU Register Examples Hold instruction operands Point to start of
Code segment Data segment Stack segment
Point to current position of Instruction pointer Stack pointer
![Page 33: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/33.jpg)
33
CPU Register Examples Hold instruction operands Point to start of
Code segment Data segment Stack segment
Point to current position of Instruction pointer Stack pointer
Why stack?
![Page 34: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/34.jpg)
34
Code Layout for Process
Processes have three segments: text, data, stack
![Page 35: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/35.jpg)
35
Code Layout for Process
Processes have three segments: text, data, stack
Where is this stored?
![Page 36: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/36.jpg)
36
Computer Hardware Review
Components of a simple personal computer
BusCPU Memory
![Page 37: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/37.jpg)
37
Memory Hierarchy
Typical memory hierarchy– numbers shown are rough approximations
![Page 38: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/38.jpg)
38
Computer Hardware Review
Components of a simple personal computer
BusCPU Memory
I/ODevices
![Page 39: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/39.jpg)
39
I/O Interrupt Mechanism
(a)
a) Steps in starting an I/O device and getting interrupt
b) How the CPU is interrupted
(b)
![Page 40: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/40.jpg)
40
Computer Hardware ReviewExample I/O Device: Disk
Structure of a disk drive
![Page 41: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/41.jpg)
41
Operating System Review:Processes
A process tree A created two child processes, B and C B created three child processes, D, E, and F
![Page 42: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/42.jpg)
42
Context Switching
How would you switch CPU execution from one process to another?
![Page 43: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/43.jpg)
43
Semaphores
Control access to resources
![Page 44: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/44.jpg)
44
Shared Resources, Conflicts, and Deadlocks
(a) A potential deadlock. (b) an actual deadlock.
![Page 45: 1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental](https://reader030.vdocuments.pub/reader030/viewer/2022013108/56649e8e5503460f94b921d6/html5/thumbnails/45.jpg)
45
Inter-process Communication
Two processes connected by a pipe