Click here to load reader

Operating Systems - So · PDF file Operating Systems: Internals and Design Principles Operating systems are those programs that interface the machine with the applications programs.The

  • View

  • Download

Embed Size (px)

Text of Operating Systems - So · PDF file Operating Systems: Internals and Design Principles...

  • Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000)

    [email protected] [email protected] [email protected] [email protected]

    abdulmahmood-sss alphasecure mahmood_cubix 48660186

    [email protected] [email protected]

    VC++, VB, ASP

    Operating Systems

  • Operating System





    and Design


  • Operating Systems:

    Internals and Design Principles

    Operating systems are those programs that interface the machine

    with the applications programs. The main function of these systems

    is to dynamically allocate the shared system resources to the

    executing programs. As such, research in this area is clearly

    concerned with the management and scheduling of memory,

    processes, and other devices. But the interface with adjacent levels

    continues to shift with time. Functions that were originally part of the

    operating system have migrated to the hardware. On the other side,

    programmed functions extraneous to the problems being solved by the

    application programs are included in the operating system.



    MIT Press, 1980

  • Operating System

     A program that controls the execution of

    application programs

     An interface between applications and hardware

    Main objectives of an OS:

    • Convenience

    • Efficiency

    • Ability to evolve

  •  Program development: IDE

     Program execution: process creation

     Access I/O devices

     Controlled access to files

     System access

     Error detection and response

     Accounting: response time, billing

  • Key Interfaces

     Instruction set architecture (ISA): boundary between

    hardware and software. Defines the repertoire of

    machine language instructions  User ISA: subset of the instruction repertoire that application

    programs / utilities can access directly.

     System ISA: OS has access to additional machine language

    instructions that deal with managing system resources

     Application binary interface (ABI):Provides binary

    portability to programs & system call interface in OS.

     Application programming interface (API): gives a

    program access to the hardware resources and services

    available in a system through the user ISA supplemented

    with high-level language (HLL) library calls.

  • A computer is a set of (shared)

    resources for the movement, storage,

    and processing of data

    The OS is responsible for managing

    these resources

  • Functions in the same way as ordinary

    computer software

    Program, or suite of programs, executed

    by the processor

    Frequently relinquishes control and must

    depend on the processor to allow it to

    regain control

  • Operating





  • Evolution of Operating Systems

    A major OS will evolve over time for a

    number of reasons:

    Hardware upgrades

    New types of hardware

    New services


    early versions

    of UNIX did not employ a paging mechanism

    graphics terminals and page-mode


    performance management tool


  • Evolution of

    Operating Systems

     Stages include:

    Serial Processing

    Simple Batch Systems

    Multiprogrammed Batch Systems

    Time Sharing Systems

  • Serial Processing

    Earliest Computers:

     No OS (1948-1955)

     programmers interacted

    directly with the computer


     Computers had a console

    with display lights, toggle

    switches, some form of input

    device, printer

     Users have access to the

    computer in “series”


     Scheduling:

     most installations used a

    hardcopy sign-up sheet to

    reserve computer time

     time allocations could

    run short or long,

    resulting in wasted

    computer time

     Setup time

     a considerable amount of

    time was spent just on setting

    up the program to run

  • Serial Processing

  • Simple Batch Systems

     Early computers were very expensive

     important to maximize processor utilization

     Monitor (software )

     user no longer has direct access to processor

     job is submitted to computer operator who batches them

    together and places them on an input device

     program branches back to the monitor when finished

  •  Monitor controls the sequence

    of events

     Resident Monitor is software

    always in memory

     Monitor reads in job and gives


     Job returns control to monitor

  •  Processor executes instruction from the memory

    containing the monitor

     Executes the instructions in the user program until it

    encounters an ending or error condition

     “control is passed to a job” means processor is fetching and

    executing instructions in a user program

     “control is returned to the monitor” means that the processor

    is fetching and executing instructions from the monitor


  • Job Control Language (JCL)

    Special type of programming language used to provide

    instructions to the monitor

    what compiler to use

    what data to use



    [FORTRAN program]





    $FTN - execute FORTRAN compiler;

    $ASM - execute Assembler;

    $RUN - execute user program;

    $JOB - first card;

    $END - last card;

  •  A job is a unit of work which can be made up of

    many job steps. Each job step is specified in a

    Job Control Language (JCL) through a set of

    Job Control Statements.

     The Operating System uses Job Entry System

    (JES) to receive jobs into the Operating System,

    to schedule them for processing and to control

    the output.


    //* (2)

    //STEP010 EXEC PGM=SORT (3)




    //SYSOUT DD SYSOUT=* (6)



    //SYSIN DD * (6)



    /* (7)

  •  (1) JOB statement - Specifies the information required

    for SPOOLing of the job such as job id, priority of

    execution, user-id to be notified upon completion of the


     (2) //* statement - This is a comment statement.

     (3) EXEC statement - Specifies the PROC/Program to

    be executed. In the above example, a SORT program is

    being executed (i.e., sorting the input data in a particular


     (4) Input DD statement - Specifies the type of input to

    be passed to the program mentioned in (3). In the above

    example, a Physical Sequential (PS) file is passed as

    input in shared mode (DISP = SHR).

  •  (5) Output DD statement - Specifies the type of output to be produced by

    the program upon execution. In the above example, a PS file is created. If a

    statement extends beyond the 70th position in a line, then it is continued in

    the next line, which should start with "//" followed by one or more spaces.

     (6) There can be other types of DD statements to specify additional

    information to the program (In the above example: The SORT condition is

    specified in the SYSIN DD statement) and to specify the destination for

    error/execution log (Example: SYSUDUMP/SYSPRINT). DD statements

    can be contained in a dataset (mainframe file) or as in stream data

    (information hard-coded within the JCL) as given in above example.

     (7) /* marks the end of in stream data.

     All the JCL state

Search related