Operating system introduction to operating system

22
CHAPTER 1 Introduction To Operating System Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Transcript of Operating system introduction to operating system

Page 1: Operating system   introduction to operating system

CHAPTER 1Introduction

ToOperating System

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 2: Operating system   introduction to operating system

Introduction to Operating SystemIntroductionWhat is a Computer?

Most important software – Operating System

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 3: Operating system   introduction to operating system

Introduction to Operating SystemOperating System ConceptsDefinition :

-> Manages the computer hardware and

-> Provides user program with simpler interface to the hardware

Goal :

-> Convenience for users; and

-> Efficient operation of the computer system

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 4: Operating system   introduction to operating system

Introduction to Operating SystemComponents of the Computer System

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 5: Operating system   introduction to operating system

Introduction to Operating SystemComponents of the Computer SystemHardware : physical devices – processor,

keyboard, mouse, monitor, etc.

Operating System : manages hardware and masks the complex details of hardware from the user

provides simple interface between application programs and hardware

Application Programs : particular tasks, different kinds of functionalities provided by OS

airline reservation system, banking system

Users : interact with the system by using application programs to perform particular tasks

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 6: Operating system   introduction to operating system

Introduction to Operating SystemOperating System : from user view

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

A top down view

Considered as an extended machine

OS as a machine – easier to program

Hides all details from user. Provides a layer between user and hardware

Need not to concern about the complexities of hardware

Simply uses the functionalities provided by the OS, such as system calls, to make his job done

Goal : User Convenience

Page 7: Operating system   introduction to operating system

Introduction to Operating SystemOperating System : from system viewA bottom-up view

Considered as a Resource Manager

OS manages all the resources such as CPU, memory, I/O devices

Resources are shared in one of two ways :

(i) By multiplexing them in Time :

Each user takes a turn to use the resource (CPU)

(ii) By multiplexing them in Space :

Each user gets part of the resource (memory)

Primary goal : EfficiencyJaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 8: Operating system   introduction to operating system

Introduction to Operating SystemHistory of Operating System Charles Babbage – a true digital computer

1. The First Generation (1945 - 1955)

Hardware : vacuum tubes and plug boards

Neumann and others succeeded in building Calculating engine

No OS, no programming languages

Introduction of Punch Cards

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 9: Operating system   introduction to operating system

Introduction to Operating SystemHistory of Operating System 2. The Second Generation (1955 - 1965)

Hardware : transistors

Clear separation between designers, builders, operators, programmers and maintenance personnel

Machines were called mainframes

Batch Operating System took birth

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 10: Operating system   introduction to operating system

Introduction to Operating SystemHistory of Operating System3. The Third Generation (1965 - 1980)

Hardware : Integrated Circuits

Multiprogramming OS and variations of it such as Time sharing, Interactive, Multitasking OS came in picture

SPOOLing (Simultaneous Peripheral Operation On Line) began during this time duration

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 11: Operating system   introduction to operating system

Introduction to Operating SystemHistory of Operating System4. The Fourth Generation (1980 - present)

Hardware : LSI (Large Scale Integration) Circuits

Personal Computers evolved

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 12: Operating system   introduction to operating system

Introduction to Operating SystemTypes of Operating System 1. Batch Operating System

input devices : card readers, tap drives

output devices : line printers, punch cards, tap drives

OS was very simple and resident in main memory

Prepare a job and submit to operator. Job was consisted of program, data and some control information

sort them in batches with similar requirements, and as computer became available, run them batch wise

after some time (some hours or even after some days) output appeared. Output includes result and error information.

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 13: Operating system   introduction to operating system

Introduction to Operating SystemTypes of Operating System

Memory Structure in Batch Operating System

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 14: Operating system   introduction to operating system

Introduction to Operating SystemTypes of Operating SystemDisadvantages :

Low throughput : CPU remains idle when I/O is going on

Programmers do not have direct interaction with Job

Debugging is possible only offline, after output appears

Operations were too much time consuming

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 15: Operating system   introduction to operating system

Introduction to Operating SystemTypes of Operating System 2. Multiprogramming Operating System

Run more than one program concurrently

more than one program loaded in main memory simultaneously. These programs can be executed concurrently. Memory is shared between OS and such kind of programs.

Multiprogramming = Multitasking

significantly improves system throughput and resource utilization

CPU can be utilized as much as possible. Eg. During I/O operation, CPU will be free, and it can be allocated to other Job.Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 16: Operating system   introduction to operating system

Introduction to Operating SystemTypes of Operating System

Multiprogramming with three programsJaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 17: Operating system   introduction to operating system

Introduction to Operating SystemTypes of Operating System Implementation :

1. Non-preemptive :

A program is allowed to execute until it voluntarily gives up the CPU

A program voluntarily gives up the CPU when it waits for some event, such as I/O operation, or when it terminates

Once a CPU becomes free, it can be allocated to some other program.

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 18: Operating system   introduction to operating system

Introduction to Operating SystemTypes of Operating System 2. Preemptive :

A program is allowed to execute for some maximum amount of time.

After this time, a CPU is forcibly taken away from the program

minimize the response time for user

suitable for interactive programs

Today most of the Operating Systems

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 19: Operating system   introduction to operating system

Introduction to Operating SystemTypes of Operating SystemRequired Features :

better memory management and protection

swapping and virtual memory

CPU scheduling

Disk management and file system

Synchronization & communication between running programs and problems like deadlock should be overcome

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 20: Operating system   introduction to operating system

Introduction to Operating SystemTypes of Operating System 3. Multi-user Operating System

Single user Os allows single user to access computer system at a time.

Multiple users cannot use single computer at a time. Eg. Situation at home

Multi-user allow multiple users to access computer system at a time

remote access is provided via a network, So that users can access the computer remotely using a terminal or other computer

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 21: Operating system   introduction to operating system

Introduction to Operating SystemTypes of Operating SystemA terminal contains I/O devices eg. ATM

machine or computer at railway station

Multiple user can access the single computer through time-sharing and multiprogramming

CPU is time-sliced at a regular interval

Eg. Unix, VMS and mainframe OS

The OS must make sure that –

Each and every program executed by multiple users has sufficient and separate resource

Resources, such as printers, should be shared in fair and proper way.Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic

Page 22: Operating system   introduction to operating system

Introduction to Operating SystemTypes of Operating System Request from one user should not affect the operation of other users

only authenticate and valid users should use the data stored on computers

Expensive hardwares can be shared among several users using multi-user OS. This provides better utilization of resources.

As more users access it, the performance becomes slower and slower.

Cost of hardware and software in multi-user environment is more than single user OS.

Jaydeep Patel Dept. of Computer Engineering LJ Polytechnic