1 lecture 1: history of operating system operating system spring 2007 chapter 1 of textbook

22
1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

Post on 19-Dec-2015

221 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

1

Lecture 1: History of Operating System

Operating SystemSpring 2007

Chapter 1 of textbook

Page 2: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

2

Outline

What is Operating System OS as User/Computer Interface Services provided by OS OS as Resource Manager Evolution of OS

Page 3: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

3

What is Operating System? An operating system is a program that controls

the execution of application programs and acts as an interface between applications and the computer hardware.

Three objectives of operating systems: Convenience

Makes a computer more convenient to use Efficiency

Allows the computer system resources to be used in an efficient manner

Ability to evolve Permit the effective development, testing, and

introduction of new system functions without interfering with service

Page 4: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

4

OS as User/Computer Interface

EndUser

Programmer

Operating-System

Designer

Computer Hardware

Operating-System

Utilities

ApplicationPrograms

Page 5: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

5

Services provided by the operating systems Program Development

OS provides a variety of facilities and services, such as editors and debuggers, to assist the programmer in creating programs. Typically, these services are in the form of utility programs that, while not strictly part of the core of the OS, are supplied with the OS and are referred to as application program development tools.

Program Execution A number of tasks need to be performed before we

can execute a program. Instructions and data must be loaded into main memory. I/O devices and files must be initialized, and other resources must be prepared. The OS handles these duties for the user.

Page 6: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

6

Services provided by the operating systems (cont.) Access to I/O Devices

Each I/O devices requires its own peculiar set of instructions or control signals for operating. The OS provides a uniform interface that hides these details so that the programmer can access such devices using simple reads and writes.

Controlled Access to File The OS must provide protection mechanisms to

control access to the files for different users. Certain files can read only, or write only, or execute only. The OS must enforce the access mechanism.

System Access In the case of a shared or public system, the OS

control access to the system as a whole and to specific system resources.

Page 7: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

7

Services provided by the operating systems (cont.) Error Detection and Response

A variety of errors can occur while a computer system is running

Internal and External hardware errors such as memory error, device failure, or malfunctions.

Software error such as arithmetic overflow or underflow, attempt to access forbidden memory locations

Operating system cannot grant request of application Accounting

Collect usage statistic Monitor performance Used to anticipate future enhancement prepare billing information

Page 8: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

8

OS as Resource Manager

OSSoftware

processor

I/O controller

Programsanddata

I/O controller

I/O controller

processor…

.

.

.

Memory

Computer SystemI/O devices

printers

Keyboardsetc.

Auxiliarystoragedevices,

disks, tapes

Page 9: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

9

OS as Resource Manager (cont.)

The OS is responsible for controlling and managing the various resources of a computer system. The OS functions in the same way as an

ordinary computer software, i.e., it is a program or suite of programs executed by the processor

The OS frequently relinquishes control of the processor and must depend on the processor to allow it to regain control

The OS itself doesn’t do any “useful” work.

Page 10: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

10

Ease of Evolution of an OS

A major OS will evolve over time for a number of reasons: Hardware upgrades plus new types of

hardware New services demanded by users Fixer – fix holes in OS

Page 11: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

11

Evolution of OS (1)

1940-1950 No operating system Run as an open shop User signs up for certain time to use it

Page 12: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

12

Evolution of OS (2) - Simple Batch Systems

Interrupt Processing

Device Drivers

Job Sequencing

Control Language Interpreter

UserProgram

Area

Monitor

mid 1950s - mid 1960s User no longer has direct

access to the machine Submit the job to an

operator who batches the jobs together sequentially and places the entire batch on the input device

Often jobs of a similar nature can be bundled together to further increase economy

Page 13: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

13

Evolution of OS (2) - Simple Batch Systems (cont.)

Job Control Language (JCL) Special type of programming language Provide instruction to the monitor

$JOB user_spec ; identify the user for accounting purposes$FORTRAN ; load the FORTRAN compiler source program cards $LOAD ; load the compiled program $RUN ; run the program data cards $EOJ ; end of job

$JOB user_spec ; identify a new user $LOAD application $RUN data $EOJ

Page 14: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

14

Evolution of OS (2) - Simple Batch Systems (cont.) Need additional hardware features to support

the batch OS: Memory Protection – protect the OS from being wiped

out Timer – prevent the job run infinitely Privileged Instruction

certain instruction can only be executed by OS, and not by user.

I/O could only be performed in monitor (supervisor) mode, CPU runs in supervisor mode or user mode

Interrupts early models did not have this capability. Later models have. Make more efficient use of resources

Note: Some memory is given to OS and some processor time is given to OS. But we are still better off because machine is a lot faster than human operation.

Page 15: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

15

Evolution of OS (3) - Multiprogrammed Batch Systems

1960s - present Several users are in

memory at the same time

Match I/O intensive job with CPU intensive job

Important to have Interrupt-Driven I/O or DMA to support multiprogrammed batch system.

Monitor (more like a operating system)

User program 1

User program 2

User program 3

User program 4

Page 16: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

16

Uniprogramming

Processor must wait for I/O instruction to complete before preceding

Page 17: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

17

Multiprogramming

When one job needs to wait for I/O, the processor can switch to the other job

Page 18: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

18

Multiprogramming

Page 19: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

19

Evolution of OS (4) - Time-Sharing Systems

1970s - present To support interactive computing In a time-sharing system, multiple users

simultaneously access the system through terminals, with the OS interleaving the execution of each user program in a short burst or quantum of computation.

Context Switching A job (now often called process) can get “switched in”

or “switched out”. OS should give the illusion for the process as if it exists

in the CPU continuously

Page 20: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

20

Batch Multiprogramming versus Time Sharing

Batch Multiprogramming Time Sharing

Principal objective Maximize processor use Minimize response time

Source of directives to operating system

Job control language commands provided with the job

Commands entered at the terminal

Page 21: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

21

Evolution of OS (5) Real-time computer

Execute programs that are guaranteed to have an upper bound on tasks that they carry out.

e.g. guided missile systems, medical monitoring equipment

Multiprocessor – have more than one CPU Shared memory multiprocessors

Access the same memory - memory access must be synchronized

Distributed memory multiprocessors Each CPU has its own associated memory – communication

between processors is often slow and complicated Networked/Distributed Systems – consist of multiple

computers Networked systems: users are aware of the different

computers that make up the system Distributed systems: multiple computers are transparent to

the user.

Page 22: 1 Lecture 1: History of Operating System Operating System Spring 2007 Chapter 1 of textbook

22

End of Lecture 1

Thank you!