Unit 1-Introduction-to-OS-Tan

download Unit 1-Introduction-to-OS-Tan

of 33

Transcript of Unit 1-Introduction-to-OS-Tan

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    1/33

    Computer People 2000 1

    Unit 1

    Introduction to Operating System

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    2/33

    Computer People 2000 2

    What is an Operating System?

    An OS is a program which act as an interfacebetween a user of computerand computerhardware.

    Keyboard Mouse

    PrinterRAM/ROM

    HDMemBus

    SystemBus

    Monitor

    CD

    Processor

    FloatingPointUnit

    IntegerUnit

    Cache

    ControlUnit

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    3/33

    Computer People 2000 3

    Layered View of a Computer System

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    4/33

    Computer People 2000 4

    What is an Operating System?

    An OS is a control program, which controls andcoordinate the use of Hardware among thevarious application program for the varioususers.

    The OS is similar to Government. The OS is a resource allocater.

    (CPU time, memory space, file storage space,input/output devices).

    Primary Goal : convenience of the user. Secondary Goal: efficient operation of computer

    system.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    5/33

    Computer People 2000 5

    History of Operating System-The First Generation(1945-1955)

    The computers were built with tens of thousandsofvacuum tubes, were very slow.

    A single group of people designed, programmed,

    operated and maintained each machine. All programming was done in machine language

    by wiring up plugboards to the control machinebasic functions.

    Programming language were unknown.

    Only numerical calculation were carried out.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    6/33

    Computer People 2000 6

    History of Operating System-The Second Generation(1955-1965)

    The introduction oftransistors made possible tobuild reliable system that can be sold to thecustomers.

    This also made separation between program,operator and other personals.

    These systems were used for scientific andengineering calculations.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    7/33

    Computer People 2000 7

    History of Operating SystemThe Second Generation(1955-1965)

    For example: If a programmer wants to run aFortran, he will follows following steps.

    Load Fortran Complier.

    Program read from card reader to magnetictape.

    Compiler produced assembly language code

    to tape. Assembly to binary code to tape and then to

    the user result.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    8/33

    Computer People 2000 8

    History of Operating System-The Second Generation(1955-1965)

    Setup time was main problem in perviousoperation.

    To solve this problem two fold solution were

    developed. Professional computer operators hired to reducedsetup time.

    Jobs with similar needs were batched togetherandrun through the computer as group.

    There were still problems with this approach.

    When a job stopped, the operator has to takenotice which program has problem.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    9/33

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    10/33

    Computer People 2000 10

    History of Operating System-Simple Monitor

    Loader

    Job sequencing

    Control CardInterpreter

    User programarea

    Monito

    r

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    11/33

    Computer People 2000 11

    History of Operating System-The Second Generation(1955-1965)

    CPU

    Card reader Line Printer

    CPU

    Card reader Tape Drivers Tape Drivers Line Printer

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    12/33

    Computer People 2000 12

    History of Operating System-The Third Generation(1965-1980)

    ICs and Multiprogramming (Mini Computers)

    Previously 7094 were used for scientificapplication.

    1401 were used for commercial use. IBM introduced system 360 to cater both needs

    in one system.

    For this a complicated OS were introduced to

    handle all these computations. Multiprogramming were also introduced in this

    generation.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    13/33

    Computer People 2000 13

    History of Operating System-Multiprogramming

    In multiprogramming the computer is asked to runseveral programs at the same time.

    The processor could be kept busy for the most of timeby switching from one program to another in the rapid

    succession. In a batch multiprogramming system, a series of jobs

    are loaded into memory at the same time, while onejob is waiting for an I/O transfer another job is started.

    JOB A Running I/O Wait Running I/O Wait JOB B I/O Wait Running I/O Wait Running

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    14/33

    Computer People 2000 14

    History of Operating System-Time Sharing

    A time sharing OS use CPU scheduling andmultiprogramming to provide each user wit asmall portion of a time shared computer.

    This system allows many users tosimultaneously share the computer.

    CPU switches rapidly from one user to next.

    Early computer was not interactive system. One programmer at a time.

    Batch system no interaction.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    15/33

    Computer People 2000 15

    History of Operating System-The Forth Generation(1980-1990)

    LSI made it possible to built PC for personal use. Two famous OS were introduced. MS-DOS and Unix

    Also introduced Network and distributedoperating systems. Networking OS, the users are aware of the

    existence of multiple computer, and can log in toremote machines and copy files from one

    machine to another. Each machine runs its own local OS and has its

    own user.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    16/33

    Computer People 2000 16

    History of Operating System-Distributed System

    Recent trend in computer system is to distributecomputation among several physical processes.

    Two such systems are available.

    Tightly Coupled System: the processorsshares memory and clock.

    Loosely Coupled System: the processors donot share memory and clock, such processors

    has its own local memory.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    17/33

    Computer People 2000 17

    Operating System Concepts

    OS has four major concepts.

    Process

    Files

    System Call

    The Shell

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    18/33

    Computer People 2000 18

    Operating System Concepts

    Process:

    Process is the program in execution.

    It consisted of the executable program, theprograms data, and Stack, program counter,stack pointer and other registers.

    All these information are stored in the process

    table.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    19/33

    Computer People 2000 19

    Operating System Concepts

    Files: Files consists of sequence of bit, byte, lines or

    records whose meanings are defined by its

    creator.

    Files are mapped by the OS on to the physicaldevices.

    The OS provides a uniform logical view ofinformation storage.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    20/33

    Computer People 2000 20

    Operating System Concepts

    Following major tasks are performed by OS.

    The creation and deletion of files.

    The creation and deletion of files.

    The support of primitives for manipulating filesand dir.

    Mapping files onto secondary storage.

    The backup of files on stable storage media.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    21/33

    Computer People 2000 21

    Operating System Concepts

    System Calls: User programs communicate with the OS and

    request services from it by making System Calls.

    Corresponding to each System Call is a LibraryProcedure.

    This procedure puts the parameter of the SystemCall in a register and then issues a TRAPInstruction.

    The TRAP Instruction is executed to changemode from user to kernel.

    Control goes to Operating System.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    22/33

    Computer People 2000 22

    Operating System Concepts

    OS determines which system call is to be carriedand examines the parameters.

    Kernel indexes the dispatch table, which

    contains pointers to service routines for systemcalls.

    If the parameters are valid, OS performs tasks.Otherwise it return error.

    For example: Count = read (file, buffer, nbytes);

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    23/33

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    24/33

    Computer People 2000 24

    Operating System Concepts

    The Shell:

    Editors, compilers, assemblers, linkers andcommand interpreters are not the part of OS.

    UNIX command interpreter is called The Shell.

    Shell make heavy use of many OS features.

    It is interface between a user and the OS.

    When any user log in, a shell is started up. The Shell has terminal as standard input and

    standard output.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    25/33

    Computer People 2000 25

    Operating System Structure

    Monolithic Systems:

    The structure is that there is on structure.

    The OS is written as a collection ofprocedures.

    Each procedure can call otherprocedurewhenever it needs.

    In this approach all the individual procedures are

    complied together into single object file with thelinker.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    26/33

    Computer People 2000 26

    Operating System Structure

    Basic structure for the OS:

    A main program invokes the requestedservice procedure.

    A set ofservice procedures that carry out thesystem call.

    A set ofutility procedure that helps the service

    procedures.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    27/33

    Computer People 2000 27

    Operating System StructureLayered System

    The OS is broken up into a number of layers.

    Bottom layer is hardware and the topmost layeris the user interface.

    A typical layer consists of data structures and aset of routines to service the layer above it.

    The major difficulty with layered approach is

    careful definition of layers, because a layer canonly use the layers below it.

    Less efficient than other approaches.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    28/33

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    29/33

    Computer People 2000 29

    Operating System StructureVirtual Machines

    The timesharing OS provides: 1. Multiprogramming 2. An extended machine with a convenient interface

    than the bare hardware.

    The heart of the system runs on bare hardwareand does multiprogramming with several virtualmachines to the next layer up.

    Each Virtual machine is identical to the true

    hardware. Each can run any OS that run directly to thehardware.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    30/33

    Computer People 2000 30

    Operating System StructureVirtual Machines

    For time sharing, this machine can runinteractive system call called CMS(Conversational Monitoring system).

    CMS CMS CMS

    Vm/370

    370 Bare Hardware

    System Calls

    TrapI/OInstructions

    Trap

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    31/33

    Computer People 2000 31

    Operating System StructureClient Server Model

    In this module Kernel handle the communicationbetween clients and servers.

    By splitting the OS up into parts, each of which

    handles one facet of the system. Such as fileservice, process service or memory services.

    Advantage of this OS is its adaptability to use indistributed system.

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    32/33

    Computer People 2000 32

    Operating System StructureClient Server Model

    Client

    Process

    Client

    Process

    Process

    Server

    Terminal

    Server File

    Server

    Memory

    Server

    Kernel

    User Mode

    Kernel ModeClient Obtain serviceBy sending messageTo server processes

  • 8/7/2019 Unit 1-Introduction-to-OS-Tan

    33/33

    Computer People 2000 33

    Windows NT Client-ServerStructure