Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Computers4 Ch2


Published on

Chapter 2 Lectures - Part II

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Computers4 Ch2

  1. 1. Operating System and Utility Programs Chapter 2 B.M.H
  2. 2. Computer System <ul><li>Hardware </li></ul><ul><ul><li>Input device </li></ul></ul><ul><ul><li>Processor (CPU) </li></ul></ul><ul><ul><li>Output device </li></ul></ul><ul><ul><li>Storage (secondary storage) </li></ul></ul><ul><li>Software </li></ul><ul><ul><li>System SW </li></ul></ul><ul><ul><li>Application SW </li></ul></ul><ul><li>People </li></ul>MIU
  3. 3. Learning Objectives <ul><li>OS for large computer systems </li></ul><ul><ul><li>The method of resource allocation </li></ul></ul><ul><li>Utility Programs </li></ul>MIU
  4. 4. Mainframes <ul><li>Large, fast and fairly expensive computers </li></ul><ul><li>Used by business or government to provide centralized storage </li></ul><ul><li>EX) IBM 4381, 9300, 3090, Cyber 180 </li></ul>MIU
  5. 5. MIU
  6. 6. OS for large computers <ul><li>Large computer - mainframes </li></ul><ul><ul><li>Around about twice as long as PCs </li></ul></ul><ul><ul><li>Owned by businesses and universities </li></ul></ul><ul><ul><li>Used by many people at once </li></ul></ul><ul><ul><li>Present special (sharing) problems </li></ul></ul><ul><ul><ul><li>Program, CPU, memory, storage, printer </li></ul></ul></ul><ul><li>OS : take care of these things behind the scenes </li></ul><ul><ul><li>So that User can share the computer ’ s resources </li></ul></ul>MIU
  7. 7. Resource Allocation <ul><li>Allocated? </li></ul><ul><ul><li>Shared resources </li></ul></ul><ul><ul><li>(Allocate : give something to somebody for special purpose) </li></ul></ul><ul><li>Resources allocation </li></ul><ul><ul><li>: the process of assigning computer resources to certain programs </li></ul></ul>MIU
  8. 8. Resource Allocation <ul><li>Sharing a CPU </li></ul><ul><li>Sharing a Memory </li></ul><ul><li>Sharing Storage Resources </li></ul><ul><li>Sharing Printing Resources </li></ul>MIU
  9. 9. Sharing the CPU <ul><li>Most computers have a single CPU. </li></ul><ul><ul><li>All programs must share it. </li></ul></ul><ul><li>The sharing process </li></ul><ul><ul><li>Controlled by the OS </li></ul></ul><ul><ul><li>Two approaches to sharing </li></ul></ul><ul><ul><ul><li>Multiprogramming </li></ul></ul></ul><ul><ul><ul><li>Time-sharing </li></ul></ul></ul><ul><ul><ul><li> Multiprocessing </li></ul></ul></ul>MIU (Resource allocation)
  10. 10. Multiprocessing <ul><li>The use of a powerful computer with multiple CPUs </li></ul><ul><li>Multiple programs can run simultaneously , each using its own processor </li></ul>MIU (Resource allocation)
  11. 11. Multiprogramming <ul><li>Only one Central Processing Unit </li></ul><ul><li>Two or more programs are executed in the same time frame, concurrently </li></ul><ul><ul><li>But not exactly at the same instant </li></ul></ul><ul><ul><li>Taking turns ; one program runs for a while, and then another one runs </li></ul></ul><ul><li>Event-driven </li></ul><ul><ul><li>Programs share resources based on events that take place in the programs. </li></ul></ul>MIU (Resource allocation)
  12. 12. Multiprogramming <ul><li>Implemented by OS through a system of interrupts </li></ul><ul><ul><li>Interrupts </li></ul></ul><ul><ul><ul><li>A signal that causes normal program processing to be suspended temporarily. </li></ul></ul></ul>MIU
  13. 13. Time-Sharing <ul><li>A special case of multiprogramming </li></ul><ul><li>Time-driven </li></ul><ul><ul><li>To give each user a time slice </li></ul></ul><ul><ul><li>The OS doesn ’ t wait for completion of an event </li></ul></ul><ul><ul><ul><li>At the end of the time slice, the resources are taken away from the user and given to someone else </li></ul></ul></ul>MIU (Resource allocation)
  14. 14. Sharing Memory <ul><li>Memory management </li></ul><ul><ul><li>The process of </li></ul></ul><ul><ul><ul><li>allocating memory to programs and </li></ul></ul></ul><ul><ul><ul><li>keeping the programs in memory separate from one another </li></ul></ul></ul><ul><ul><li>Methods </li></ul></ul><ul><ul><ul><li>Partitions (or regions) </li></ul></ul></ul><ul><ul><ul><li>Foreground and background </li></ul></ul></ul><ul><ul><ul><li>Virtual storage </li></ul></ul></ul>MIU (Resource allocation)
  15. 15. Partitions <ul><li>Some systems simply divide memory into separate areas (partitions or regions) </li></ul><ul><ul><li>Each of which can hold a program </li></ul></ul>MIU Sharing Memory
  16. 16. Foreground and Background <ul><li>Large all-purposed computers divide the memory into foreground and background </li></ul><ul><li>In a time-sharing environment </li></ul><ul><ul><li>Foreground </li></ul></ul><ul><ul><ul><li>For programs that have higher priority </li></ul></ul></ul><ul><ul><ul><li>: Interactive program (with the user at a terminal awaiting response) </li></ul></ul></ul><ul><ul><ul><li>Receive more CPU time </li></ul></ul></ul><ul><ul><li>Background </li></ul></ul><ul><ul><ul><li>For programs with less pressing schedules </li></ul></ul></ul><ul><ul><ul><li>lower priorities and less CPU time </li></ul></ul></ul>MIU Sharing Memory
  17. 17. Virtual Storage (1) <ul><li>Many computer systems uses this technique </li></ul><ul><li>Called virtual memory </li></ul><ul><ul><li>Virtual : made to appear to exist by the use of computer SW </li></ul></ul><ul><li>The programs currently being executed are stored on disk , </li></ul><ul><li>portions of these programs </li></ul><ul><ul><li>are brought into memory as needed. </li></ul></ul><ul><ul><li>Memory : real storage </li></ul></ul><ul><ul><li>Secondary storage : virtual storage </li></ul></ul>MIU Sharing Memory
  18. 18. Virtual Storage (2) <ul><li>Paging </li></ul><ul><ul><li>one way of virtual storage </li></ul></ul><ul><ul><li>the process of </li></ul></ul><ul><ul><ul><li>dividing a program into equal-size pieces </li></ul></ul></ul><ul><ul><ul><li>; called pages </li></ul></ul></ul><ul><ul><ul><li>storing them in equal-size memory spaces </li></ul></ul></ul><ul><ul><ul><li>; called page frames </li></ul></ul></ul><ul><ul><li>All pages and page frames </li></ul></ul><ul><ul><ul><li>: the same fixed size (ex. 2 or 4 KB) </li></ul></ul></ul>MIU Sharing Memory  Refer to Fig 2-11
  19. 19. Sharing Storage Resources <ul><li>More than user want to read or write a record </li></ul><ul><ul><li>from the same disk pack at the same time </li></ul></ul><ul><li>OS </li></ul><ul><ul><li>Keeps track of which file is where </li></ul></ul><ul><ul><li>Responds to commands to manipulate files </li></ul></ul><ul><ul><li>Keeps track of the Input and output requests </li></ul></ul><ul><ul><li>Processes them </li></ul></ul><ul><ul><ul><li>In the order in which they were received </li></ul></ul></ul><ul><ul><li>Routes any program instruction to read or write a record </li></ul></ul>MIU Resource allocation
  20. 20. Sharing Printing Resources <ul><li>Spooling </li></ul><ul><ul><li>A process for sharing a printer </li></ul></ul><ul><ul><ul><li>Moving data and store it for a short time on a disk before it is printed </li></ul></ul></ul><ul><ul><ul><ul><li>Each program writes onto a disk each line that is to be printed </li></ul></ul></ul></ul><ul><ul><ul><li>The disk file is placed into a queue </li></ul></ul></ul><ul><ul><ul><li>It is printed when the printer becomes available </li></ul></ul></ul>MIU Resource allocation
  21. 21. Utility Programs File Manager Back up and Restore File Compression Defragmenter Device Drivers
  22. 22. Utility Programs (1) <ul><li>Most of the resource allocation tasks </li></ul><ul><ul><li>: done by the OS without user involvement </li></ul></ul><ul><li>Utility Programs </li></ul><ul><ul><li>: perform explicit services at the user ’ s request </li></ul></ul><ul><ul><li>Utility : a piece of computer SW that performs a particular task </li></ul></ul><ul><ul><li>Part of the system software, not part of the OS. </li></ul></ul><ul><ul><li>Some utilities are packaged with OSs </li></ul></ul><ul><ul><li>Others can be purchased separately </li></ul></ul>MIU
  23. 23. Utility Programs (2) <ul><li>To avoid duplication of effort </li></ul><ul><ul><li>Backing up </li></ul></ul><ul><ul><li>Restoring files </li></ul></ul><ul><ul><li>Compressing files and entire hard disks </li></ul></ul><ul><ul><li>Locating files </li></ul></ul><ul><ul><li>Searching computer viruses </li></ul></ul>MIU
  24. 24. File manager (1) <ul><li>Organize and manage files in a hierarchical directory structure </li></ul><ul><ul><li>organized in a way that makes sense to you </li></ul></ul><ul><ul><li>Directory </li></ul></ul><ul><ul><ul><li>: a named area in storage that can contain files and other directories </li></ul></ul></ul><ul><ul><ul><li>The newer versions of Windows </li></ul></ul></ul><ul><ul><ul><ul><li>: Refer to directories as folders </li></ul></ul></ul></ul>MIU Utility Programs
  25. 25. File manager (2) <ul><li>Functions </li></ul><ul><ul><li>Enable you to create the directory structure </li></ul></ul><ul><ul><li>Display lists of files in directories </li></ul></ul><ul><ul><ul><li>; to copy, move, rename, and delete files </li></ul></ul></ul><ul><ul><ul><li>; and to format and copy diskettes </li></ul></ul></ul>MIU Utility Programs
  26. 26. Back up and Restore <ul><li>Make backups of entire hard drives or of selected directories </li></ul><ul><ul><li>Backing up files involves </li></ul></ul><ul><ul><ul><li>Making duplicate copies </li></ul></ul></ul><ul><ul><ul><li>Storing them in a safe place </li></ul></ul></ul><ul><ul><li>These backups could be made to </li></ul></ul><ul><ul><ul><li>Diskettes, high capacity media (CD, tape) </li></ul></ul></ul><ul><li>Create the backup files in a specific format to minimize space requirements </li></ul><ul><li>Needed the restore routine to use them </li></ul>MIU Utility Programs
  27. 27. File Compression <ul><li>Reduces the amount of space of a file </li></ul><ul><li>Compressed file </li></ul><ul><ul><li>Take up less space on disk </li></ul></ul><ul><ul><li>Take less time to transmit across communication line </li></ul></ul><ul><ul><li>Must be uncompressed into their original form before using them </li></ul></ul><ul><li>Ex) PKZIP, WinZip,RAR </li></ul>MIU Utility Programs
  28. 28. Defragmenter <ul><li>Reorganize the files on the disk </li></ul><ul><ul><li>so that all files are stored in contiguous locations </li></ul></ul><ul><ul><li>Ex) Windows : Disk Defragmenter </li></ul></ul><ul><ul><li>Fragmented: noncontiguous storing because of not enough space. </li></ul></ul>MIU Utility Programs
  29. 29. Device Drivers (1) <ul><li>Allow the OS to communicate with peripherals </li></ul><ul><ul><li>Accepts standard commands from the OS </li></ul></ul><ul><ul><li>Converts them into the proper format </li></ul></ul><ul><ul><li>for the device it supports </li></ul></ul>MIU Utility Programs
  30. 30. Device Drivers (2) <ul><li>Manufactures </li></ul><ul><ul><li>Provide device drivers for their products </li></ul></ul><ul><ul><li>Installing the product </li></ul></ul><ul><ul><li>: includes copying the appropriate driver to your hard drive </li></ul></ul>MIU Utility Programs