23
CHAPTER 2 OPERATING SYSTEM OVERVIEW 1

CHAPTER 2 OPERATING SYSTEM OVERVIEW 1. Operating System Operating System Definition A program that controls the execution of application programs and

Embed Size (px)

Citation preview

1

CHAPTER 2OPERATING SYSTEM OVERVIEW

2

Operating System

Operating System Definition

A program that controls the execution of application programs and acts as an interface between applications and hardware.

3

Layers of Computer System

4

Evolution of Operating Systems

Historical Timeline

Generation Period Operating System Genre

First Generation 1945 - 1955 Serial Processing (No Operating System)

Second Generation 1955 - 1965 Simple Batch OS

Third Generation 1965 - 1980 Multiprogramming OS

Fourth Generation 1980 - present Time-Sharing OS

5

Second Generation: Simple Batch OS

Simple Batch SystemsBatch jobs together.Program branches back to monitor when finished.Jobs read in via punched cards.Batch systems introduced to reduce wasted time in setting

up and running jobs.

6

Second Generation: Simple Batch OS (Cont’d)…………X

1. Bring cards to 1401.

2. Read cards to tape offline.

3. Put tape on 7094 which does computing.

4. Put tape on 1401 which prints output offline.

Second Generation: Simple Batch OS (Cont’d)…………XBatch Processing: is to batch jobs together.Uni-Programming: executing one job at a time until finished.

Processor must wait for I/O instruction to complete before proceeding to next instruction.

7

8

Third Generation: Multiprogramming OS……………XWhen one job needs to wait for I/O, the processor can

switch to the other job

9

Third Generation: Multiprogramming OS (Cont’d)………….X

10

Fourth Generation: Time-Sharing OSUses multiprogramming to handle multiple interactive

jobs.Processor time is shared among multiple users. In a time-sharing system, multiple users simultaneously

access the system through terminals.Nowadays,

A computer user can listen to audio using RealPlayer while coping some information from the internet using Google Chrome web browser to a MS WORD document.

All of this happens at the same time using time-sharing.

11

Services Provided by the Operating System

1) Program development2) Program execution 3) Access to I/O devices4) Controlled access to files 5) System Access6) Error detection and response7) Accounting8) Resource Allocation

12

Services Provided by the Operating System…………………X

1) Program development - Provide facilities like Editors and debuggers.

2) Program execution – system capability to load a program into memory and to run it.

3) Access to I/O devices - since user programs cannot execute I/O operations directly, the operating system must provide some means to perform I/O.

4) Controlled access to files - program capability to read, write, create, and delete files.

5) System Access - ensuring that all access to system resources is controlled.

13

Services Provided by the Operating System (Cont’d)…………X

6) Error detection and response - ensure correct computing by detecting errors in the CPU and memory hardware, in I/O devices, or in user programs.

Example:Internal and external hardware errors like Memory errors & Device failureSoftware errors like Arithmetic overflow & Access forbidden memory

locations

7) Accounting - keep track of and record which users use how much and what kinds of computer resources for account billing or for accumulating usage statistics & Monitor performance.

8) Resource Allocation - allocating resources to multiple users or multiple jobs running at the same time.

14

System ResourcesA resource, or system resource, is any physical or

virtual component of limited availability within a computer system.

Major resource typesCPU timeMemory SpaceHard disk spaceNetwork throughputElectrical powerExternal DevicesInput/output operations

The most significant resources are:

CPU Time&

Memory Space

15

Objectives of Resource ManagementThere are three objectives of resource management:

1) Fairness: give equal and fair access to resources.

2) Differential Responsiveness: discriminate among

different classes of jobs.

3) Efficiency: maximize throughput, minimize response

time, and accommodate as many processes as

possible.

16

Operating System as a Resource Manager

Operating System manages different resources in order to achieve the formerly-mentioned objectives of resource management.

The major management work as follows:1) Process Management

2) Main-Memory Management

3) File Management

4) I/O System Management

5) Secondary Management

17

(1) Process Management…..XA process is a program in execution. A process needs certain resources, including CPU time, memory, files, and I/O devices, to accomplish its task.

The operating system is responsible for the following activities in connection with process management.1) Process creation and deletion.

2) process suspension and resumption.

3) Provision of mechanisms for:process synchronizationprocess communication

18

(2) Main-Memory ManagementMemory is a large array of words or bytes, each with its

own address. It is a repository of quickly accessible data shared by the CPU and I/O devices.

Main memory is a volatile storage device. It loses its contents in the case of system failure.

The operating system is responsible for the following activities in connections with memory management:1) Keep track of which parts of memory are currently being used

and by whom.

2) Decide which processes to load when memory space becomes available.

3) Allocate and deallocate memory space as needed.

19

(3) File Management

A file is a collection of related information defined by its creator. Commonly, files represent programs (both source and object forms) and data.

The operating system is responsible for the following activities in connections with file management:1) File creation and deletion.

2) Directory creation and deletion.

3) Support of primitives for manipulating files and directories.

4) Mapping files onto secondary storage.

5) File backup on stable (nonvolatile) storage media.

20

(4) I/O System Management….X

The I/O system consists of:

1) A buffer-caching system

2) A general device-driver interface

3) Drivers for specific hardware devices

21

(5) Secondary-Storage Management

Since main memory (primary storage) is volatile and too small to accommodate all data and programs permanently, the computer system must provide secondary storage to back up main memory.

Most modern computer systems use disks as the principle on-line storage medium, for both programs and data.

The operating system is responsible for the following activities in connection with disk management:

1) Free space management

2) Storage allocation

3) Disk scheduling

22

KernelPortion of operating system that is in main memory.Contains most frequently used functions.Also called the nucleus.

23

ProcessA program in execution.An instance of a program running on a computer.The entity that can be assigned to and executed on a

processor.A process consists of three components:

1) An executable program.

2) Associated data needed by the program.

3) Execution context of the program.All information the operating system needs to manage the process.