Computers4 Ch2

download Computers4 Ch2

of 30

  • date post

    13-Dec-2014
  • Category

    Technology

  • view

    366
  • download

    1

Embed Size (px)

description

Chapter 2 Lectures - Part II

Transcript of Computers4 Ch2

  • 1. Operating Systemand Utility Programs Chapter 2 B.M.H

2. Computer System

  • Hardware
    • Input device
    • Processor (CPU)
    • Output device
    • Storage (secondary storage)
  • Software
    • System SW
    • Application SW
  • People

MIU 3. Learning Objectives

  • OS for large computer systems
    • The method of resource allocation
  • Utility Programs

MIU 4. Mainframes

  • Large, fast and fairly expensive computers
  • Used by business or governmentto provide centralized storage
  • EX) IBM 4381, 9300, 3090, Cyber 180

MIU 5. MIU 6. OS for large computers

  • Large computer - mainframes
    • Around about twice as long as PCs
    • Owned by businesses and universities
    • Used by many people at once
    • Present special (sharing) problems
      • Program, CPU, memory, storage, printer
  • OS : take care of these things behind the scenes
    • So that User can share the computer s resources

MIU 7. Resource Allocation

  • Allocated?
    • Shared resources
    • (Allocate : give something to somebody for special purpose)
  • Resources allocation
    • : the process of assigning computer resources to certain programs

MIU 8. Resource Allocation

  • Sharinga CPU
  • Sharinga Memory
  • SharingStorage Resources
  • SharingPrinting Resources

MIU 9. Sharing the CPU

  • Most computers have a single CPU.
    • All programs must share it.
  • The sharing process
    • Controlled by the OS
    • Two approaches to sharing
      • Multiprogramming
      • Time-sharing
      • Multiprocessing

MIU (Resource allocation) 10. Multiprocessing

  • The use of a powerful computer withmultiple CPUs
  • Multiple programs can runsimultaneously , each using its own processor

MIU (Resource allocation) 11. Multiprogramming

  • Onlyone Central Processing Unit
  • Two or more programs are executed in the same time frame,concurrently
    • But not exactly at the same instant
    • Taking turns ; one program runs for a while, and then another one runs
  • Event-driven
    • Programs share resources based on events that take place in the programs.

MIU (Resource allocation) 12. Multiprogramming

  • Implemented by OS through a system of interrupts
    • Interrupts
      • A signal that causes normal program processing to be suspended temporarily.

MIU 13. Time-Sharing

  • A special case of multiprogramming
  • Time-driven
    • To give each user a time slice
    • The OS doesn t wait for completion of an event
      • At the end of the time slice, the resources are taken away from the user and given to someone else

MIU (Resource allocation) 14. Sharing Memory

  • Memory management
    • The process of
      • allocating memory to programs and
      • keeping the programs in memory separate from one another
    • Methods
      • Partitions (or regions)
      • Foreground and background
      • Virtual storage

MIU (Resource allocation) 15. Partitions

  • Some systems simply divide memory into separate areas (partitions or regions)
    • Each of which can hold a program

MIU Sharing Memory 16. Foreground and Background

  • Large all-purposed computers divide the memory into foreground and background
  • In a time-sharing environment
    • Foreground
      • For programs that havehigher priority
      • : Interactive program (with the user at a terminal awaiting response)
      • Receive more CPU time
    • Background
      • For programs with less pressing schedules
      • lower prioritiesand less CPU time

MIU Sharing Memory 17. Virtual Storage (1)

  • Many computer systems uses this technique
  • Calledvirtual memory
    • Virtual : made to appear to exist by the use of computer SW
  • The programs currently being executed are stored ondisk ,
  • portions of these programs
    • are brought intomemoryas needed.
    • Memory : real storage
    • Secondary storage : virtual storage

MIU Sharing Memory 18. Virtual Storage (2)

  • Paging
    • one way of virtual storage
    • the process of
      • dividing a program into equal-size pieces
      • ; calledpages
      • storing them in equal-size memory spaces
      • ; calledpage frames
    • All pages and page frames
      • : the same fixed size (ex. 2 or 4 KB)

MIU Sharing Memory Refer to Fig 2-11 19. Sharing Storage Resources

  • More than user want to read or write a record
    • from the same disk pack at the same time
  • OS
    • Keeps track of which file is where
    • Responds to commands to manipulate files
    • Keeps track of the Input and output requests
    • Processes them
      • In the order in which they were received
    • Routes any program instruction to read or write a record

MIU Resource allocation 20. Sharing Printing Resources

  • Spooling
    • A process for sharing a printer
      • Moving data and store it for a short time on adiskbefore it is printed
        • Each program writes onto a disk each line that is to be printed
      • The disk file is placed into aqueue
      • It is printed when the printer becomes available

MIU Resource allocation 21. Utility Programs File Manager Back up and Restore File Compression Defragmenter Device Drivers 22. Utility Programs (1)

  • Most of the resource allocation tasks
    • : done by the OS without user involvement
  • Utility Programs
    • : perform explicit servicesat the user s request
    • Utility : a piece of computer SW that performs a particular task
    • Part of the system software, not part of the OS.
    • Some utilities are packaged with OSs
    • Others can be purchased separately

MIU 23. Utility Programs (2)

  • To avoid duplication of effort
    • Backing up
    • Restoring files
    • Compressing files and entire hard disks
    • Locating files
    • Searching computer viruses

MIU 24. File manager (1)

  • Organize and manage files in a hierarchical directory structure
    • organized in a way that makes sense to you
    • Directory
      • : a named area in storage that can contain files and other directories
      • The newer versions of Windows