Post on 13-Dec-2014
description
Mongolia International University
Operating System Operating System and Utility Programsand Utility Programs
Chapter 2Chapter 2
B.M.HB.M.H
Computers MIU
Computer SystemComputer System
HardwareHardware Input deviceInput device Processor (CPU)Processor (CPU) Output deviceOutput device Storage (secondary storage)Storage (secondary storage)
SoftwareSoftware System SWSystem SW Application SWApplication SW
People People
Computers MIU
Learning ObjectivesLearning Objectives
OS for large computer systemsOS for large computer systems The method of resource allocation The method of resource allocation
Utility ProgramsUtility Programs
Computers MIU
MainframesMainframes
Large, fast and fairly Large, fast and fairly expensive computersexpensive computers
Used by business or Used by business or governmentgovernment to provide to provide centralized storagecentralized storage
EX) IBM 4381, 9300, EX) IBM 4381, 9300, 3090, Cyber 1803090, Cyber 180
Computers MIU
Computers MIU
OS for large computersOS for large computers
Large computer - mainframesLarge computer - mainframes Around about twice as long as PCsAround about twice as long as PCs Owned by businesses and universitiesOwned by businesses and universities Used by many people at onceUsed by many people at once Present special (sharing) problems Present special (sharing) problems
Program, CPU, memory, storage, printer
OS : take care of these things behind the OS : take care of these things behind the scenesscenes So that User can share the computerSo that User can share the computer’’s resourcess resources
Computers MIU
Resource AllocationResource Allocation
Allocated?Allocated? Shared resourcesShared resources (Allocate : give something to somebody for special purpose)(Allocate : give something to somebody for special purpose)
Resources allocationResources allocation : the process of assigning computer : the process of assigning computer
resources to certain programsresources to certain programs
Computers MIU
Resource AllocationResource Allocation
Sharing Sharing a CPUa CPU Sharing Sharing a Memorya Memory Sharing Sharing Storage ResourcesStorage Resources Sharing Sharing Printing ResourcesPrinting Resources
Computers MIU
Sharing the CPUSharing the CPU
Most computers have a single Most computers have a single CPU.CPU. All programs must share it.All programs must share it.
The sharing processThe sharing process Controlled by the OSControlled by the OS Two approaches to sharingTwo approaches to sharing
Multiprogramming Time-sharing Multiprocessing
(Resource allocation)
Computers MIU
MultiprocessingMultiprocessing
The use of a powerful computer with The use of a powerful computer with multiple CPUsmultiple CPUs
Multiple programs can run Multiple programs can run simultaneouslysimultaneously, each using its own , each using its own processorprocessor
(Resource allocation)
Computers MIU
MultiprogrammingMultiprogramming
Only Only one Central Processing Unitone Central Processing Unit
Two or more programs are executed in the Two or more programs are executed in the same time frame, same time frame, concurrentlyconcurrently But not exactly at the same instantBut not exactly at the same instant Taking turns ; one program runs for a while, and Taking turns ; one program runs for a while, and
then another one runsthen another one runs
Event-drivenEvent-driven Programs share resources based on events that take Programs share resources based on events that take
place in the programs.place in the programs.
(Resource allocation)
Computers MIU
MultiprogramminMultiprogrammingg
Implemented by OS through a system of Implemented by OS through a system of interruptsinterrupts InterruptsInterrupts
A signal that causes normal program processing to be suspended temporarily.
Computers MIU
Time-SharingTime-Sharing
A special case of multiprogrammingA special case of multiprogramming
Time-drivenTime-driven To give each user a time sliceTo give each user a time slice The OS doesnThe OS doesn’’t wait for completion of an t wait for completion of an
eventevent At the end of the time slice, the resources are taken
away from the user and given to someone else
(Resource allocation)
Computers MIU
Sharing MemorySharing Memory
Memory managementMemory management The process of The process of
allocating memory to programs and keeping the programs in memory separate from one
another Methods Methods
Partitions (or regions) Foreground and background Virtual storage
(Resource allocation)
Computers MIU
PartitionsPartitions
Some systems simply divide memory Some systems simply divide memory into separate areas (partitions or into separate areas (partitions or regions)regions) Each of which can hold a programEach of which can hold a program
Sharing Memory
Computers MIU
Foreground and Foreground and BackgroundBackground
Large all-purposed computers divide the Large all-purposed computers divide the memory into foreground and backgroundmemory into foreground and background
In a time-sharing environmentIn a time-sharing environment ForegroundForeground
For programs that have higher priority : Interactive program (with the user at a terminal awaiting
response) Receive more CPU time
BackgroundBackground For programs with less pressing schedules lower priorities and less CPU time
Sharing Memory
Computers MIU
Virtual Storage (1)Virtual Storage (1)
Many computer systems uses this technique Many computer systems uses this technique
Called Called virtual memoryvirtual memory Virtual : made to appear to exist by the use of Virtual : made to appear to exist by the use of
computer SWcomputer SW
The programs currently being executed are The programs currently being executed are stored on stored on diskdisk,,
portions of these programs portions of these programs
are brought into are brought into memorymemory as needed. as needed. Memory : real storageMemory : real storage Secondary storage : virtual storageSecondary storage : virtual storage
Sharing Memory
Computers MIU
Virtual Storage (2)Virtual Storage (2)
Paging Paging
one way of virtual storageone way of virtual storage the process of the process of
dividing a program into equal-size pieces ; called pages storing them in equal-size memory spaces ; called page frames
All pages and page framesAll pages and page frames: the same fixed size (ex. 2 or 4 KB)
Sharing Memory
Refer to Fig 2-11Refer to Fig 2-11
Computers MIU
Sharing Storage Sharing Storage ResourcesResources
More than user want to read or write a record More than user want to read or write a record from the same disk pack at the same timefrom the same disk pack at the same time
OSOS Keeps track of which file is whereKeeps track of which file is where Responds to commands to manipulate filesResponds to commands to manipulate files Keeps track of the Input and output requestsKeeps track of the Input and output requests Processes themProcesses them
In the order in which they were received Routes any program instruction to read or write a Routes any program instruction to read or write a
recordrecord
Resource allocation
Computers MIU
Sharing Printing Sharing Printing ResourcesResources
SpoolingSpooling A process for sharing a printerA process for sharing a printer
Moving data and store it for a short time on a disk before it is printed
Each program writes onto a disk each line that is to be printed
The disk file is placed into a queue It is printed when the printer becomes available
Resource allocation
Mongolia International University
Utility ProgramsUtility Programs
File ManagerFile Manager
Back up and RestoreBack up and Restore
File CompressionFile Compression
DefragmenterDefragmenter
Device DriversDevice Drivers
Computers MIU
Utility Programs (1)Utility Programs (1)
Most of the resource allocation tasks Most of the resource allocation tasks : done by the OS without user involvement: done by the OS without user involvement
Utility Programs Utility Programs : perform explicit services : perform explicit services at the userat the user’’s requests request Utility : a piece of computer SW that performs a Utility : a piece of computer SW that performs a
particular taskparticular task Part of the system software, not part of the OS.Part of the system software, not part of the OS. Some utilities are packaged with OSsSome utilities are packaged with OSs Others can be purchased separatelyOthers can be purchased separately
Computers MIU
Utility Programs (2)Utility Programs (2)
To avoid duplication of effortTo avoid duplication of effort Backing up Backing up Restoring filesRestoring files Compressing files and entire hard disksCompressing files and entire hard disks Locating filesLocating files Searching computer virusesSearching computer viruses
Computers MIU
File manager (1)File manager (1)
Organize and manage files in a Organize and manage files in a hierarchical directory structurehierarchical directory structure organized in a way that makes sense to organized in a way that makes sense to
youyou Directory Directory
: a named area in storage that can contain files and other directories
The newer versions of Windows: Refer to directories as folders
Utility Programs
Computers MIU
File manager (2)File manager (2)
FunctionsFunctions Enable you to create the directory structureEnable you to create the directory structure Display lists of files in directories Display lists of files in directories
; to copy, move, rename, and delete files; and to format and copy diskettes
Utility Programs
Computers MIU
Back up and RestoreBack up and Restore
Make backups of entire hard drives or of Make backups of entire hard drives or of selected directoriesselected directories Backing up files involvesBacking up files involves
Making duplicate copies Storing them in a safe place
These backups could be made toThese backups could be made to Diskettes, high capacity media (CD, tape)
Create the backup files in a specific format to Create the backup files in a specific format to minimize space requirementsminimize space requirements
Needed the restore routine to use themNeeded the restore routine to use them
Utility Programs
Computers MIU
File CompressionFile Compression
Reduces the amount of space of a fileReduces the amount of space of a file Compressed fileCompressed file
Take up less space on diskTake up less space on disk Take less time to transmit across communication lineTake less time to transmit across communication line Must be uncompressed into their original form Must be uncompressed into their original form
before using thembefore using them Ex) PKZIP, WinZip,RAREx) PKZIP, WinZip,RAR
Utility Programs
Computers MIU
DefragmenterDefragmenter
Reorganize the files on the disk Reorganize the files on the disk so that all files are stored in so that all files are stored in contiguous contiguous
locationslocations
Ex) Windows : Disk DefragmenterEx) Windows : Disk Defragmenter
Fragmented: noncontiguous storing because Fragmented: noncontiguous storing because of not enough space.of not enough space.
Utility Programs
Computers MIU
Device Drivers (1)Device Drivers (1)
Allow the OS to communicate with Allow the OS to communicate with peripheralsperipherals Accepts standard commands from the OS Accepts standard commands from the OS Converts them into the proper format Converts them into the proper format
for the device it supportsfor the device it supports
Utility Programs
Computers MIU
Device Drivers (2)Device Drivers (2)
ManufacturesManufactures Provide Provide device driversdevice drivers for their products for their products Installing the product Installing the product
: includes copying the appropriate driver to : includes copying the appropriate driver to your hard driveyour hard drive
Utility Programs