Chapter 7 - Device Management Ivy Tech State College Northwest Region 01 CIS106 Microcomputer Operating Systems Gina Rue CIS Faculty.

Slides:



Advertisements
Similar presentations
I/O Management and Disk Scheduling
Advertisements

Chapter 6 I/O Systems.
I/O Management and Disk Scheduling
I/O Management and Disk Scheduling
Interactive lesson about operating system
Chapter Seven : Device Management
Device Management System Devices Sequential Access Storage Media
Device Management Part 1: I/O System.
OPERATING SYSTEMS CS3530 Summer 2014 OPERATING SYSTEMS CS3530 Summer 2014 Input/Output System Chapter 9.
Input/Output Management and Disk Scheduling
University of Pennsylvania 10/24/00CSE 3801 Disk Scheduling CSE 380 Lecture Note 11a Insup Lee.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
Lecture 17 I/O Optimization. Disk Organization Tracks: concentric rings around disk surface Sectors: arc of track, minimum unit of transfer Cylinder:
Based on the slides supporting the text
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
1 Storage Hierarchy Cache Main Memory Virtual Memory File System Tertiary Storage Programs DBMS Capacity & Cost Secondary Storage.
Disks.
Device Management.
Secondary Storage CSCI 444/544 Operating Systems Fall 2008.
1 Today I/O Systems Storage. 2 I/O Devices Many different kinds of I/O devices Software that controls them: device drivers.
Data Storage Technology
Introduction to Database Systems 1 The Storage Hierarchy and Magnetic Disks Storage Technology: Topic 1.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
Disk and I/O Management
Process Management A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity.
Chapter 7 Device Management
Understanding Operating Systems Fifth Edition
Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Device Management. So far… We have covered CPU and memory management Computing is not interesting without I/Os Device management: the OS component that.
Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and.
Understanding Operating Systems 1 Chapter Seven : Device Management System Devices Sequential Access Storage Media Direct Access Storage Devices Components.
1 Device Management System Devices Sequential Access Storage Media Direct Access Storage Devices Components of I/O Subsystem Communication Among Devices.
Disk Structure Disk drives are addressed as large one- dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer.
1 I/O Management and Disk Scheduling Chapter Categories of I/O Devices Human readable Used to communicate with the user Printers Video display terminals.
1 IO Management and Disk Scheduling Chapter Categories of I/O Devices n Human readable u used to communicate with the user u video display terminals.
1 I/O Management and Disk Scheduling Chapter
Chapter 7 Device Management
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Lecture No 11 Storage Devices
CS 6502 Operating Systems Dr. J.. Garrido Device Management (Lecture 7b) CS5002 Operating Systems Dr. Jose M. Garrido.
CE Operating Systems Lecture 20 Disk I/O. Overview of lecture In this lecture we will look at: Disk Structure Disk Scheduling Disk Management Swap-Space.
I/O Management and Disk Structure Introduction to Operating Systems: Module 14.
Disks Chapter 5 Thursday, April 5, Today’s Schedule Input/Output – Disks (Chapter 5.4)  Magnetic vs. Optical Disks  RAID levels and functions.
1 I/O Management and Disk Scheduling Chapter Categories of I/O Devices Human readable –Used to communicate with the user –Printers –Video display.
O VERVIEW OF M ASS S TORAGE S TRUCTURE Magnetic disks provide bulk of secondary storage of modern computers Drives rotate at 60 to 250 times per second.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
Chapter 5 Input/Output 5.1 Principles of I/O hardware
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
Device Management Mark Stanovich Operating Systems COP 4610.
Chapter 9 I/O System. 2 Input/Output System I/O Major objectives are: Take an application I/O request and send it to the physical device. Then, take whatever.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Device Management Andy Wang Operating Systems COP 4610 / CGS 5765.
Chapter 11 I/O Management and Disk Scheduling Dave Bremer Otago Polytechnic, NZ ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Lecture 3 Secondary Storage and System Software I
Data Storage and Querying in Various Storage Devices.
1 Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and.
Chapter 10: Mass-Storage Systems
Operating System (013022) Dr. H. Iwidat
Chapter 5 - Process Management
I/O System Chapter 5 Designed by .VAS.
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
OPERATING SYSTEMS CS 3502 Fall 2017
I/O Resource Management: Software
Operating System I/O System Monday, August 11, 2008.
Device Management.
Lecture 45 Syed Mansoor Sarwar
Device Management Damian Gordon.
Overview Continuation from Monday (File system implementation)
Chapter 11 I/O Management and Disk Scheduling
Presentation transcript:

Chapter 7 - Device Management Ivy Tech State College Northwest Region 01 CIS106 Microcomputer Operating Systems Gina Rue CIS Faculty

See Illustration p.1452 Introduction - Device Management Device Manager: Manages every peripheral device of the systemManages every peripheral device of the system Maintains a balance of the user’s demand and the system’s finite supply of devicesMaintains a balance of the user’s demand and the system’s finite supply of devices

3 Introduction - Device Management Four Basic FunctionsFour Basic Functions – tracking the status of each device, tape & disk drives, printers, terminals, etc. –uses policies to determine which process will get a device & for how long –allocating devices –deallocating devices process levelprocess level job leveljob level

4 System Devices 3 Peripheral Device categories 3 Peripheral Device categories –dedicated assigned only one job at a time, tape drives, printers, plotters assigned only one job at a time, tape drives, printers, plotters –shared assigned to several processes, disk pack, other storage devices by interleaving requestsassigned to several processes, disk pack, other storage devices by interleaving requests –virtual combination dedicated & shared, printers, diskscombination dedicated & shared, printers, disks

5 Sequential Access Storage Media 2 Groups of Storage Media 2 Groups of Storage Media –Sequential access media store records sequentially, one after another store records sequentially, one after another –Direct access storage devices can store either sequentially or direct access, directly reading or writing to a specific placecan store either sequentially or direct access, directly reading or writing to a specific place

See Fig. 7.1 p.1476 Sequential Access Storage Media Magnetic Tape –developed for early systems for routine secondary storage, archiving, back-up data –records are stored serially, each record can be any length stored in any location, record length usually determined by application –time consuming to locate records, “fast- forwarded” to desired position parity bit used for routine error checkingparity bit used for routine error checking interrecord gap (IRG) inserted in between each recordinterrecord gap (IRG) inserted in between each record

7 Sequential Access Storage Media Magnetic Tape –blocking, grouping records into blocks before recording them, performed while file is created –transfer rate, density of tape (number or records in a block) –transport speed, speed of tape: transfer rate = density * transport speed

8 Sequential Access Storage Media Magnetic Tape Blocking Advantages: –fewer I/O operations –less tape is wasted Blocking Disadvantages –overhead & software routines are needed, deblocking, and record keeping –buffer space may be wasted Access times can vary widely

9 Direct Access Storage Devices –(DASDs) any devices that can directly read or write to a specific place on disk –Also called random access storage devices –Grouped into 2 categories fixed read/write headsfixed read/write heads movable read/write headsmovable read/write heads

See Fig. 7.4 & 7.5 p Direct Access Storage Devices Fixed-Head Drums & DisksFixed-Head Drums & Disks –one of the first DASDs developed in early 1950’s –fixed-drum resembles a giant coffee can covered with magnetic film & formatted so tracks run around it –fixed-drum data is recorded serially on each track by the read/write head positioned over it

11 Direct Access Storage Devices Fixed-Head Drums & DisksFixed-Head Drums & Disks –fixed-disk looks like a phonograph album covered with magnetic film that has been formatted, into concentric circles (tracks) –fixed-disk data is recorded serially on each track by the read/write head positioned over it

See Fig. 7.6 p Direct Access Storage Devices Movable-Head Drums & DisksMovable-Head Drums & Disks –Movable-Head drums have only a few read/write heads that move from track to track to cover the entire surface of the drum least expensive device with only one read/write head for the entire drumleast expensive device with only one read/write head for the entire drum conventional design device with several read/write heads that move togetherconventional design device with several read/write heads that move together

See Fig. 7.7 p Direct Access Storage Devices Movable-Head Drums & DisksMovable-Head Drums & Disks –Movable-Head disk have only one read/write head that floats over the surface of the disk individual units, such as those with many PCsindividual units, such as those with many PCs disk packs, stack of disks, each disk has 2 surfaces for recording (top & bottom)disk packs, stack of disks, each disk has 2 surfaces for recording (top & bottom) tracks on disk varies by manufacturer, but typically range from 200 to 800tracks on disk varies by manufacturer, but typically range from 200 to 800 tracks are numbered, Track 0 is the outermost concentric circletracks are numbered, Track 0 is the outermost concentric circle

14 Direct Access Storage Devices Optical Disc Storage (ODS)Optical Disc Storage (ODS) –Includes CD-ROM, provides reliable high- density storage for large amounts of data –1995 ODS were read only, now CD-R (recordable) available –function similar to magnetic disk drive read/write head on an armread/write head on an arm measure performance in data-transfer rate and average access timemeasure performance in data-transfer rate and average access time

See Table 7.2 p Direct Access Storage Devices Optical Disc Storage (ODS)Optical Disc Storage (ODS) –data transfer rate measured in kilobytes per second (Kps) refers to speed that data can be read off disc –access time indicates the average time required to move the read head to a specific place on the disc, expressed in milliseconds (ms) –hardware cache acts like a buffer by transferring blocks of data from the disk

16 Direct Access Storage Devices Access Time Required: 3 factors that contribute to the time required to access a file seek timeseek time time required to position the read/write head on the proper track; slowest of 3 factorstime required to position the read/write head on the proper track; slowest of 3 factors search timesearch time also known as rotational delay; time it takes to rotate the drum or disk until the requested record is moved under the read/write headalso known as rotational delay; time it takes to rotate the drum or disk until the requested record is moved under the read/write head transfer timetransfer time when the data is actually transferred from secondary storage to main memory; fastest of 3 factorswhen the data is actually transferred from secondary storage to main memory; fastest of 3 factors

See Fig 7.8 p Direct Access Storage Devices Access Time for Fixed-Head Devices –access a record by knowing its track and record number –total amount of time required to access data depends on 2 factors: rotational speedrotational speed position of the record relative to the position of the read/write headposition of the record relative to the position of the read/write head Access Time = Search Time + Transfer Time

18 Direct Access Storage Devices Access Time for Movable-Head Devices –adds a third time element to the computation of access time: Access Time = Seek Time + Search Time + Transfer –overall, moveable-head devices are much more common than fixed-head DASDs less costly and larger capacity; even though retrieval time is longerless costly and larger capacity; even though retrieval time is longer

See Fig. 7.9 p I/O System Components I/O subsystems work togetherI/O subsystems work together –I/O Channels (dispatcher) keeps up with the I/O requests from the CPU & pass them on to the appropriate control unitkeeps up with the I/O requests from the CPU & pass them on to the appropriate control unit programmable units placed between the CPU and the control unitprogrammable units placed between the CPU and the control unit sends one signal for each functionsends one signal for each function synchronizes the fast speed of the CPU with the slow speed of the I/O devicesynchronizes the fast speed of the CPU with the slow speed of the I/O device

See Fig & 11 p I/O System Components I/O subsystems work togetherI/O subsystems work together –I/O Control Unit (driver) interprets the channel signalinterprets the channel signal sometimes part of the devicesometimes part of the device each control unit can direct several deviceseach control unit can direct several devices flexibility, connect more than one channel for a control unit or connect more than one control unit to a single deviceflexibility, connect more than one channel for a control unit or connect more than one control unit to a single device multiple paths increase reliability of the I/O subsystemmultiple paths increase reliability of the I/O subsystem

21 Communication Among Devices Demanding conditions of a busy computer system Demanding conditions of a busy computer system –Device Manager (3 Problems) needs to know which components are busy & which are freeneeds to know which components are busy & which are free must be able to handle requests that come in during heavy I/O trafficmust be able to handle requests that come in during heavy I/O traffic must accommodate disparity of speeds between CPU & I/O devicesmust accommodate disparity of speeds between CPU & I/O devices

22 Communication Among Devices Concurrent processing & I/O Concurrent processing & I/O each unit in the I/O subsystem can finish its operation independentlyeach unit in the I/O subsystem can finish its operation independently after a device has begun writing a record, & before completing the task, the connection between the device & its controller can be cut off to begin another I/O task with another deviceafter a device has begun writing a record, & before completing the task, the connection between the device & its controller can be cut off to begin another I/O task with another device CPU is free to process data while I/O is being performedCPU is free to process data while I/O is being performed

23 Communication Among Devices How does the system know when a device has completed an operation? How does the system know when a device has completed an operation? Hardware flag must be tested by the CPUHardware flag must be tested by the CPU made up of 3 bits & resides in the Channel Status Word (CSW)made up of 3 bits & resides in the Channel Status Word (CSW) –CSW, predefined location in main memory, contains channel status information each bit represents one of the components indicating channel statuseach bit represents one of the components indicating channel status –channel bit, control unit, & device –0 free, 1 busy

24 Communication Among Devices Each component has access to the flagEach component has access to the flag can be tested before proceeding with the next I/O operationcan be tested before proceeding with the next I/O operation –Common ways to perform this test: pollingpolling interruptsinterrupts

25 Communication Among Devices PollingPolling –use special machine instructions to test the flag –major disadvantage CPU wastes time testing flag InterruptsInterrupts –more efficient way to test flags –interrupt handler determines best course for action

See Fig p Communication Among Devices Direct Memory Access (DMA)Direct Memory Access (DMA) –allows a control unit to access main memory more directly –data can be transferred to & from memory without CPU interaction BuffersBuffers –more efficient way to test flags –interrupt handler determines best course for action

27 Management of I/O Requests Device Manager divides the task into 3 parts handled by a software component of the I/O subsystemDevice Manager divides the task into 3 parts handled by a software component of the I/O subsystem I/O traffic controller I/O traffic controller I/O scheduler I/O scheduler I/O device handler I/O device handler

See Table 7.5 p Management of I/O Requests I/ traffic controllerI/ traffic controller – monitors every device status, control unit, & channel – maintains control blocks – three main tasks: –determines if path is available –determines best path –determines when a path will become available

29 Management of I/O Requests I/O schedulerI/O scheduler performs same job as the Process Scheduler performs same job as the Process Scheduler allocates the devices, control units, & channelsallocates the devices, control units, & channels decides which request will take prioritydecides which request will take priority synchronizes its work with the traffic controllersynchronizes its work with the traffic controller

30 Management of I/O Requests I/O Device handlerI/O Device handler processes the I/O interrupts processes the I/O interrupts handles error conditions handles error conditions provides detailed scheduled algorithms provides detailed scheduled algorithms each type of I/O device has its own device handler algorithm each type of I/O device has its own device handler algorithm

31 Device Handler Seek Strategies Seek Strategy determines the order processes get the device, keeping seek time to a minimumSeek Strategy determines the order processes get the device, keeping seek time to a minimum Every scheduling algorithm should do the following:Every scheduling algorithm should do the following: minimize movementminimize movement minimize mean response timeminimize mean response time minimize the variance in response timeminimize the variance in response time

See Fig p Device Handler Seek Strategies First come first served (FCFS)First come first served (FCFS) – simplest device-scheduling algorithm – easy to users & fair to users – seek time delay disadvantage –seek time is the most time consuming

See Fig p Device Handler Seek Strategies Shortest seek time first (SSTF)Shortest seek time first (SSTF) – shortest jobs are processed first – longer jobs are made to wait – requests the track closest to the one being served – favors easy-to-reach requests & postpones long jobs farther away

See Fig p Device Handler Seek Strategies SCAN uses a directional bit to indicate arm movement SCAN uses a directional bit to indicate arm movement LOOK (elevator algorithm/SCAN variation), arm does not go all the way to either edge unless requested LOOK (elevator algorithm/SCAN variation), arm does not go all the way to either edge unless requested N-step SCAN holds all requests until the arm starts on its way back N-step SCAN holds all requests until the arm starts on its way back

35 Device Handler Seek Strategies C-SCAN (Circular SCAN) the arm picks up requests on its path during inward sweepC-SCAN (Circular SCAN) the arm picks up requests on its path during inward sweep C-LOOK arm does not move all the way back to last track unless required C-LOOK arm does not move all the way back to last track unless required The best scheduling algorithm may be a combination of more than one scheme

36 Search Strategies: Rotational Ordering Optimize search times by ordering requests once the read/write heads have been positioned Optimize search times by ordering requests once the read/write heads have been positioned

See Fig & table 7.6 p Search Strategies: Rotational Ordering “Rotational Ordering” “Rotational Ordering” – amount of time wasted due to rotational delay can be reduced – requests are ordered within each track –device controller must provide “rotational sensing” so the device driver can “see” which sector is under the read/write head

38 Summary Device Manager’s job to manage all the devices despite varying speeds & sharing abilitiesDevice Manager’s job to manage all the devices despite varying speeds & sharing abilities Direct Access and Sequential AccessDirect Access and Sequential Access One or many read/write headsOne or many read/write heads Fixed position or heads move across surfaceFixed position or heads move across surface

39 Summary Complex task of balancing demand for devices divided among hardware components:Complex task of balancing demand for devices divided among hardware components: – channels – control units – devices Success of the I/O subsystem depends on the communications that link these partsSuccess of the I/O subsystem depends on the communications that link these parts

40 Summary Seek strategies to optimize seek timeSeek strategies to optimize seek time –FCFS: First Come, First Served –SSTF: Shortest Seek Time First –SCAN/LOOK –N-step SCAN –C-SCAN/C-LOOK