Top Banner
Operating Systems- EC426 Introduction Mr. S. V. Viraktamath, Faculty, Dept. of E&CE, SDMCET, Dharwad. [email protected]
50

Ossvv12013

Jun 17, 2015

Download

Education

Operating system subject PPT
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Ossvv12013

Operating Systems-EC426

Introduction

Mr. S. V. Viraktamath,Faculty,Dept. of E&CE, SDMCET, [email protected]

Page 2: Ossvv12013

SVV SDMCET OS -2013

Introduction• What is an Operating System?

– It is a program that manages computer hardware.– A program that acts as an intermediary between a

user of a computer and the computer hardware.• Operating system goals:

– Execute user programs and make solving user problems easier.

– Make the computer system convenient to use.• Use the computer hardware in an efficient manner.

04/13/2023 SVV SDSMCET 5

Page 3: Ossvv12013

SVV SDMCET OS -2013

What is an OS• A program, C or C++• Loads and runs other programs• Application programs might wish to:

– Draw on the screen– Interact via a keyboard, mouse etc– Access the hard disk (files)– Communicate with other application programs

• The OS should provide a consistent way to do this– Works on whatever hardware you have.

04/13/2023 SVV SDSMCET 6

Page 4: Ossvv12013

SVV SDMCET OS -2013

Introduction• Why to study the OS subject?

– It is there in syllabus!– U work on Computer in any Job…..– Without OS difficult to work..– Any s/w u design it runs on OS (Application)– New “smart” devices need new OSs, U can

write OS– High-performance servers are an OS issue– Resource consumption is an OS issue– Security is an OS issue

04/13/2023 7SVV SDSMCET

Page 5: Ossvv12013

Current Technology

Personal digital assistant (PDA)

Mobile phone / PDA

DoCoMovideo phone

Laptop

Thanks to M. Sloman for slides

Best friend!

Page 6: Ossvv12013

SVV SDMCET OS -2013

Introduction • Topics includes

1. Introduction to OS

2. OS structure

3. Process scheduling

4. Process issues

5. Storage Management

6. Virtual Memory

7. OS securities

8. Case study

04/13/2023 9

Page 7: Ossvv12013

SVV SDMCET OS -2013

Text books• Abraham Silberschatz, Peter Baer Galvin,

Greg Gagne- “Operating system Concepts”, 6th Edition, Jhon Wiley & sons 2002, 2003.

• Milan Milankovic, “Operating system concepts and design”, 2nd edition, MC Graw Hill 1992.

• Harvey M Dietal “Operating systems”, Addison Wesley 1990

• D M Dhamdhere, “Operating systems- A Concept based approach”, Tata MC Hill 2002.

04/13/2023 10

Page 8: Ossvv12013

SVV SDMCET OS -2013

Introduction • What do you think you are going to study in

this subject?• Aim of the subject?

04/13/2023 SVV SDSMCET 11

Page 9: Ossvv12013

SVV SDMCET OS -2013

Introduction

• Aim of the subject– Will not teach you how to use OS.– Examines the way OS works.– Which OS? Ex. Bike working/ parts..– Algorithms & Data structures inside OS.– Problems/Solutions.

…..

04/13/2023 12

Page 10: Ossvv12013

SVV SDMCET OS -2013

Introduction

• Computer system can be divided into 4 components–Hardware–OS–Application Programs–Users

04/13/2023 SVV SDSMCET 13

Page 11: Ossvv12013

SVV SDMCET OS -2013

Computer System Components1. Hardware – provides basic computing resources

(CPU, memory, I/O devices).

2. Operating system – controls and coordinates the use of the hardware among the various application programs for the various users.

3. Applications programs – define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs).

4. Users (people, machines, other computers).

04/13/2023 14

Page 12: Ossvv12013

SVV SDMCET OS -2013

Abstract View of System Components

04/13/2023 15

Page 13: Ossvv12013

SVV SDMCET OS -2013

Abstract View of System Components

04/13/2023 16

• A computer system consists of– hardware– system programs– application programs

Page 14: Ossvv12013

SVV SDMCET OS -2013

Introduction• What do you mean by system programming

and Application programming?• OS can be explored from two view points

– User View– System View

04/13/2023 17

Page 15: Ossvv12013

SVV SDMCET OS -2013

User View

• User View varies by the interface being used–Most comp are PCs

• OS designed – –Ease of use –Some attention to performance–No attention to resource utilization

• Monopolies resources.

04/13/2023 18

Page 16: Ossvv12013

SVV SDMCET OS -2013

User View– Mainframe/Mini computer

• Other users are accessing comp.• OS design- to maximize resource utilization• Resources - CPU time, Mem, I/O…

– Workstations• Connected to N/W of other workstations & servers.• OS Design -compromise between usability and resource

utilization.• Users have dedicated resources & some are shared-file

servers, print servers.

04/13/2023 19

Page 17: Ossvv12013

SVV SDMCET OS -2013

User View– Recently– Hand held computers

• Come in to Fashion.• These are stand alone.• Some r connected to n/w, wire/wireless.• OS designed for individual/ Single user.

– Some comp. no user view• Embedded systems, automobiles- numeric key

pad, indicator lights -on or off.

04/13/2023 20

Page 18: Ossvv12013

SVV SDMCET OS -2013

System View• OS as a resource allocator (Not simple -

Deadlock)– Many resources Ex. CPU time, memory space,

file storage space, I/o devices and so on..– OS acts as a manager of resources.

• OS as a control program– It controls the improper use of the computers.– Concerned with operation and control of I/O

devices.

04/13/2023 21

Page 19: Ossvv12013

SVV SDMCET OS -2013

System View• OS is a pgm –most intimate with hardware• Resource Allocator• Manager • Control program• No complete definition for the OS.

04/13/2023 22

Page 20: Ossvv12013

SVV SDMCET OS -2013

Goals of an OS• Fundamental goal of OS

– To execute user programs & to make solving user programs easier.

• Common definition – The OS is one program running at all times on

the computer (Kernel) with all else being application programs.

04/13/2023 23

Page 21: Ossvv12013

SVV SDMCET OS -2013

System Goals• Primary goal of some OS is convenience for

the user. (small PCs)• Primary goal of other OS is efficient operation

of comp system. (Large, shared, multi user expensive comps)

• Convenience and Efficiency are some times contradictory.

• Past Efficiency/Utilization was imp. • (As time changes goals changes!)

04/13/2023 24

Page 22: Ossvv12013

SVV SDMCET OS -2013

Summary• What is the OS. • Why to study the OS subject.• Topics. • Computer – 4 components.• OS two views.

– User Views.• PC, Main frame, Workstations, Handheld comps,

Embedded

– System View.• Resource allocator, Manager, Control program.

– System goals.• Convenience and efficient/Utilization

04/13/2023 25

Page 23: Ossvv12013

SVV SDMCET OS -2013

Evolution of OS:• Mainframe systems

– Batch systems– Multiprogrammed systems– Time sharing systems

• Desktop systems• Multiprocessor systems• Distributed systems• Clustered systems • Real time systems• Hand held systems

04/13/2023 26

Page 24: Ossvv12013

SVV SDMCET OS -2013

1945 to 1955 • No operating system

• Human operators (Ex. Telephone)

• What did the first operating system look like?

First generation

Page 25: Ossvv12013

Batch Processing:

04/13/2023 SVV SDSMCET 28

• Why utilization?• IBM 7094 system costing $2,000,000, Life of

5 years, 24hrs use, 365days per year then $45.66 per hour!

• Operational cost, cooling, paper, programmers …..

Rich wont work for money, Money work for them

Page 26: Ossvv12013

Batch Processing:

04/13/2023 29

• Common I/P devices were card readers and tape drives.

• Common O/P devices were line printers, tape drives, card punches.

• Operators were hired, he used to collect all the programs. (cards)

• At some later time (minutes, hours, days) o/p, dump of memory and reg contents for debugging.

Page 27: Ossvv12013

Batch Processing:

04/13/2023 SVV SDSMCET 30

• OS was simple, its work is to transfer control from one job to next.

• Jobs with similar needs are batched together, operator sort the programs.

• Job batches of “Fortran Jobs, Cobol jobs”.• Jobs executed sequentially – one job at a time.• Cards -comprising of the program, the data, &

some control information, “Job header” control cards were used to define

Page 28: Ossvv12013

Batch Processing

Impersonal computing

04/13/2023 SVV SDSMCET 31

ProgrammerOperator

• Disadvantage: CPU idle, speed of mechanical I/O is less.• Card reader speed 1200cards/min, CPU

microsecond range.• Next technology Disks resulted.

Page 29: Ossvv12013

SVV SDMCET OS -2013

Memory Layout for a Simple Batch System

04/13/2023 32

Page 30: Ossvv12013

SVV SDMCET OS -2013

Multiprogramming:• Why >1 program?• Single user cannot keep –CPU I?O Busy• Multiprogramming increases CPU utilization.• Multiprogramming is a technique to execute

number of programs simultaneously by a single processor.

• In Multiprogramming, number of processes reside in main memory at a time.

04/13/2023 33

Page 31: Ossvv12013

SVV SDMCET OS -2013

Multiprogramming:• The OS picks and begins to executes one of

the jobs in the main memory.• If any I/O wait happened in a process, then

CPU switches from that job to another job.• Single pgm CPU--I/O— CPU --I/O

– I/O wait-- CPU wait I/O wait-CPU wait

• Hence CPU in not idle at any time.

04/13/2023 34

Page 32: Ossvv12013

SVV SDMCET OS -2013

Multiprogramming:• Idea-Life situation: A lawyer does not work on

only one client at a time. Other Ex.• How OS select the job if many are ready?

Topic 6Hrs - cpu scheduling• More than one program--needs memory

management.

04/13/2023 35

Page 33: Ossvv12013

Multiprogramming

OS

Job 1

Job 2

Job 3

Job 4

Job 5

• Figure depicts the layout of multiprogramming system.

• The main memory consists of 5 jobs at a time, the CPU executes one by one.

Advantages:

• Efficient memory utilization

• Throughput increases

• CPU is never idle, so performance increases.

04/13/2023 SVV SDSMCET 36

Page 34: Ossvv12013

SVV SDMCET OS -2013

Time Sharing Systems:• Multiprogramming environment –did not provide

user interaction• MP and BP systems – offline-- poor user service • Computing becomes online – Video terminals .i.e.

Key board and monitor screen; quick service to user

• Time sharing is logical extension of multiprogramming, switch from program to program very fast, user can interact.

• Many users share computer simultaneously.• User get impression –it is dedicated to her use.

(SHE)

04/13/2023 37

Page 35: Ossvv12013

SVV SDMCET OS -2013

Time Sharing Systems:

• Program Vs Process Vs processor• Process?- A program loaded in to memory and

executing is commonly referred to as a process.

• When process go for I/O CPU can execute other program.

• All user must receive reasonable service

04/13/2023 38

Page 36: Ossvv12013

SVV SDMCET OS -2013

Time Sharing Systems:• Two provisions are made to ensure this

– programs not assigned priorities– programs prevented from consuming unreasonable

amount of cpu time • These provisions are implemented using the techniques

– Round-robin scheduling– Time slice

• RR Scheduling: Schedules the user program – only after all other programs get their turn on the CPU

• Time slice: It is used to prevent monopolization of CPU by a program

04/13/2023 39

Page 37: Ossvv12013

SVV SDMCET OS -2013

Time Sharing Systems:• Timesharing systems are more complex than

Multi-programmed• Several jobs in the memory- Need Memory

Management (Topic 5Hrs), Protection• Jobs may have to be swapped (disk back up).• Virtual Memory concept (Topic5Hrs).

04/13/2023 40

Page 38: Ossvv12013

SVV SDMCET OS -2013

Desktop Systems:• PCs appeared in 1970s, Neither multiuser nor

multitasking.• Goals of OS have changed with time • Instead of maximizing CPU and peripheral

Utilization, the system opt for user convenience and responsiveness.

• PC. OSs -MS windows, OS/2, Apple Macintosh OS, MacOS X, Unix, Linux...

04/13/2023 41

Page 39: Ossvv12013

SVV SDMCET OS -2013

Desktop Systems• Hardware cost reduces individual use,

Utilization was not prime concern.• Other design decision still apply – File

protection (Internet).• MS-DOS lack of security-easy to destroy by

worm or virus.

04/13/2023 42

Page 40: Ossvv12013

SVV SDMCET OS -2013

Multiprocessor Systems• Most of the systems single processor.• Multi processor systems/parallel

systems/tightly coupled systems-more than one processor –sharing comp bus, clock, sometimes memory and peripherals

• Main Adv– Increased through put– Economy of scale– Increased reliability

04/13/2023 SVV SDSMCET 43

Page 41: Ossvv12013

SVV SDMCET OS -2013

– Increased through put• If one processor takes 10 sec then 10 processors takes ?

– Economy of scale • Save money – instead of N separate processors• Share data no need of duplication• Share resources

– Increased reliability • fail of one processer/10.• Graceful degradation/Fault tolerant.

• Expensive –Duplication

04/13/2023 44

Page 42: Ossvv12013

SVV SDMCET OS -2013

Multiprocessor Systems

04/13/2023 45

• Symmetric multiprocessing (SMP) (Peer to Peer)– Each processor runs an identical copy of the

operating system.– Many processes can run at once without

performance deterioration.– Most modern operating systems support SMP

Page 43: Ossvv12013

SVV SDMCET OS -2013

Multiprocessor Systems

04/13/2023 46

• Asymmetric multiprocessing (Master-slave)– Each processor is assigned a specific task;

master processor schedules and allocated work to slave processors.

– More common in extremely large systems

Page 44: Ossvv12013

SVV SDMCET OS -2013

Distributed Systems• Distribute the computation among several

physical processors. LAN/WAN…• Loosely coupled system – each processor has its

own local memory; processors communicate with one another through various communications lines, such as high-speed buses or telephone lines.

• Advantages of distributed systems.– Resources Sharing – Computation speed up – load sharing – Reliability– Communications

04/13/2023 47

Page 45: Ossvv12013

SVV SDMCET OS -2013

Distributed Systems

• Requires networking infrastructure.• Local area networks (LAN) or Wide Area

Networks (WAN)• May be either client-server or peer-to-peer

systems.• General Structure of Client-Server

04/13/2023 48

Page 46: Ossvv12013

SVV SDMCET OS -2013

Clustered Systems• Like parallel systems; Defn: Not concrete• Clustering allows two or more systems to

share storage.• Provides high reliability.• Asymmetric clustering: one server runs the

application while other servers standby.• Symmetric clustering: all N hosts are running

the application.

04/13/2023 49

Page 47: Ossvv12013

SVV SDMCET OS -2013

Real-Time Systems• Often used as a control device in a dedicated

application such as controlling scientific experiments, medical imaging systems, industrial control systems, and some display systems.

• Well-defined fixed-time constraints.• Real-Time systems may be either hard or soft

real-time.

04/13/2023 50

Page 48: Ossvv12013

SVV SDMCET OS -2013

Real-Time Systems• Hard real-time:

– Secondary storage limited or absent, data stored in short term memory, or read-only memory (ROM)

– Conflicts with time-sharing systems, not supported by general-purpose operating systems.

• Soft real-time– Limited utility in industrial control of robotics– Useful in applications (multimedia, virtual reality)

requiring advanced operating-system features.

04/13/2023 51

Page 49: Ossvv12013

SVV SDMCET OS -201304/13/2023 52

Handheld Systems

• Personal Digital Assistants (PDAs)• Cellular telephones• Issues:

– Limited memory– Slow processors– Small display screens.

Page 50: Ossvv12013

SVV SDMCET OS -201304/13/2023 53