SlideShare ist ein Scribd-Unternehmen logo
1 von 54
Downloaden Sie, um offline zu lesen
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                       Computer Fundamentals: Pradeep K. Sinha & Priti Sinha




                  Chapter 14
           Operating Systems




Ref Page    Chapter 14: Operating Systems                     Slide 1/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Learning Objectives

  In this chapter you will learn about:
    § Definition and need for operating system
    § Main functions of an operating system
    § Commonly used mechanisms for:
       § Process management
       § Memory management
       § File management
       § Security
       § Command interpretation module
    § Some commonly used OS capability enhancement software
    § Some popular operating systems




Ref Page 251         Chapter 14: Operating Systems                     Slide 2/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Definition and Need for OS

   § Integrated set of programs that controls the resources
     (the CPU, memory, I/O devices, etc.) of a computer
     system
   § Provides its users with an interface or virtual machine
     that is more convenient to use than the bare machine
   § Two primary objectives of an OS are:
         § Making a computer system convenient to use
         § Managing the resources of a computer system




Ref Page 251       Chapter 14: Operating Systems                     Slide 3/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                   Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Logical Architecture of a Computer System
 Logical Architecture of a Computer System


                     Users

                       Other
               System Software and
               Application Programs


                Operating System


                                                   The operating system
                   Computer                        layer hides the details of
                   Hardware
                                                   the hardware from the
                                                   programmer            and
                                                   provides the programmer
                                                   with convenient interface
                                                   for using the system



Ref Page 252         Chapter 14: Operating Systems                        Slide 4/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                           Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Main Functions of an OS

   § Process management
   § Memory management
   § File management
   § Security
   § Command interpretation




Ref Page 252    Chapter 14: Operating Systems                     Slide 5/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                             Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
  Parameters for Measuring System
  Parameters for Measuring System
  Performance
  Performance

   § Throughput: Amount of work that the system is able to
     do per unit time
   § Turnaround time: Interval from the time of submission
     of a job to the system for processing to the time of
     completion of the job
   § Response time: Interval from the time of submission of a
     job to the system for processing to the time the first
     response for the job is produced by the system




Ref Page 253      Chapter 14: Operating Systems                     Slide 6/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Process Management

   § A process (also called job) is a program in execution
   § Process management manages the processes
     submitted to a system in a manner to minimize idle time
     of processors (CPUs, I/O processors, etc.) of the system




Ref Page 253       Chapter 14: Operating Systems                     Slide 7/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                             Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
  Process Management Mechanisms in
  Process Management Mechanisms in
  Early Systems
  Early Systems

   § Manual loading mechanism: Jobs were manually
     loaded one after another in a computer by the
     computer operator
   § Batch processing mechanism: Batch of jobs was
     submitted together to the computer and job-to-job
     transition was done automatically by the operating
     system
   § Job Control Language (JCL): Control statements
     were used to facilitate job loading and unloading




Ref Page 253      Chapter 14: Operating Systems                     Slide 8/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                             Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
 Use of Job Control Statements in Batch
 Use of Job Control Statements in Batch
 Processing (An Example)
 Processing (An Example)


                                     $END
                                   Data for program


                     $RUN
                   $LOAD
                 COBOL program


            $COBOL
          $JOB, ONGC05839,
          USER=SINHA




Ref Page 255      Chapter 14: Operating Systems                     Slide 9/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Multiprogramming

  § Uniprogramming: Only one job is processed at a
    time and all system resources are available exclusively
    for the job until its completion
  § Multiprogramming: Interleaved execution of two or
    more different and independent programs by a
    computer
  § Types of Multiprogramming:
       § Multiprogramming with fixed tasks (MFT): Fixed
         number of jobs can be processed concurrently
       § Multiprogramming with variable tasks (MVT):
         Number of jobs can vary
  § Area occupied by each job residing simultaneously in
    the main memory is known as a memory partition



Ref Page 255       Chapter 14: Operating Systems                     Slide 10/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                            Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Job

  § CPU bound: Mostly perform computations with little
    I/O operations. Scientific and engineering
    computations usually fall in this category
  § I/O bound: Mostly perform I/O operations with little
    computation. Commercial data processing applications
    usually fall in this category




Ref Page 255     Chapter 14: Operating Systems                     Slide 11/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Uniprogramming System
                               Main memory

                                 Operating           OS area
                                  system




                                  User job     User program area


               Execution in
                progress



                                   CPU


    Only one job is processed by the system at a time and all
    the system resources are exclusively available for the job
    until it completes


Ref Page 255         Chapter 14: Operating Systems                     Slide 12/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                 Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Multiprogramming System

                                                         Main memory

                                                      Operating system

                                Writing output data         Job A

                                                            Job B

                                                            Job C
           Secondary disk storage                     (Waiting for CPU)


                               Execution in
                                progress
                                                           CPU




Ref Page 257          Chapter 14: Operating Systems                      Slide 13/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                  Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Process States in Multiprogramming
 Process States in Multiprogramming



                            Job is allocated the
     New                    CPU for execution                         Job
     job          Ready                                Running        processing
                                                                      completed


               I/O completed                      Job must wait for I/O
                                  Blocked             completion




Ref Page 257           Chapter 14: Operating Systems                      Slide 14/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                             Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Requirements of Multiprogramming Systems
 Requirements of Multiprogramming Systems


   § Large memory
   § Memory protection
   § Job status preservation
   § Proper job mix (CPU and I/O bound jobs)
   § CPU scheduling




Ref Page 257      Chapter 14: Operating Systems                     Slide 15/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Process Control Block (PCB)
 Process Control Block (PCB)

                       process identifier
                          process state
                        program counter
                    values of various CPU
                           registers
                  accounting and scheduling
                         information
                     I/O status information



    PCB is used to preserve the job status of each loaded
    process in a multiprogramming system


Ref Page 257       Chapter 14: Operating Systems                     Slide 16/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Multitasking

   § Interleaved execution of multiple jobs (often referred
     to as tasks of same user) in a single-user system
   § Computer systems used for multitasking are
     uniprocessor systems (having only one CPU)
   § Treated differently from multiprogramming that refers
     to interleaved execution of multiple jobs in a multi-
     user system




Ref Page 258       Chapter 14: Operating Systems                     Slide 17/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Multithreading

   § Thread is basic unit of CPU utilization. Threads
     share a CPU in the same way as processes do
   § All threads of a process also share the same set of
     operating system resources
   § All threads of a process inherit parent’s address
     space and security parameters
   § Each thread of a process has its own program
     counter, its own register states, and its own stack
   § Referred as mini-process or lightweight process




Ref Page 258       Chapter 14: Operating Systems                     Slide 18/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Multithreading System

                Address space
                                                Address space
                   Thread
                                             Thread   Thread   Thread




     (a) Single-threaded and (b) multithreaded processes. A
     single-threaded process corresponds to a process of a
     traditional operating system. [Reproduced with
     permission, from the book titled Distributed Operating
     Systems: Concepts and Design by Pradeep K. Sinha.
     © 1997 IEEE, USA].



Ref Page 259       Chapter 14: Operating Systems                        Slide 19/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Multiprocessing

   § System with two or more CPUs having ability to execute
     multiple processes concurrently
   § Multiple CPUs are used to process either instructions from
     different and independent programs or different
     instructions from the same program simultaneously
   § Types of multiprocessing:
       § Tightly-coupled: Single system-wide primary memory
         shared by all processors
       § Loosely-coupled: Each processor has its own local
         memory




Ref Page 259       Chapter 14: Operating Systems                     Slide 20/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                               Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
  CPU, Memory, and I/O Processors of a
  CPU, Memory, and I/O Processors of a
  Computer System
  Computer System


                                                            Main
                                                           memory




        I/O Units                 I/O
                                                              CPU
                               Processors




Ref Page 260        Chapter 14: Operating Systems                     Slide 21/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Multiprocessing System
 Multiprocessing System


                                   Main
          CPU-1                                               CPU-2
                                  memory



           I/O                                                 I/O
        processors                                          processors




         I/O units                                           I/O units




Ref Page 260         Chapter 14: Operating Systems                     Slide 22/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                             Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Time-sharing
  Time-sharing

  § Simultaneous interactive use of a computer system by
    many users in such a way that each one feels that
    he/she is the sole user of the system
  § User terminals connected to the same computer
    simultaneously
  § Uses multiprogramming with a special CPU scheduling
    algorithm
  § Short period during which a user process gets to use
    CPU is known as time slice, time slot, or quantum
  § CPU is taken away from a running process when the
    allotted time slice expires




Ref Page 261      Chapter 14: Operating Systems                     Slide 23/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                     Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
 Process State Diagram for a Time-Sharing
 Process State Diagram for a Time-Sharing
 System
 System



                                Job is allocated to
                                                                        Job
      New                       CPU for execution       Running
                    Ready                                               processing
      Job
                                                                        completed
                               Allotted time slice is over
               I/O completed                            Job must wait
                                                        for I/O
                                                        completion
                                      Blocked




Ref Page 261           Chapter 14: Operating Systems                        Slide 24/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Advantages of Time-sharing Systems
  Advantages of Time-sharing Systems

   § Reduces CPU idle time
   § Provides advantages of quick response time
   § Offers good computing facility to small users




Ref Page 262       Chapter 14: Operating Systems                     Slide 25/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Memory Management
 Memory Management

   § Memory is important resource of a computer system
     that must be properly managed for the overall system
     performance
   § Memory management module:
       § Keeps track of parts of memory in use and parts not
         in use
       § Allocates memory to processes as needed and
         deallocates when no longer needed




Ref Page 262       Chapter 14: Operating Systems                     Slide 26/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Uniprogramming Memory Model
 Uniprogramming Memory Model

   § Used in systems that process one job only at a time, and
     all system resources are available exclusively for the job
     until it completes
   § Simple and easy to implement
   § Does not lead to proper utilization of the main memory as
     unoccupied memory space by the currently active user
     process remains unused
   § Used only on very small or dedicated computer systems




Ref Page 262       Chapter 14: Operating Systems                     Slide 27/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                    Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Uniprogramming Memory Model
 Uniprogramming Memory Model



               Operating system area    Operating system




                                          User process

                        User area



                                             Unused




Ref Page 263            Chapter 14: Operating Systems                      Slide 28/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

 Multiprogramming Memory Models
 Multiprogramming Memory Models

      Two memory management schemes used to facilitate this
      are:

   § Multiprogramming with fixed number of memory
     partitions: User area of the memory is divided into a
     number of fixed-sized partitions
   § Multiprogramming with variable number of memory
     partitions: Number, size and location of the partitions
     vary dynamically as processes come and go




Ref Page 263       Chapter 14: Operating Systems                     Slide 29/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
 Multiprogramming with Fixed Number of Memory
 Multiprogramming with Fixed Number of Memory
 Partition
 Partition


               Operating system         Operating
                     area                system

                                        Partition 1

                                        Partition 2

               User area divided
               into n equal-sized       Partition 3
                    partitions




                                        Partition n




Ref Page 263     Chapter 14: Operating Systems                       Slide 30/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                         Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
  Multiprogramming with Variable Number of
  Multiprogramming with Variable Number of
  Memory Partitions
  Memory Partitions
                      Time
          Operating            Operating            Operating           Operating
           system               system               system              system
                                   P1                  P1                  P1
                       P1                    P2                  P3
                      comes                comes                comes
                                                       P2                  P2
   User
            Free
   area                           Free
                                                                           P3
                                                      Free
                                                                         Free

               (a)                (b)                  (c)                 (d)
    The number, size, and location of the partitions vary
    dynamically as processes come and go. (contd…)


Ref Page 264                Chapter 14: Operating Systems                        Slide 31/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                          Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Multiprogramming with Variable Number of
  Multiprogramming with Variable Number of
  Memory Partitions
  Memory Partitions

             Operating                   Operating                Operating               Operating
              system                      system                   system                  system
                                                                                             P5
                 P1                         P1                     Free 3
                              P4                                                           Free 3
    P2                                                  P1                       P5
                 P2
                         Comes which        P4
terminates                                           terminates      P4        comes         P4
                         cannot fit in
               Free 2                                                         which can
                          Free 1 so is
                           allocated                                            fit in
                                          Free 2                   Free 2      Free 3      Free 2
                          space from
                             Free 2
                 P3                         P3                       P3                      P3


               Free 1                     Free 1                   Free 1                  Free 1


               (e)                          (f)                     (g)                     (h)

  The number, size, and location of the partitions vary dynamically as processes come and go.



Ref Page 264               Chapter 14: Operating Systems                              Slide 32/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Virtual Memory

      Memory management scheme that allows execution of
      processes that might not be completely loaded in the main
      memory.

      It does not require the entire process to be in memory
      before the process can execute




Ref Page 265       Chapter 14: Operating Systems                     Slide 33/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                            Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Virtual Memory Realization

    Three basic concepts used for its realization are:
  § On-line secondary storage: Used to keep a process’s
    address space ready to be loaded into the memory
  § Swapping: Process of transferring a block of data from
    the on-line secondary storage to main memory
    (swapping in) or vice-versa (swapping out)
  § Demand paging: Scheme of swapping in of pages of a
    process as and when needed during execution of the
    process, rather than loading all the pages before
    starting the process’s execution




Ref Page 265     Chapter 14: Operating Systems                     Slide 34/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Advantages of Virtual Memory

  § Provides a large virtual memory to programmers on a
    system having smaller physical memory
  § Enables execution of a process on a system whose main
    memory size is less than the total memory required by the
    process
  § Enables a process’s execution to be started even when
    sufficient free memory for loading the entire process is not
    available
  § Makes programming easier there no longer need to worry
    about the memory size limitations
  § Often leads to less I/O activity resulting in better
    throughput, turnaround time, and response time




Ref Page 266       Chapter 14: Operating Systems                     Slide 35/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                             Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Disadvantages of Virtual Memory
  Disadvantages of Virtual Memory

  § Difficult to implement because it requires algorithms to
    support demand paging
  § If used carelessly, it may substantially decrease
    performance due to high page fault rate




Ref Page 266      Chapter 14: Operating Systems                     Slide 36/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  File Management

  § A file is a collection of related information
  § Every file has a name, its data and attributes
  § File’s name uniquely identifies it in the system and is used
    by its users to access it
  § File’s data is its contents
  § File’s attributes contain information such as date & time of
    its creation, date & time of last access, date & time of last
    update, its current size, its protection features, etc.
  § File management module of an operating system takes
    care of file-related activities such as structuring,
    accessing, naming, sharing, and protection of files




Ref Page 266       Chapter 14: Operating Systems                     Slide 37/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                             Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  File Access Methods

    Two commonly supported file access methods are:
  § Sequential access: Information stored in a file can be
    accessed sequentially (in the order in which they are
    stored, starting at the beginning)
  § Random access: Information stored in a file can be
    accessed randomly irrespective of the order in which
    the bytes or records are stored




Ref Page 267      Chapter 14: Operating Systems                     Slide 38/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  File Operations

  § Set of commands provided by an operating system to
    deal with files and their contents
  § Typical file operations include create, delete, open,
    close, read, write, seek, get attributes, set attributes,
    rename, and copy




Ref Page 267       Chapter 14: Operating Systems                     Slide 39/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  File Naming

  File naming deals with the rules for naming files in an
  operating system. This may include such rules as:
  § Maximum number of characters that a file name may
    have
  § Special characters allowed in a file name
  § Distinction between upper case and lower case letters
  § Multi-part file names allow file extensions to be part of a
    file name. File extensions indicate something about the
    file and its content
  § Used by applications to check for the intended type of
    file before operating on it




Ref Page 268       Chapter 14: Operating Systems                     Slide 40/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                 Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  File Extensions (Example)
  File Extensions (Example)

        File extension                      Its meaning

        .bas                Basic source program file

        .c                  C source program file
        .ftn                Fortran source program file
        .pas                Pascal source program file
        .obj                Object file (compiler output, not yet linked)

        .bin                Executable binary program file
        .lib                Library of .obj files used by the linker
        .dat                Data file

        .hlp                Text file for HELP command

        .man                Online manual page file


                                                                (Continued on next slide)



Ref Page 268         Chapter 14: Operating Systems                      Slide 41/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                 Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  File Extensions (Example)
  File Extensions (Example)
                                                               (Continued from previous slide)


         File extension                          Its meaning

       .man                  Online manual page file

       .txt                  General text file

       .bak                  Backup file

       .doc                  Microsoft word document file

       .wav                  Microsoft windows sound file

       .wk4                  Lotus 1-2-3 spreadsheet file

       .xls                  Microsoft Excel spreadsheet file

       .jpg                  JPEG graphics file

       .gif                  GIF graphics file




Ref Page 268          Chapter 14: Operating Systems                           Slide 42/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Security

  §    Deals with protecting the various resources and information
       of a computer system against destruction and unauthorized
       access

  §    External security: Deals with securing computer against
       external factors such as fires, floods, earthquakes, stolen
       disks/tapes, etc. by maintaining adequate backup, using
       security guards, allowing access to sensitive information to
       only trusted employees/users, etc.
  §    Internal security: Deals with user authentication, access
       control, and cryptography mechanisms




Ref Page 269       Chapter 14: Operating Systems                     Slide 43/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                             Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Security

  § User authentication: Deals with the problem of
    verifying the identity of a user (person or program)
    before permitting access to the requested resource
  § Access Control: Once authenticated, access control
    mechanisms prohibit a user/process from accessing those
    resources/information that he/she/it is not authorized to
    access
  § Cryptography: Means of encrypting private information
    so that unauthorized access cannot use information




Ref Page 269      Chapter 14: Operating Systems                     Slide 44/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                             Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Command Interpretation

  § Provides a set of commands using which the user can give
    instructions to the computer for getting some job done by
    it
  § Commands supported by the command interpretation
    module are known as system calls




                                                            (Continued on next slide)



Ref Page 269      Chapter 14: Operating Systems                      Slide 45/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Command Interpretation
                                                         (Continued from previous slide)


  Two types of user interfaces supported by various operating
  systems are:
  §   Command-line interface: User gives instructions to
      the computer by typing the commands
  §   Graphical User Interface (GUI): User gives
      commands to the system by selecting icon or menu
      item displayed on the screen with the use of a point-
      and-draw device




Ref Page 269       Chapter 14: Operating Systems                        Slide 46/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  OS Capability Enhancement Software
  OS Capability Enhancement Software

  § Perform several tasks of routine nature, frequently
    needed by users but are not provided as part of the OS

  § They are primarily grouped into three categories:
       § Translating programs: Translate a source program
         into an object program
       § Library programs: Consist of frequently used
         functions and operations
       § Utility programs: Assist users with system
         maintenance tasks such as disk formatting, data
         compression, data backups, antivirus utilities




Ref Page 270       Chapter 14: Operating Systems                     Slide 47/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                              Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  UNIX OS
  UNIX OS

  § Developed in the early 1970s at Bell Laboratories by Ken
    Thompson and Dennis Ritchie
  § Written in C high-level language, hence, highly portable
  § Multi-user, time-sharing OS
  § Used on a wide variety of computers ranging from
    notebook computers to super computers
  § Especially prevalent on RISC workstations such as those
    from Sun Microsystems, Hewlett-Packard, IBM, and
    Silicon Graphics
  § Structured in three layers – kernel, shell, and utilities




Ref Page 272       Chapter 14: Operating Systems                     Slide 48/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                             Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  MS-DOS

  § Stands for Microsoft Disk Operating System.
  § Single-user OS for IBM and IBM-compatible personal
    computers (PC)
  § Structured in three layers – BIOS (Basic Input Output
    System), kernel, and shell
  § Very popular in the 1980s, now not in much use and
    development with the launch of Microsoft Windows OS in
    1990s




Ref Page 272      Chapter 14: Operating Systems                     Slide 49/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                             Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Microsoft Windows

  § Developed by Microsoft to overcome limitations of MS-
    DOS operating system
  § Single-user, multitasking OS
  § Native interface is a GUI
  § Designed to be not just an OS but also a complete
    operating environment
  § OS of choice for most PCs after 1990




Ref Page 272      Chapter 14: Operating Systems                     Slide 50/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                             Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Microsoft Windows NT

  § Multi-user, time-sharing OS developed by Microsoft
  § Designed to have UNIX-like features so that it can be
    used for powerful workstations, network, and database
    servers
  § Supports multiprogramming and is designed to take
    advantage of multiprocessing on systems having
    multiple processors
  § Native interface is a GUI
  § Built-in networking and communications features
  § Provides strict system security
  § Rich set of tools for software development




Ref Page 273      Chapter 14: Operating Systems                     Slide 51/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                             Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Linux

  § Open-source OS enhanced and backed by thousands of
    programmers world-wide
  § Multi-tasking, multiprocessing OS, originally designed to
    be used in PCs
  § Name “Linux” is derived from its inventor Linus Torvalds
  § Several Linux distributions available (Red Hat, SuSE).
    Difference in distribution is mostly set of tools, number
    and quality of applications, documentation, support, and
    service




Ref Page 273      Chapter 14: Operating Systems                     Slide 52/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                      Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Keywords/Phrases
      §   Access control                     §   Memory management
      §   Batch processing                   §   Memory partition
      §   Command interpretation             §   Microsoft Windows
      §   Command-line interface (CLI)       §   Microsoft Windows NT
      §   CPU-bound jobs                     §   MS-DOS
      §   Cryptography                       §   Multiprocessing
      §   Demand paging                      §   Multiprogramming
      §   External security                  §   Multiprogramming with fixed tasks (MFT)
      §   File                               §   Multiprogramming with variable tasks
      §   File attributes                        (MVT)
      §   File extensions                    §   Operating systems
      §   File management                    §   Multithreading
      §   Graphical User Interface (GUI)     §   Process
      §   I/O-bound jobs                     §   Process Control Block (PCB) Multitasking
      §   Internal security                  §   Process management
      §   Job control language (JCL)         §   Random access files
      §   Library programs                   §   Response time
      §   Linux                              §   Security
      §   Loosely coupled system             §   Sequential access files
                                             §   Swapping


                                                                      (Continued on next slide)
Ref Page 274              Chapter 14: Operating Systems                        Slide 53/54
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
                                      Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

  Keywords/Phrases
                                                                 (Continued from previous slide)

         §   Throughput
         §   Tightly coupled system
         §   Time-sharing
         §   Time slice
         §   Time slot
         §   Translating programs
         §   Turnaround time
         §   Unix
         §   User authentication
         §   Utility programs
         §   Virtual machine
         §   Virtual memory




Ref Page 274             Chapter 14: Operating Systems                          Slide 54/54

Weitere ähnliche Inhalte

Was ist angesagt?

Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
Dhaval Kaneria
 
Os structure
Os structureOs structure
Os structure
Mohd Arif
 
introduction To Operating System
introduction To Operating Systemintroduction To Operating System
introduction To Operating System
Luka M G
 
Computer Fundamentals Chapter 07 pam
Computer Fundamentals Chapter  07 pamComputer Fundamentals Chapter  07 pam
Computer Fundamentals Chapter 07 pam
Saumya Sahu
 

Was ist angesagt? (20)

Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel Source
 
process control block
process control blockprocess control block
process control block
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Os structure
Os structureOs structure
Os structure
 
Chapter 1 - introduction - parallel computing
Chapter  1 - introduction - parallel computingChapter  1 - introduction - parallel computing
Chapter 1 - introduction - parallel computing
 
Operating system components
Operating system componentsOperating system components
Operating system components
 
Chapter 3 - Processes
Chapter 3 - ProcessesChapter 3 - Processes
Chapter 3 - Processes
 
introduction To Operating System
introduction To Operating Systemintroduction To Operating System
introduction To Operating System
 
Computer architecture
Computer architecture Computer architecture
Computer architecture
 
Kernel (OS)
Kernel (OS)Kernel (OS)
Kernel (OS)
 
Unix operating system architecture with file structure
Unix operating system architecture with file structure Unix operating system architecture with file structure
Unix operating system architecture with file structure
 
Central Processing Unit
Central Processing Unit Central Processing Unit
Central Processing Unit
 
cpu scheduling in os
cpu scheduling in oscpu scheduling in os
cpu scheduling in os
 
Memory management in linux
Memory management in linuxMemory management in linux
Memory management in linux
 
Shell and its types in LINUX
Shell and its types in LINUXShell and its types in LINUX
Shell and its types in LINUX
 
Computer Fundamentals Chapter 07 pam
Computer Fundamentals Chapter  07 pamComputer Fundamentals Chapter  07 pam
Computer Fundamentals Chapter 07 pam
 
Chapter 01 introduction to Computer
Chapter 01 introduction to ComputerChapter 01 introduction to Computer
Chapter 01 introduction to Computer
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Linux Internals - Interview essentials - 1.0
Linux Internals - Interview essentials - 1.0Linux Internals - Interview essentials - 1.0
Linux Internals - Interview essentials - 1.0
 

Andere mochten auch

Computer Fundamentals
Computer FundamentalsComputer Fundamentals
Computer Fundamentals
Saumya Sahu
 
Computer Fundamentals_Chapter 02 bco
Computer Fundamentals_Chapter 02 bcoComputer Fundamentals_Chapter 02 bco
Computer Fundamentals_Chapter 02 bco
Saumya Sahu
 
Computer Fundamentals Chapter 09 io devices
Computer Fundamentals Chapter 09 io devicesComputer Fundamentals Chapter 09 io devices
Computer Fundamentals Chapter 09 io devices
Saumya Sahu
 
Basic computer fundamentals
Basic computer fundamentalsBasic computer fundamentals
Basic computer fundamentals
James Macalalad
 
Computer Fundamentals Chapter 16 bdp
Computer Fundamentals Chapter 16 bdpComputer Fundamentals Chapter 16 bdp
Computer Fundamentals Chapter 16 bdp
Saumya Sahu
 
Chapter19 multimedia-091006115642-phpapp02 (1)
Chapter19 multimedia-091006115642-phpapp02 (1)Chapter19 multimedia-091006115642-phpapp02 (1)
Chapter19 multimedia-091006115642-phpapp02 (1)
Jay Patel
 
Computer Fundamentals Chapter 08 secondary storage
Computer Fundamentals Chapter 08 secondary storageComputer Fundamentals Chapter 08 secondary storage
Computer Fundamentals Chapter 08 secondary storage
Saumya Sahu
 
Computer Fundamentals Chapter 11 pcp
Computer Fundamentals Chapter 11 pcpComputer Fundamentals Chapter 11 pcp
Computer Fundamentals Chapter 11 pcp
Saumya Sahu
 
Computer Fundamentals Chapter 12 cl
Computer Fundamentals Chapter 12 clComputer Fundamentals Chapter 12 cl
Computer Fundamentals Chapter 12 cl
Saumya Sahu
 

Andere mochten auch (20)

Computer Fundamentals
Computer FundamentalsComputer Fundamentals
Computer Fundamentals
 
Chapter 03 number system
Chapter 03 number systemChapter 03 number system
Chapter 03 number system
 
Computer Fundamentals_Chapter 02 bco
Computer Fundamentals_Chapter 02 bcoComputer Fundamentals_Chapter 02 bco
Computer Fundamentals_Chapter 02 bco
 
Computer Fundamentals Chapter 09 io devices
Computer Fundamentals Chapter 09 io devicesComputer Fundamentals Chapter 09 io devices
Computer Fundamentals Chapter 09 io devices
 
Chapter 05 computer arithmetic
Chapter 05 computer arithmeticChapter 05 computer arithmetic
Chapter 05 computer arithmetic
 
Chapter 04 computer codes
Chapter 04 computer codesChapter 04 computer codes
Chapter 04 computer codes
 
Basic computer fundamentals
Basic computer fundamentalsBasic computer fundamentals
Basic computer fundamentals
 
Computer Fundamentals Chapter 16 bdp
Computer Fundamentals Chapter 16 bdpComputer Fundamentals Chapter 16 bdp
Computer Fundamentals Chapter 16 bdp
 
Chapter 16 bdp
Chapter 16 bdpChapter 16 bdp
Chapter 16 bdp
 
Fundamentals Of Computer
Fundamentals Of ComputerFundamentals Of Computer
Fundamentals Of Computer
 
basics of computer system ppt
basics of computer system pptbasics of computer system ppt
basics of computer system ppt
 
Chapter19 multimedia-091006115642-phpapp02 (1)
Chapter19 multimedia-091006115642-phpapp02 (1)Chapter19 multimedia-091006115642-phpapp02 (1)
Chapter19 multimedia-091006115642-phpapp02 (1)
 
Chapter 10 cs
Chapter 10 csChapter 10 cs
Chapter 10 cs
 
Reciprocal Allocation Method
Reciprocal Allocation MethodReciprocal Allocation Method
Reciprocal Allocation Method
 
Computer Fundamentals Chapter 08 secondary storage
Computer Fundamentals Chapter 08 secondary storageComputer Fundamentals Chapter 08 secondary storage
Computer Fundamentals Chapter 08 secondary storage
 
Chapter 17 dccn
Chapter 17 dccnChapter 17 dccn
Chapter 17 dccn
 
Computer Fundamentals Chapter 11 pcp
Computer Fundamentals Chapter 11 pcpComputer Fundamentals Chapter 11 pcp
Computer Fundamentals Chapter 11 pcp
 
Chapter 21 c language
Chapter 21 c languageChapter 21 c language
Chapter 21 c language
 
Chapter 15 asp
Chapter 15 aspChapter 15 asp
Chapter 15 asp
 
Computer Fundamentals Chapter 12 cl
Computer Fundamentals Chapter 12 clComputer Fundamentals Chapter 12 cl
Computer Fundamentals Chapter 12 cl
 

Ähnlich wie Computer Fundamentals Chapter 14 os

Chapter 07 pam
Chapter 07 pamChapter 07 pam
Chapter 07 pam
IIUI
 
Chapter 07 pam 3o-p
Chapter 07 pam 3o-pChapter 07 pam 3o-p
Chapter 07 pam 3o-p
IIUI
 
Chapter 07 pam 2o-p
Chapter 07 pam 2o-pChapter 07 pam 2o-p
Chapter 07 pam 2o-p
IIUI
 
Software Introduction
Software IntroductionSoftware Introduction
Software Introduction
IIUI
 
Chapter 02 bco 3o-p
Chapter 02 bco 3o-pChapter 02 bco 3o-p
Chapter 02 bco 3o-p
IIUI
 
Chapter 02 bco
Chapter 02 bcoChapter 02 bco
Chapter 02 bco
IIUI
 
Chapter 02 bco 2o-p
Chapter 02 bco 2o-pChapter 02 bco 2o-p
Chapter 02 bco 2o-p
IIUI
 
Chapter 10 cs 2o-p
Chapter 10 cs 2o-pChapter 10 cs 2o-p
Chapter 10 cs 2o-p
IIUI
 

Ähnlich wie Computer Fundamentals Chapter 14 os (20)

Chapter 14 os
Chapter 14 osChapter 14 os
Chapter 14 os
 
Chapter 07 pam
Chapter 07 pamChapter 07 pam
Chapter 07 pam
 
Chapter04 processor and memory
Chapter04   processor and memoryChapter04   processor and memory
Chapter04 processor and memory
 
Chapter 07 pam
Chapter 07 pamChapter 07 pam
Chapter 07 pam
 
Chapter 07 pam 3o-p
Chapter 07 pam 3o-pChapter 07 pam 3o-p
Chapter 07 pam 3o-p
 
Chapter 07 pam 2o-p
Chapter 07 pam 2o-pChapter 07 pam 2o-p
Chapter 07 pam 2o-p
 
Software
SoftwareSoftware
Software
 
Software Introduction
Software IntroductionSoftware Introduction
Software Introduction
 
Computer fundamental basic comuter organization [www.studysharebd.com]
Computer fundamental basic comuter organization [www.studysharebd.com]Computer fundamental basic comuter organization [www.studysharebd.com]
Computer fundamental basic comuter organization [www.studysharebd.com]
 
Chapter 02 bco 3o-p
Chapter 02 bco 3o-pChapter 02 bco 3o-p
Chapter 02 bco 3o-p
 
Chapter 02 bco
Chapter 02 bcoChapter 02 bco
Chapter 02 bco
 
Chapter02 basic computer organization
Chapter02   basic computer organizationChapter02   basic computer organization
Chapter02 basic computer organization
 
Chapter 02 bco
Chapter 02 bcoChapter 02 bco
Chapter 02 bco
 
Chapter 02 bco 2o-p
Chapter 02 bco 2o-pChapter 02 bco 2o-p
Chapter 02 bco 2o-p
 
Chapter 13 sio
Chapter 13 sioChapter 13 sio
Chapter 13 sio
 
Chapter 10 cs 2o-p
Chapter 10 cs 2o-pChapter 10 cs 2o-p
Chapter 10 cs 2o-p
 
Chapter 10 cs
Chapter 10 csChapter 10 cs
Chapter 10 cs
 
Chapter06 computer software
Chapter06   computer softwareChapter06   computer software
Chapter06 computer software
 
Chapter 7-PAM-Slides.pdf
Chapter 7-PAM-Slides.pdfChapter 7-PAM-Slides.pdf
Chapter 7-PAM-Slides.pdf
 
The functionality of a pc
The functionality of a pcThe functionality of a pc
The functionality of a pc
 

Mehr von Saumya Sahu

Paper presentation-nano-robots
Paper presentation-nano-robotsPaper presentation-nano-robots
Paper presentation-nano-robots
Saumya Sahu
 
Paper presentation-nano-robots
Paper presentation-nano-robotsPaper presentation-nano-robots
Paper presentation-nano-robots
Saumya Sahu
 
Engineering Symbols
Engineering SymbolsEngineering Symbols
Engineering Symbols
Saumya Sahu
 
Gate-2013(Computer Science) Que_Ans
Gate-2013(Computer Science) Que_AnsGate-2013(Computer Science) Que_Ans
Gate-2013(Computer Science) Que_Ans
Saumya Sahu
 
Project management
Project managementProject management
Project management
Saumya Sahu
 
Computer Fundamentals Chapter 01 introduction
Computer Fundamentals Chapter 01 introductionComputer Fundamentals Chapter 01 introduction
Computer Fundamentals Chapter 01 introduction
Saumya Sahu
 
Computer networks
Computer networksComputer networks
Computer networks
Saumya Sahu
 
Computer networks (2)
Computer networks (2)Computer networks (2)
Computer networks (2)
Saumya Sahu
 
Software project management
Software project managementSoftware project management
Software project management
Saumya Sahu
 

Mehr von Saumya Sahu (10)

Cloud computing
Cloud computingCloud computing
Cloud computing
 
Paper presentation-nano-robots
Paper presentation-nano-robotsPaper presentation-nano-robots
Paper presentation-nano-robots
 
Paper presentation-nano-robots
Paper presentation-nano-robotsPaper presentation-nano-robots
Paper presentation-nano-robots
 
Engineering Symbols
Engineering SymbolsEngineering Symbols
Engineering Symbols
 
Gate-2013(Computer Science) Que_Ans
Gate-2013(Computer Science) Que_AnsGate-2013(Computer Science) Que_Ans
Gate-2013(Computer Science) Que_Ans
 
Project management
Project managementProject management
Project management
 
Computer Fundamentals Chapter 01 introduction
Computer Fundamentals Chapter 01 introductionComputer Fundamentals Chapter 01 introduction
Computer Fundamentals Chapter 01 introduction
 
Computer networks
Computer networksComputer networks
Computer networks
 
Computer networks (2)
Computer networks (2)Computer networks (2)
Computer networks (2)
 
Software project management
Software project managementSoftware project management
Software project management
 

Computer Fundamentals Chapter 14 os

  • 1. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Chapter 14 Operating Systems Ref Page Chapter 14: Operating Systems Slide 1/54
  • 2. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Learning Objectives In this chapter you will learn about: § Definition and need for operating system § Main functions of an operating system § Commonly used mechanisms for: § Process management § Memory management § File management § Security § Command interpretation module § Some commonly used OS capability enhancement software § Some popular operating systems Ref Page 251 Chapter 14: Operating Systems Slide 2/54
  • 3. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Definition and Need for OS § Integrated set of programs that controls the resources (the CPU, memory, I/O devices, etc.) of a computer system § Provides its users with an interface or virtual machine that is more convenient to use than the bare machine § Two primary objectives of an OS are: § Making a computer system convenient to use § Managing the resources of a computer system Ref Page 251 Chapter 14: Operating Systems Slide 3/54
  • 4. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Logical Architecture of a Computer System Logical Architecture of a Computer System Users Other System Software and Application Programs Operating System The operating system Computer layer hides the details of Hardware the hardware from the programmer and provides the programmer with convenient interface for using the system Ref Page 252 Chapter 14: Operating Systems Slide 4/54
  • 5. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Main Functions of an OS § Process management § Memory management § File management § Security § Command interpretation Ref Page 252 Chapter 14: Operating Systems Slide 5/54
  • 6. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Parameters for Measuring System Parameters for Measuring System Performance Performance § Throughput: Amount of work that the system is able to do per unit time § Turnaround time: Interval from the time of submission of a job to the system for processing to the time of completion of the job § Response time: Interval from the time of submission of a job to the system for processing to the time the first response for the job is produced by the system Ref Page 253 Chapter 14: Operating Systems Slide 6/54
  • 7. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Process Management § A process (also called job) is a program in execution § Process management manages the processes submitted to a system in a manner to minimize idle time of processors (CPUs, I/O processors, etc.) of the system Ref Page 253 Chapter 14: Operating Systems Slide 7/54
  • 8. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Process Management Mechanisms in Process Management Mechanisms in Early Systems Early Systems § Manual loading mechanism: Jobs were manually loaded one after another in a computer by the computer operator § Batch processing mechanism: Batch of jobs was submitted together to the computer and job-to-job transition was done automatically by the operating system § Job Control Language (JCL): Control statements were used to facilitate job loading and unloading Ref Page 253 Chapter 14: Operating Systems Slide 8/54
  • 9. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Use of Job Control Statements in Batch Use of Job Control Statements in Batch Processing (An Example) Processing (An Example) $END Data for program $RUN $LOAD COBOL program $COBOL $JOB, ONGC05839, USER=SINHA Ref Page 255 Chapter 14: Operating Systems Slide 9/54
  • 10. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Multiprogramming § Uniprogramming: Only one job is processed at a time and all system resources are available exclusively for the job until its completion § Multiprogramming: Interleaved execution of two or more different and independent programs by a computer § Types of Multiprogramming: § Multiprogramming with fixed tasks (MFT): Fixed number of jobs can be processed concurrently § Multiprogramming with variable tasks (MVT): Number of jobs can vary § Area occupied by each job residing simultaneously in the main memory is known as a memory partition Ref Page 255 Chapter 14: Operating Systems Slide 10/54
  • 11. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Job § CPU bound: Mostly perform computations with little I/O operations. Scientific and engineering computations usually fall in this category § I/O bound: Mostly perform I/O operations with little computation. Commercial data processing applications usually fall in this category Ref Page 255 Chapter 14: Operating Systems Slide 11/54
  • 12. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Uniprogramming System Main memory Operating OS area system User job User program area Execution in progress CPU Only one job is processed by the system at a time and all the system resources are exclusively available for the job until it completes Ref Page 255 Chapter 14: Operating Systems Slide 12/54
  • 13. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Multiprogramming System Main memory Operating system Writing output data Job A Job B Job C Secondary disk storage (Waiting for CPU) Execution in progress CPU Ref Page 257 Chapter 14: Operating Systems Slide 13/54
  • 14. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Process States in Multiprogramming Process States in Multiprogramming Job is allocated the New CPU for execution Job job Ready Running processing completed I/O completed Job must wait for I/O Blocked completion Ref Page 257 Chapter 14: Operating Systems Slide 14/54
  • 15. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Requirements of Multiprogramming Systems Requirements of Multiprogramming Systems § Large memory § Memory protection § Job status preservation § Proper job mix (CPU and I/O bound jobs) § CPU scheduling Ref Page 257 Chapter 14: Operating Systems Slide 15/54
  • 16. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Process Control Block (PCB) Process Control Block (PCB) process identifier process state program counter values of various CPU registers accounting and scheduling information I/O status information PCB is used to preserve the job status of each loaded process in a multiprogramming system Ref Page 257 Chapter 14: Operating Systems Slide 16/54
  • 17. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Multitasking § Interleaved execution of multiple jobs (often referred to as tasks of same user) in a single-user system § Computer systems used for multitasking are uniprocessor systems (having only one CPU) § Treated differently from multiprogramming that refers to interleaved execution of multiple jobs in a multi- user system Ref Page 258 Chapter 14: Operating Systems Slide 17/54
  • 18. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Multithreading § Thread is basic unit of CPU utilization. Threads share a CPU in the same way as processes do § All threads of a process also share the same set of operating system resources § All threads of a process inherit parent’s address space and security parameters § Each thread of a process has its own program counter, its own register states, and its own stack § Referred as mini-process or lightweight process Ref Page 258 Chapter 14: Operating Systems Slide 18/54
  • 19. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Multithreading System Address space Address space Thread Thread Thread Thread (a) Single-threaded and (b) multithreaded processes. A single-threaded process corresponds to a process of a traditional operating system. [Reproduced with permission, from the book titled Distributed Operating Systems: Concepts and Design by Pradeep K. Sinha. © 1997 IEEE, USA]. Ref Page 259 Chapter 14: Operating Systems Slide 19/54
  • 20. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Multiprocessing § System with two or more CPUs having ability to execute multiple processes concurrently § Multiple CPUs are used to process either instructions from different and independent programs or different instructions from the same program simultaneously § Types of multiprocessing: § Tightly-coupled: Single system-wide primary memory shared by all processors § Loosely-coupled: Each processor has its own local memory Ref Page 259 Chapter 14: Operating Systems Slide 20/54
  • 21. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha CPU, Memory, and I/O Processors of a CPU, Memory, and I/O Processors of a Computer System Computer System Main memory I/O Units I/O CPU Processors Ref Page 260 Chapter 14: Operating Systems Slide 21/54
  • 22. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Multiprocessing System Multiprocessing System Main CPU-1 CPU-2 memory I/O I/O processors processors I/O units I/O units Ref Page 260 Chapter 14: Operating Systems Slide 22/54
  • 23. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Time-sharing Time-sharing § Simultaneous interactive use of a computer system by many users in such a way that each one feels that he/she is the sole user of the system § User terminals connected to the same computer simultaneously § Uses multiprogramming with a special CPU scheduling algorithm § Short period during which a user process gets to use CPU is known as time slice, time slot, or quantum § CPU is taken away from a running process when the allotted time slice expires Ref Page 261 Chapter 14: Operating Systems Slide 23/54
  • 24. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Process State Diagram for a Time-Sharing Process State Diagram for a Time-Sharing System System Job is allocated to Job New CPU for execution Running Ready processing Job completed Allotted time slice is over I/O completed Job must wait for I/O completion Blocked Ref Page 261 Chapter 14: Operating Systems Slide 24/54
  • 25. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Advantages of Time-sharing Systems Advantages of Time-sharing Systems § Reduces CPU idle time § Provides advantages of quick response time § Offers good computing facility to small users Ref Page 262 Chapter 14: Operating Systems Slide 25/54
  • 26. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Memory Management Memory Management § Memory is important resource of a computer system that must be properly managed for the overall system performance § Memory management module: § Keeps track of parts of memory in use and parts not in use § Allocates memory to processes as needed and deallocates when no longer needed Ref Page 262 Chapter 14: Operating Systems Slide 26/54
  • 27. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Uniprogramming Memory Model Uniprogramming Memory Model § Used in systems that process one job only at a time, and all system resources are available exclusively for the job until it completes § Simple and easy to implement § Does not lead to proper utilization of the main memory as unoccupied memory space by the currently active user process remains unused § Used only on very small or dedicated computer systems Ref Page 262 Chapter 14: Operating Systems Slide 27/54
  • 28. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Uniprogramming Memory Model Uniprogramming Memory Model Operating system area Operating system User process User area Unused Ref Page 263 Chapter 14: Operating Systems Slide 28/54
  • 29. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Multiprogramming Memory Models Multiprogramming Memory Models Two memory management schemes used to facilitate this are: § Multiprogramming with fixed number of memory partitions: User area of the memory is divided into a number of fixed-sized partitions § Multiprogramming with variable number of memory partitions: Number, size and location of the partitions vary dynamically as processes come and go Ref Page 263 Chapter 14: Operating Systems Slide 29/54
  • 30. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Multiprogramming with Fixed Number of Memory Multiprogramming with Fixed Number of Memory Partition Partition Operating system Operating area system Partition 1 Partition 2 User area divided into n equal-sized Partition 3 partitions Partition n Ref Page 263 Chapter 14: Operating Systems Slide 30/54
  • 31. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Multiprogramming with Variable Number of Multiprogramming with Variable Number of Memory Partitions Memory Partitions Time Operating Operating Operating Operating system system system system P1 P1 P1 P1 P2 P3 comes comes comes P2 P2 User Free area Free P3 Free Free (a) (b) (c) (d) The number, size, and location of the partitions vary dynamically as processes come and go. (contd…) Ref Page 264 Chapter 14: Operating Systems Slide 31/54
  • 32. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Multiprogramming with Variable Number of Multiprogramming with Variable Number of Memory Partitions Memory Partitions Operating Operating Operating Operating system system system system P5 P1 P1 Free 3 P4 Free 3 P2 P1 P5 P2 Comes which P4 terminates terminates P4 comes P4 cannot fit in Free 2 which can Free 1 so is allocated fit in Free 2 Free 2 Free 3 Free 2 space from Free 2 P3 P3 P3 P3 Free 1 Free 1 Free 1 Free 1 (e) (f) (g) (h) The number, size, and location of the partitions vary dynamically as processes come and go. Ref Page 264 Chapter 14: Operating Systems Slide 32/54
  • 33. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Virtual Memory Memory management scheme that allows execution of processes that might not be completely loaded in the main memory. It does not require the entire process to be in memory before the process can execute Ref Page 265 Chapter 14: Operating Systems Slide 33/54
  • 34. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Virtual Memory Realization Three basic concepts used for its realization are: § On-line secondary storage: Used to keep a process’s address space ready to be loaded into the memory § Swapping: Process of transferring a block of data from the on-line secondary storage to main memory (swapping in) or vice-versa (swapping out) § Demand paging: Scheme of swapping in of pages of a process as and when needed during execution of the process, rather than loading all the pages before starting the process’s execution Ref Page 265 Chapter 14: Operating Systems Slide 34/54
  • 35. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Advantages of Virtual Memory § Provides a large virtual memory to programmers on a system having smaller physical memory § Enables execution of a process on a system whose main memory size is less than the total memory required by the process § Enables a process’s execution to be started even when sufficient free memory for loading the entire process is not available § Makes programming easier there no longer need to worry about the memory size limitations § Often leads to less I/O activity resulting in better throughput, turnaround time, and response time Ref Page 266 Chapter 14: Operating Systems Slide 35/54
  • 36. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Disadvantages of Virtual Memory Disadvantages of Virtual Memory § Difficult to implement because it requires algorithms to support demand paging § If used carelessly, it may substantially decrease performance due to high page fault rate Ref Page 266 Chapter 14: Operating Systems Slide 36/54
  • 37. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha File Management § A file is a collection of related information § Every file has a name, its data and attributes § File’s name uniquely identifies it in the system and is used by its users to access it § File’s data is its contents § File’s attributes contain information such as date & time of its creation, date & time of last access, date & time of last update, its current size, its protection features, etc. § File management module of an operating system takes care of file-related activities such as structuring, accessing, naming, sharing, and protection of files Ref Page 266 Chapter 14: Operating Systems Slide 37/54
  • 38. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha File Access Methods Two commonly supported file access methods are: § Sequential access: Information stored in a file can be accessed sequentially (in the order in which they are stored, starting at the beginning) § Random access: Information stored in a file can be accessed randomly irrespective of the order in which the bytes or records are stored Ref Page 267 Chapter 14: Operating Systems Slide 38/54
  • 39. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha File Operations § Set of commands provided by an operating system to deal with files and their contents § Typical file operations include create, delete, open, close, read, write, seek, get attributes, set attributes, rename, and copy Ref Page 267 Chapter 14: Operating Systems Slide 39/54
  • 40. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha File Naming File naming deals with the rules for naming files in an operating system. This may include such rules as: § Maximum number of characters that a file name may have § Special characters allowed in a file name § Distinction between upper case and lower case letters § Multi-part file names allow file extensions to be part of a file name. File extensions indicate something about the file and its content § Used by applications to check for the intended type of file before operating on it Ref Page 268 Chapter 14: Operating Systems Slide 40/54
  • 41. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha File Extensions (Example) File Extensions (Example) File extension Its meaning .bas Basic source program file .c C source program file .ftn Fortran source program file .pas Pascal source program file .obj Object file (compiler output, not yet linked) .bin Executable binary program file .lib Library of .obj files used by the linker .dat Data file .hlp Text file for HELP command .man Online manual page file (Continued on next slide) Ref Page 268 Chapter 14: Operating Systems Slide 41/54
  • 42. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha File Extensions (Example) File Extensions (Example) (Continued from previous slide) File extension Its meaning .man Online manual page file .txt General text file .bak Backup file .doc Microsoft word document file .wav Microsoft windows sound file .wk4 Lotus 1-2-3 spreadsheet file .xls Microsoft Excel spreadsheet file .jpg JPEG graphics file .gif GIF graphics file Ref Page 268 Chapter 14: Operating Systems Slide 42/54
  • 43. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Security § Deals with protecting the various resources and information of a computer system against destruction and unauthorized access § External security: Deals with securing computer against external factors such as fires, floods, earthquakes, stolen disks/tapes, etc. by maintaining adequate backup, using security guards, allowing access to sensitive information to only trusted employees/users, etc. § Internal security: Deals with user authentication, access control, and cryptography mechanisms Ref Page 269 Chapter 14: Operating Systems Slide 43/54
  • 44. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Security § User authentication: Deals with the problem of verifying the identity of a user (person or program) before permitting access to the requested resource § Access Control: Once authenticated, access control mechanisms prohibit a user/process from accessing those resources/information that he/she/it is not authorized to access § Cryptography: Means of encrypting private information so that unauthorized access cannot use information Ref Page 269 Chapter 14: Operating Systems Slide 44/54
  • 45. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Command Interpretation § Provides a set of commands using which the user can give instructions to the computer for getting some job done by it § Commands supported by the command interpretation module are known as system calls (Continued on next slide) Ref Page 269 Chapter 14: Operating Systems Slide 45/54
  • 46. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Command Interpretation (Continued from previous slide) Two types of user interfaces supported by various operating systems are: § Command-line interface: User gives instructions to the computer by typing the commands § Graphical User Interface (GUI): User gives commands to the system by selecting icon or menu item displayed on the screen with the use of a point- and-draw device Ref Page 269 Chapter 14: Operating Systems Slide 46/54
  • 47. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha OS Capability Enhancement Software OS Capability Enhancement Software § Perform several tasks of routine nature, frequently needed by users but are not provided as part of the OS § They are primarily grouped into three categories: § Translating programs: Translate a source program into an object program § Library programs: Consist of frequently used functions and operations § Utility programs: Assist users with system maintenance tasks such as disk formatting, data compression, data backups, antivirus utilities Ref Page 270 Chapter 14: Operating Systems Slide 47/54
  • 48. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha UNIX OS UNIX OS § Developed in the early 1970s at Bell Laboratories by Ken Thompson and Dennis Ritchie § Written in C high-level language, hence, highly portable § Multi-user, time-sharing OS § Used on a wide variety of computers ranging from notebook computers to super computers § Especially prevalent on RISC workstations such as those from Sun Microsystems, Hewlett-Packard, IBM, and Silicon Graphics § Structured in three layers – kernel, shell, and utilities Ref Page 272 Chapter 14: Operating Systems Slide 48/54
  • 49. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha MS-DOS § Stands for Microsoft Disk Operating System. § Single-user OS for IBM and IBM-compatible personal computers (PC) § Structured in three layers – BIOS (Basic Input Output System), kernel, and shell § Very popular in the 1980s, now not in much use and development with the launch of Microsoft Windows OS in 1990s Ref Page 272 Chapter 14: Operating Systems Slide 49/54
  • 50. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Microsoft Windows § Developed by Microsoft to overcome limitations of MS- DOS operating system § Single-user, multitasking OS § Native interface is a GUI § Designed to be not just an OS but also a complete operating environment § OS of choice for most PCs after 1990 Ref Page 272 Chapter 14: Operating Systems Slide 50/54
  • 51. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Microsoft Windows NT § Multi-user, time-sharing OS developed by Microsoft § Designed to have UNIX-like features so that it can be used for powerful workstations, network, and database servers § Supports multiprogramming and is designed to take advantage of multiprocessing on systems having multiple processors § Native interface is a GUI § Built-in networking and communications features § Provides strict system security § Rich set of tools for software development Ref Page 273 Chapter 14: Operating Systems Slide 51/54
  • 52. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Linux § Open-source OS enhanced and backed by thousands of programmers world-wide § Multi-tasking, multiprocessing OS, originally designed to be used in PCs § Name “Linux” is derived from its inventor Linus Torvalds § Several Linux distributions available (Red Hat, SuSE). Difference in distribution is mostly set of tools, number and quality of applications, documentation, support, and service Ref Page 273 Chapter 14: Operating Systems Slide 52/54
  • 53. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Keywords/Phrases § Access control § Memory management § Batch processing § Memory partition § Command interpretation § Microsoft Windows § Command-line interface (CLI) § Microsoft Windows NT § CPU-bound jobs § MS-DOS § Cryptography § Multiprocessing § Demand paging § Multiprogramming § External security § Multiprogramming with fixed tasks (MFT) § File § Multiprogramming with variable tasks § File attributes (MVT) § File extensions § Operating systems § File management § Multithreading § Graphical User Interface (GUI) § Process § I/O-bound jobs § Process Control Block (PCB) Multitasking § Internal security § Process management § Job control language (JCL) § Random access files § Library programs § Response time § Linux § Security § Loosely coupled system § Sequential access files § Swapping (Continued on next slide) Ref Page 274 Chapter 14: Operating Systems Slide 53/54
  • 54. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Keywords/Phrases (Continued from previous slide) § Throughput § Tightly coupled system § Time-sharing § Time slice § Time slot § Translating programs § Turnaround time § Unix § User authentication § Utility programs § Virtual machine § Virtual memory Ref Page 274 Chapter 14: Operating Systems Slide 54/54