Ch 1. Intro Operating System and Types

download Ch 1. Intro Operating System and Types

of 24

Transcript of Ch 1. Intro Operating System and Types

  • 8/3/2019 Ch 1. Intro Operating System and Types

    1/24

    Operating Systems

    Lecture 1

    BCS-III

  • 8/3/2019 Ch 1. Intro Operating System and Types

    2/24

    Prepared by: Mazhar Javed Awan 2

    Computer System1. Hardware

    2. Operating system

    3. Applications programs

    4. Users

  • 8/3/2019 Ch 1. Intro Operating System and Types

    3/24

    Prepared by: Mazhar Javed Awan 3

    Computer System HardwareComputer System Hardware

    Keyboard Mouse

    PrinterRAM/ROM

    HD

    MemBus

    System Bus

    Monitor

    CD

    Processor

    Floating Point

    Unit

    Integer

    Unit

    Cache

    Control

    Unit

  • 8/3/2019 Ch 1. Intro Operating System and Types

    4/24

    Prepared by: Mazhar Javed Awan 4

    History of Computer Systems First generation 1945 - 1955

    Technology: vacuum tubes, plug boards

    Sign up for time, exclusive use of the machine Languages: none

    OS: no operating system

    Second generation 1955 - 1965 Technology: transistors, punch cards

    Mainframes

    Languages: FORTRAN, COBOL,

    Jobs

    OS: batch systems, libraries

    Third generation 1965 1980 Technology: Integrated Circuits

    Large mainframes and smaller machines (IBM 360 family)

    Minicomputers (DEC)

    OS: multiprogramming, large systems (multipart), batch and timesharing, emergenceof Unix

    Fourth generation 1980 present Technology: Mass production of integrated circuits (chips and boards)

    Personal computers/servers/Internet

    OS: embedded -> supercomputer, CP/M -> Windows, PARC->Macintosh, Unix -> Linux/Solaris

  • 8/3/2019 Ch 1. Intro Operating System and Types

    5/24

    Prepared by: Mazhar Javed Awan 5

    What is an Operating System?What is an Operating System?

    Sits between programs & hardware

    Sits between different programs

    Sits betweens different users

    But what does

    it do?to provide an orderly and controlled allocation of

    the processors, memories and I/O devices

    among the various programs competing for them

    Real Lif

    e Example:Government

  • 8/3/2019 Ch 1. Intro Operating System and Types

    6/24

    Prepared by: Mazhar Javed Awan 6

    Operating system interface

    Hardware

    OperatingSystem

    Software

    ComputerUser

  • 8/3/2019 Ch 1. Intro Operating System and Types

    7/24

    Prepared by: Mazhar Javed Awan 7

    Operating System Goals

    Accept input from input devices

    Sends output from input devices

    Execute user programs and make solvinguser problems easier.

    Make the computer system convenient to

    use. Use the computer hardware in an efficient

    manner.

  • 8/3/2019 Ch 1. Intro Operating System and Types

    8/24

    Prepared by: Mazhar Javed Awan 8

    Components of Operating System

    Process management

    Memory management

    Secondary management I/O System

    File System

    Protection System Command interpreter system

  • 8/3/2019 Ch 1. Intro Operating System and Types

    9/24

    Prepared by: Mazhar Javed Awan 9

    Operating system types

    Single user

    Multi user

    Batch processing

    Multiprogramming Time sharing

    Real time system

    Distributed system

    Client server system Handheld

    Embedded

  • 8/3/2019 Ch 1. Intro Operating System and Types

    10/24

    Prepared by: Mazhar Javed Awan 10

    Single User Systems

    Personal computers computer system dedicated to asingle user.

    Interactive

    User convenience and responsiveness.

    Can adopt technology developed for larger operatingsystemsmulti-process, multi-user

    Individuals usually have sole use of computer and do notneed advanced protection features.

    They are popularly associated with Desk Top operatingsystem which run on standalone systems where no useraccounts are required.

    Example: DOS

  • 8/3/2019 Ch 1. Intro Operating System and Types

    11/24

    Prepared by: Mazhar Javed Awan 11

    Multi-User Systems:

    Provides regulated access for a number of users bymaintaining a database of known users.

    Refers to computer systems that support two ormore simultaneous users.

    Another term formulti-useris time sharing.

    Ex: All mainframes and are multi-user systems.

    Example: Unix

  • 8/3/2019 Ch 1. Intro Operating System and Types

    12/24

    Prepared by: Mazhar Javed Awan 12

    Batch Processing: In Batch processing same type of jobs batch (BATCH- a set of

    jobs with similar needs) together and execute at a time.

    First rudimentary system.

    User{ operator

    R

    educe setup time by batching similar jobs Automatic job sequencing automatically transferscontrol from one job to another.

    Resident monitor :

    initial control in monitor

    control transfers to job

    when job completes

    control transfers back to monitor

  • 8/3/2019 Ch 1. Intro Operating System and Types

    13/24

    Prepared by: Mazhar Javed Awan 13

    Batch Processing (Contd):

    The OS was simple, its major task was to transfer controlfrom one job to the next.

    The job was submitted to the computer operator in formof punch cards. At some later time the output appeared.

    The OS was always resident in memory. (Ref. Fig. )

    Common Input devices were card readers and tapedrives.

    Common output devices were line printers, tape drives,and card punches.

    Users did not interact directly with the computer systems,but he prepared a job (comprising of the program, thedata, & some control information).

    Advantage: Computer operator load data only oneoperation

  • 8/3/2019 Ch 1. Intro Operating System and Types

    14/24

    Prepared by: Mazhar Javed Awan 14

    Examples

    Payroll Systems

    Tax systems

    Production of electricity Bills National Insurance contributions

  • 8/3/2019 Ch 1. Intro Operating System and Types

    15/24

    Prepared by: Mazhar Javed Awan 15

    Multiprogramming:

    Multiprogramming is a technique to execute number ofprograms simultaneously by a single processor.

    In Multiprogramming, number of processes reside in mainmemory at a time.

    The OS picks and begins to executes one of the jobs in themain memory.

    If any I/O wait happened in a process, then CPU switchesfrom that job to another job.

    Hence CPU in not idle at any time.

  • 8/3/2019 Ch 1. Intro Operating System and Types

    16/24

    Prepared by: Mazhar Javed Awan 16

    Multiprogramming (Contd):

    OS

    Job 1

    Job 2

    Job 3

    Job 4

    Job 5

    Figure dipicts the layout of

    multiprogramming system.

    The main memory consists of 5

    jobs at a time, the CP

    U executesone by one.

    Advantages:

    Efficient memory utilization

    Throughput increases

    CPU is never idle, so

    performance increases.

  • 8/3/2019 Ch 1. Intro Operating System and Types

    17/24

    Prepared by: Mazhar Javed Awan 17

    OS Features Needed

    for Multiprogramming SPOOLing (Simultaneous Peripheral

    Operation On-Line)

    Memory management

    CPU scheduling

  • 8/3/2019 Ch 1. Intro Operating System and Types

    18/24

    Prepared by: Mazhar Javed Awan 18

    Time Sharing Systems:

    Time sharing, or multitasking, is alogical extension of multiprogramming.

    Multiple jobs are executed by switchingthe CPU between them.

    In this, the CPU time is shared bydifferent processes, so it is called asTime sharing Systems.

    Time slice is defined by the OS, forsharing CPU time between processes.

    Using multiprogramming to handlemultiple interactive jobs

    Multiple users simultaneously accessthe system through terminals.

    A job is swapped in and out of memoryto the disk if needed.

    Examples Airline booking Systems

    Process 1 Process 2 Process 3

    OS

    CPU

  • 8/3/2019 Ch 1. Intro Operating System and Types

    19/24

    Prepared by: Mazhar Javed Awan 19

    Real-time Systems Well-defined fixed-time constraints. 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.

    System is automatically updated when a change is made due totransaction occur.

    The terminals must be connected to the computers. Must be an online system.

    Medical imaging systems

    Industrial control systems

    Traffic Lights

    Robots

    Flight Simulations

  • 8/3/2019 Ch 1. Intro Operating System and Types

    20/24

    Prepared by: Mazhar Javed Awan 20

    Real-time Systems types

    Hard real-timesystems: Secondary storage limited or

    absent, data stored in shortterm memory, or read-onlymemory (ROM)

    No virtual memorytimecannot be wasted ontranslation of logical to physicaladdresses

    OS code structured for

    efficiency Plane landing systems, proces

    control in nuclear power plants,respirators, etc.

    Soft real-timesystems Output should be produced

    within the given time

    constraints but if it is not,the result is not lifethreatening

    Useful in applications(multimedia, virtual reality)requiring advancedoperating-system features.

  • 8/3/2019 Ch 1. Intro Operating System and Types

    21/24

    Prepared by: Mazhar Javed Awan 21

    Distributed Systems

    Distribute the computation amongseveral physical processors.

    Loosely coupled system (clusters?)each processor has its own localmemory; processors communicate withone another through various

    communications lines, such as high-speed buses , cross-bar switches,LANS, or telephone lines.

    Advantages of distributed systems. Resources Sharing

    Computation speed up load sharing

    Reliability

    Communications Disadvantages: control and OS

    functions complicated, anddistributing an algorithm over thenodes is difficult.

  • 8/3/2019 Ch 1. Intro Operating System and Types

    22/24

    P

    repared by: Mazhar Javed Awan 22

    Client Server Systems

    In which cooperation and intercommunication

    between the various elements of a network is

    conducted.

    In a client server system, application programsresides in server connected to the LAN.

  • 8/3/2019 Ch 1. Intro Operating System and Types

    23/24

    P

    repared by: Mazhar Javed Awan 23

    Handheld Systems

    Personal Digital Assistants (PDAs)

    Cellular telephones

    Issues:

    Limited memory

    Slow processors

    Small display screens.

  • 8/3/2019 Ch 1. Intro Operating System and Types

    24/24

    P

    repared by: Mazhar Javed Awan 24

    Embedded system

    Different electronic devices are controlled

    Permanently store on Rom chip

    Uses Mobile phone Microwave

    TV sets

    Examples Palm OS

    Window CE