Lecture 01 Introduction

Download Report

Transcript Lecture 01 Introduction

Lecture 01
Introduction
What is an Operating System?
The Evolution of Operating Systems
Course Outline
Fall 2000
M.B. Ibáñez
What is an Operating System?
• A program that acts as an intermediary
between a user of a computer and the
computer hardware.
• Operating system goals:
– Execute user programs
– Make solving user problems easier
– Allocate resources in a efficient and fair way
Fall 2000
M.B. Ibáñez
Abstract View of System Components
They want low cost and efficient services
user 1
user 2
user n
They want to have an easy life (don’t have to worry about speeds,
use of file instead of blocks, large memory, etc)
compiler
text editor
database system
Operating System
Hardware
Fall 2000
M.B. Ibáñez
lots of different components,
with different speds,
different protocols for communication
Services given by an
Operating System
• Efficient program execution
– Keeping all the devices busy
– Good throughput for the user
•
•
•
•
Access to I/O devices
Controlled access to system and files
Error detection and response
Accounting
Fall 2000
M.B. Ibáñez
Evolution of Operating Systems
Serial Processing
• From the late 1940s to the mid-1950s
• There was no Operating System
– These machines were run from a console, consisting of display
lights, toggle switches, some form of input device, and a printer
• Job scheduling
– A user used a sign-up sheet to reserve machine time.
• How to run a job?
– Load the compiler and source program into memory
– Save the object program
– Loading and linking together the object program and common
Fall 2000 functions
M.B. Ibáñez
Evolution of Operating Systems
Simple Batch Systems
• Mid-1950s
• The users did not interact directly with the computer
system. The operator would sort programs into batches
with similar requirements.
• The user prepared a job. A Monitor executed the job.
$JOB
$FTN
<FORTRAN instructions>
$LOAD
$RUN
<data>
$END
Fall 2000
M.B. Ibáñez
Memory Layout For a Resident
Monitor
Interrupt
Processing
Device
Drivers
Job
Sequencing
Control Language
Interpreter
Monitor
Boundary
User
Program
Area
Fall 2000
From Operating Systems.
Internals and Design Principles.
W. Stalling. Prentice Hall
M.B. Ibáñez
There are some hardware features
desirable
• Memory protection
the user program should not alter the monitor’s
area
• Timer
to prevent a single job from monopolizing the
system
• Privileged instructions
I/O instructions by example
Fall 2000
M.B. Ibáñez
Multiprogrammed Batch Systems
A
A
A
B
B
time
A
B
A
B
A
time
Fall 2000
M.B. Ibáñez
Effects of Multiprogramming
Uniprogramming Multiprogramming
Processor use
17%
33%
Memory use
30%
67%
Disk use
33%
67%
Printer use
33%
67%
Elapsed time
30 min.
15 min.
Throughput rate
6 jobs/hr
12 jobs/hr
Mean response time 18 min.
Fall 2000
M.B. Ibáñez
10 min.
From Operating Systems.
Internals and Design Principles.
W. Stalling. Prentice Hall
Time-sharing systems
• 1960s, they become common early 1970s
• Multiprogramming allows the processor to handle multiple
batch jobs at a time
– Main objective: Maximize processor use
• Multiprogramming can be used to handle multiple
interactive jobs: time -sharing
– Main objective: Minimize response time
• Processor time is shared among multiple users
• Multiple users simultaneously access the system through
terminals
Fall 2000
M.B. Ibáñez
Primitive Time-sharing
Operating System
Monitor
Monitor
Monitor
job 1
job 2
job2
free
job3
free
free
Fall 2000
M.B. Ibáñez
Monitor
job1
job3
free
New problems for the
Operating Systems
• Multiple jobs are in memory
– They must be protected from interfering with each
other
• Multiple interactive users
– The file system must be protected so that only
authorized users have access to a particular file
• The contention for resources, such as
printers and mass storage devices, must be
handled
Fall 2000
M.B. Ibáñez
Characteristics of Modern Operating Systems.
What forces a change?
Developments in hardware
New applications
• Multiprocessor machines
• Greatly increased machine
speed
• High-speed network
attachments
• Increasing size and variety
of memory storage
services
• Multimedia applications
• Internet and Web access
• client/server computing
Fall 2000
M.B. Ibáñez
Characteristics of Modern Operating Systems
Microkernel architecture
• A microkerner architecture assigns only a
few essential functions to the kernel, such
as
– Address spaces
– Interprocess communication
– Basic scheduling
• The microkernel approach simplifies
implementation, provides flexibility, and is
well suited to a distributed environment
Fall 2000
M.B. Ibáñez
Characteristics of Modern Operating Systems
Multithreading
• Multithreading
– technique in which a process, executing an application,
is divided into threads that can run simultaneously
• Thread
– dispatchable unit of work
– executes sequentially and is interruptable
• Process
– collection of one or more threads
Fall 2000
M.B. Ibáñez
Characteristics of Modern Operating Systems
Symmetric multiprocessing (SMP)
• Systems with multiple multiprocessors
– there are multiple processors
– these processors share same main memory and I/O facilities
– All processors can perform the same functions
• Advantages over uniprocessor architectures
–
–
–
–
Fall 2000
Performance
Availability
Incremental growth
Scaling
M.B. Ibáñez
Characteristics of Modern Operating Systems
Distributed operating systems
• provides the illusion of a single main
memory
• used for distributed file system
Fall 2000
M.B. Ibáñez
Outline of the Course
•
•
•
•
•
Processes
Memory
I/O devices
File systems
Protection and security
Fall 2000
M.B. Ibáñez