1. 2 the evolution of operating systems : §the single processing machines of 1940’s and 1950’s...

23
1 1 6 OPEARTING SYSTEM S

Upload: iris-goodman

Post on 16-Dec-2015

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

116OPEARTING

SYSTEMS

Page 2: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

2

The Evolution of Operating Systems : The single processing machines of 1940’s and 1950’s were

not very flexible or efficient. The processing is divided into 3 parts: Batch Processing:The execution of jobs by collecting

them in a batch

- The jobs resides in mass storage waited for execution in a job queue

- The job queue is referred to term First-In-First-Out (FIFO)

-In early batch processing systems, each job was accompanied by a set of instruction explaining the steps require preparing the machine for that particular job.These instructions are called the Job Control Language(JCL)

Page 3: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

3

The Evolution of Operating Systems : Batch Processing:

User Domain

Machine Domain

Jobs,Program, Data, and Directions

Job Queue Job Execution

Results

FIFO

Page 4: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

4

The Evolution of Operating Systems : Interactive Processing:These systems allow the execution

of programs that carried on a dialogue with the user through remote terminals or workstations

- These interactive systems gave birth of the concept known as real-time processing , which refers to the requirement that the activities taking place in a machine must be coordinated with the activities in the machine’s environment

User Domain

Machine Domain

Program Execution

Program, Data, Directions, and Results

Page 5: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

5

The Evolution of Operating Systems :Time-Sharing : technique of dividing time into

intervals , or time slices, and then restricting the execution of a job(process) to only one time slice .

- At the end of each time slice, the current job is set aside and another is allowed to execute during the next time slice

- By rapidly shuffling of the jobs in this manner, the illusion of several jobs executing simultaneously is created

-Today, time-sharing is used in single-user systems as well as multi user systems, the former is called multitasking

P1P2P3

Time Slice

P1

Page 6: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

6

Multiprocessor Systems :The word multiprocessor refers to just one

computer contains several processorsCoupled computer systems is called a

networkThe concept of network refers to many

small computers connected via network in which users share resources(such as printing capabilities, software packages, data storage facilities, and information) scattered throughout the system

The Internet is an example of a network

Page 7: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

7

Operating System Architecture : To understand the architecture of a typical operating

system(O S), it is helpful to grasp the complete spectrum of software found within a typical computer system

We group pieces of software according to the following classification scheme:

Software

Application System

Utility Operating System

Shell Kernel

Page 8: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

8

O.S Architecture : Application Software (AS): Consists of the programs for performing

tasks particular to the machine’s utilization

- Examples of application software include spreadsheets, database systems, publishing systems, program development software , and games

System Software : performs those tasks that are common to computer systems in general.

- Provides the environment in which the A.S resides.

- Within the class of system software there two categories: Operating System (OS) Utility Software (US):

- Consists of Software units that extend the capabilities of OS

- The distinction between AS and US and between US and OS is often vague

Page 9: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

9

O.S Architecture : Consists of two parts: The Shell The Kernel

The Shell :

- The part of the OS that defines the interface between the operating system and its users

- The job of the shell is to communicate with the user, or users , of the machine. Modern shells perform this task by means of Graphical User Interface (GUI)

O.S User

User

User

Page 10: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

10

The Kernel :The internal part of OS, contains those software

components that perform the very basic functions required by the computer installation

The kernel consists of the following components: File Manager Device Drivers Memory Manager Scheduler Dispatcher

Page 11: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

11

Boot strapping (Booting) : The procedure performed by the machine each time it turned on The booting in special-purpose machines performed through the ROM

which contains the main part of OS In general-purpose machines, the ROM contains a short program

called the bootstrap , this program executed automatically when the machine is turned on which directs the CPU through the process of transferring material from a predetermined location in mass storage into the volatile area of main memory

Main Memory

Bootstrap ProgramROM

Volatile

Memory

Disk Storage

Operating System

Bootstrap Program

Operating System

Operating System

Page 12: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

12

Coordinating the Machine’s Activities :The Concept of a Process : The program is merely a static set of directions, while the process is

a dynamic activity whose properties change as time progresses A process encompasses the current status of the activity called the

process state, this state includes: The current position in the program being executed(the value of the

program counter) The value of other CPU registers The associated memory cells At different times during the execution of a program( at different

times in a process) different snapshots(different process states) will be observed

Page 13: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

13

Process Administration : The tasks associated with process coordination are handled by the scheduler

and dispatcher within the operating system’s kernel

The Scheduler : To keep track of all the processes, the scheduler maintains a block of

information in main memory called the process table Each time a new task is assigned to the machine, the scheduler creates a

process for that task by placing a new entry in the process table The entry contains such information as

- The memory area assigned to the process(obtained from the memory manager) , the priority of the process, and whether the process is ready or waiting

The Scheduler maintains this information as the process progresses. The process will shift back and forth between ready and waiting

The priority of the process changes as time passes The scheduler must remove the process from the process table when the

process is completed

Page 14: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

14

The Dispatcher : Ensures that the scheduled processes are actually executed In time-sharing system this task is accomplished by dividing time into

short segments, each called a time slice or quantum(typically about 50 ms)

Switching the CPU’s attention among the processes as each allowed to execute for no longer than one time slice process switch

Dispatcher initiates a timer circuit that will measure the next quantum At the end of the quantum the timer circuit generates a signal called

an interrupt

Process A

Process B

Process A

Process B

Process Switch

Process Switch Process

Switch

Interrupt Interrupt Interrupt Interrupt

Advancing Time

Page 15: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

15

The various units within an operating system normally execute as individual processes

To coordinate their activities, these processes must communicate with one another

To simplify this interprocess communication, the components of OS are often designed to conform to the client/server model

The Client/Server Model :

Client ServerRequests

Service

C S C

C S

C

S C

SC

Page 16: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

16

Handling Competition Among Processes :

A universal task among the components of OS’s kernel is the allocation of the machine’s resources to the processes in the system.

This allocation task may has several problems that can lead to system malfunctions unless they accounted for.

SemaphoresSemaphoresDeadlockDeadlock

Page 17: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

17

Semaphores :Semaphores :Consider the printer example where two users send

a file to the printerAccess allocation requires that the OS keeps track

whether the printer has been allocated. One approach is to use flag(Set + Clear)

Clear: means the printer is availableSet: means that the printer is busyThe OS clears the flag to begin, then it checks the

flag each time a request for printer access is made. If the flag is set the OS makes the request wait.

Two solutions Test-and-Set and Interrupt Enable and Disable

Page 18: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

18

Deadlock :Deadlock :Two processes are blocked from processing because

each is waiting for access to resources allocated to another. Like a printer waiting for tape drive while the tape drive is waiting for the printer

Analysis of deadlock has revealed that it cannot occur unless all three of the following conditions are satisfied:

There is a competition for non-sharable resources The resources are requested on a partial basis; that

is, having received some resources, a process will return later to request more

Once a resource has been allocated, it can not be forcibly retrieved

Page 19: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

19

Networks :Networks :Networks are classified as : Local Area Networks(LANs) and Wide Area Networks

(WANs) :

LAN: Normally consists of collection of computers in a single building or building complex

WAN: Links machines that may be on opposite sides of a city or the world, like satellite link

Closed Networks and Open Networks:

Closed Network:Network comprised of HW and SW from a single vendor

Open Network: Implemented as a conglomerate of products from different manufactures (e.g. Internet)

Topology of the network

Page 20: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

20

NetworksNetworks

Topology of the network: the pattern in which the machines are connected:

- Ring topology

- Bus topology

- Star topology

- Irregular topology Internet Internet addressing WWW

Page 21: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

21

Network Protocols :Controlling Transmission Privileges :

Computer

Computer

ComputerComputer

Computer Messages move in only one direction

“Communication over ring topology”

Page 22: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

22

The Layered Approach to Network Software :

Application Layer Application Layer

Transport Layer Transport Layer

Network Layer Network Layer

Link Layer Link Layer

Message’s Origin Message’s Destination

Internet Software Layers

Page 23: 1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is

23

The layered Approach to Network Software :

Application

Transport

Network

Link Network

Link

Link

Network

Link

Network

Transport

Application

A Path of a data unit through the Internet involving two intermediate machines