Documente Academic
Documente Profesional
Documente Cultură
Part I: Introduction
“I think that there is a world
market for about five
computers”
- Thomas J. Watson (1943)
2
Why Study Operating Systems?
3
Goals of This Course
4
What is an O/S?
•A layer of
abstraction between
the HW and SW
•A resource
coordinator
•Virtual machine
•Reactive system
5
Operating Systems: A Definition
6
Operating Systems Ease the Pain
7
Why are Operating Systems
Difficult to Create and Maintain?
Size
– Too big for one person; current systems have
millions of lines of code and involve 10-100 man
years to build
Lifetime
– Operating systems remain longer than the
programmers who originally wrote them. Code is
written and rewritten and original intent is forgotten
(Unix designed to be cute, small system - now
several volumes thick!)
8
Why are Operating Systems
Difficult to Create and Maintain?
Complexity
– The system must do difficult things -- deal with ugly
I/O devices, multiplexing/juggling act, handle errors
Multitasking
– Must do several things at once
General purpose
9
A Brief History: Early 1950’s,
Mainframes Rule!
Early systems
– No O/S! Programmer is also operator
– Large machines run from a console; programs loaded through
switches and card readers
Simple batch systems were the first real OS
– Setup time was a problem -> hire an operator
– Operator ran related jobs together
– O/S was a simple program stored in one part of memory
Loads a single job from card reader into memory
Transfers control from one job to the next
10
Offline Processing
On-line processing
12
Multiprogrammed Systems
13
Timesharing/Multitasking Systems
Timesharing supported
interactive use
– Each user feels as if
he/she has the entire
machine
– Tries to optimize
response time
– Based on time-slicing;
divide CPU equally
among others
14
Desktop Systems
15
Multiprocessor Systems
Also known as parallel systems or tightly-coupled
systems
Three main advantages
– Increased throughput (more CPUs = more work in less time)
– Economy of scale (saves money, CPUs share peripherals)
– Increased reliability (provides redundancy and fault tolerance)
Symmetric multiprocessing (SMP): All CPUs do the
same thing
Asymmetric multiprocessing: each CPU has specific
role (usually master-slave)
16
Distributed (Loosely-Coupled)
Systems
Facilitates use of geographically distributed computing resources
Supports communications between parts of a job or different jobs
Supports sharing of distributed resources, both hardware and
software
Client-server systems vs. Peer-to-peer systems
17
Clustered Systems
18
Real Time Systems
Used for specialized applications: subway systems, flight-control,
factories, power plants
Basic idea: O/S guarantees response to physical events will occur
within a fixed amount of time
Problem faced : Schedule activities so as to meet all time
constraints
Hard real time system
– Deadline is critical
– Typically used to control a device
Soft real time system
– Deadline is important but not critical
– Example : Video applications (Use in PC environment)
19
Handheld Systems
20
General Structure of an O/S
Resident Programs Non-resident Programs
KERNEL
21
An Example: MS-DOS Structure
22
How MS-DOS Programs are Loaded
in Main Memory
At System Start-up Running a Program
23
Operating System Components
Process Management
– Process: a program in execution
– Keeps track of each process and it’s state
– Create, delete, suspend, resume processes;
synchronize process communications,
handle deadlocks
– Possibly support threads (executable parts
of a process)
24
Operating System Components
25
Operating System Components
File Management
– Keeps tracks of available space on the system
– Maintains directory structure and hierarchy
– Supports file manipulation commands
– Keeps track of file information (inode, name,
timestamp)
I/O System Management
– Allows for a standard methodology for access of
each device
– Use of device drivers for modularity
26
Operating System Components
27
Operating System Components
Protection System
– Provide mechanism for controlling access to
programs, processes, or users
– Essential in multitasking and multiuser systems
Command Interpreter System
– GUI vs. Command Line Interface
– Redirection, Piping, and Parameter Passing
28
Operating Systems Architectures
Monolithic
Layered
Virtual Machine
Microkernel
29
Monolithic
Easy to implement
“The Big Mess” –
virtually no structure!
Kernel is one large
structure
Each procedure is visible
to every other procedure
Not used anymore
30
Layered
31
Virtual Machine
32
Microkernel
Used in Mac/OSF/NT
Takes out as much
functionality as possible
from kernel -- allows
modularity and portability
across platforms
Interactions between
processes involve the
kernel, thereby requiring
high efficiency in transfer
33