Operating Systems

Download Report

Transcript Operating Systems

Operating Systems
Purpose
•
•
•
•
•
Interface between user and CPU
Interface between user and HW devices
Controls system
Runs programs
Manages multi-user environment
Functions
•
•
•
•
•
•
•
Booting
Program management
Disk management
Memory management
Device management
User inference (Command Line & GUI)
Security
Operating System Types
• Single User/Single task
• Single User/Multitask
– foreground/background
•
•
•
•
Multi-user
Multiprocessor
Network OS
Embedded system
Categories of OS
Network and Embedded
CPU Processing
•
•
•
•
Read Instruction
Get data, wait for data
Process instruction
Write data
CPU
DISK
MEMORY
CPU I/O Processing
Spooling
Video Card
Memory
Single Processor
Program
1
Processor
1
Program
2
Waiting
Program
3
Waiting
Program
4
Waiting
Instruction
Result
1
Output
Multiprocessing
Program
1
Processor
1
Result
1
Program
2
Processor
2
Result
2
Program
3
Processor
3
Result
3
Program
4
Processor
4
Result
4
• New Sun system 160 CPUs
• 500 Gigabytes of memory
Parallel Processing
Processor
1
Processor
2
Program
1
Processor
3
Result
1
Processor
4
Instruction
Output
Virtual Memory Management
• Uses disk space to increase memory size
• Each program gets pages in memory to store
CPU instructions and data
• If program is waiting for data, it may be paged
to disk (Swap file on PC)
• If too many programs are idle then system is
Paging
• If system is spending more time managing
paging then it is Thrashing
Spooling
• Print queues
CPU Bound
•Many jobs
•Complex calculations
•Heavy program mgt.
•CPU 100% busy
•Jobs back up
•Disks Idle
I/O Bound
•Many jobs
•Excess disk writing
•CPU under 50% busy
•Paging
•Thrashing
Disk Defragmentation