SlideShare a Scribd company logo
1 of 71
Download to read offline
Understanding Operating Systems
Fifth Edition
Chapter 7
Device Management
Understanding Operating Systems, Fifth Edition 2
Learning Objectives
• Features of dedicated, shared, and virtual devices
• Differences between sequential and direct access
media
• Concepts of blocking and buffering and how they
improve I/O performance
• Roles of seek time, search time, and transfer time in
calculating access time
• Differences in access times in several types of
devices
Understanding Operating Systems, Fifth Edition 3
Learning Objectives (continued)
• Critical components of the input/output subsystem,
and how they interact
• Strengths and weaknesses of common seek
strategies, including FCFS, SSTF, SCAN/LOOK,
C-SCAN/C-LOOK, and how they compare
• Different levels of RAID and what sets each apart
from the others
Understanding Operating Systems, Fifth Edition 4
Types of Devices
• Dedicated Devices
• Device assigned to one job at a time
– For entire time job is active (or until released)
– Example: tape drives, printers, and plotters
• Disadvantage
– Inefficient if device is not used 100%
– Allocated for duration of job’s execution
Understanding Operating Systems, Fifth Edition 5
Types of Devices (continued)
• Shared Devices
• Device assigned to several processes
– Example: direct access storage device (DASD)
• Processes share DASD simultaneously
• Requests interleaved
• Device manager supervision
– Controls interleaving
• Predetermined policies determine conflict resolution
Understanding Operating Systems, Fifth Edition 6
Types of Devices (continued)
• Virtual Devices
• Dedicated and shared device combination
• Dedicated devices transformed into shared devices
– Example: printer
• Converted by spooling program
• Spooling
– Speeds up slow dedicated I/O devices
– Example: universal serial bus (USB) controller
• Interface between operating system, device drivers,
applications, and devices attached via USB host
Understanding Operating Systems, Fifth Edition 7
Types of Devices (continued)
• Storage media
• Two groups
– Sequential access media
• Records stored sequentially
– Direct access storage devices (DASD)
• Records stored sequentially
• Records stored using direct access files
• Vast differences
– Speed and sharability
Understanding Operating Systems, Fifth Edition 8
Sequential Access Storage Media
• Magnetic tape
• Early computer systems: routine secondary storage
• Today’s use: routine archiving and data backup
• Records stored serially
– Record length determined by application program
– Record identified by position on tape
– Record access
• Tape mount
• Fast-forwarded to record
– Time-consuming process
Understanding Operating Systems, Fifth Edition 9
Sequential Access Storage Media
(continued)
• Tape density: characters recorded per inch
– Depends upon storage method (individual or blocked)
• Tape reading/writing mechanics
– Tape moves under read/write head when needed
Understanding Operating Systems, Fifth Edition 10
Sequential Access Storage Media
(continued)
• Interrecord gap (IRG)
– ½ inch gap inserted between each record
– Same size regardless of records it separates
• Blocking: group records into blocks
• Transfer rate: (tape density) x (transport speed)
• Interblock gap (IBG)
– ½ inch gap inserted between each block
– More efficient than individual records and IRG
Understanding Operating Systems, Fifth Edition 11
Sequential Access Storage Media
(continued)
Understanding Operating Systems, Fifth Edition 12
Sequential Access Storage Media
(continued)
• Blocking advantages
– Fewer I/O operations needed
– Less wasted tape
• Blocking disadvantages
– Overhead and software routines needed for blocking,
deblocking, and record keeping
– Buffer space wasted
• When only one logical record needed
Understanding Operating Systems, Fifth Edition 13
Sequential Access Storage Media
(continued)
• Advantages
– Low cost, compact storage capabilities, good for
magnetic disk backup and long-term archival
• Disadvantages
– Access time
• Poor for routine secondary storage
– Poor for interactive applications
Understanding Operating Systems, Fifth Edition 14
Direct Access Storage Devices
• Directly read or write to specific disk area
– Random access storage devices
• Four categories
– Magnetic disks
– Optical discs
– Flash memory
– Magneto-optical disks
• Access time variance
– Not as wide as magnetic tape
– Record location directly affects access time
Understanding Operating Systems, Fifth Edition 15
Fixed-Head Magnetic Disk Storage
• Looks like a large CD or DVD
– Covered with magnetic film
– Formatted
• Both sides (usually) in concentric circles called tracks
– Data recorded serially on each track
• Fixed read/write head positioned over data
• Advantages
– Fast (more so than movable head)
• Disadvantages
– High cost and reduced storage
Understanding Operating Systems, Fifth Edition 16
Fixed-Head Magnetic Disk Storage
(continued)
Understanding Operating Systems, Fifth Edition 17
Movable-Head Magnetic Disk Storage
• One read/write head floats over disk surface
– Example: computer hard drive
– Disks
• Single platter
• Part of disk pack (stack of platters)
• Disk pack platter
– Two recording surfaces
• Exception: top and bottom platters
– Surface formatted with concentric tracks
– Track number varies
• 100 (floppy disk) to 1000+ (high-capacity disk)
Understanding Operating Systems, Fifth Edition 18
Movable-Head Magnetic Disk Storage
(continued)
• Disk pack platter (continued)
– Track surface number
• Track zero: outermost concentric circle on each surface
• Center: contains highest-numbered track
– Arm moves over all heads in unison
• Slower: fill disk pack surface-by-surface
• Faster: fill disk pack track-by-track
– Virtual cylinder: fill track zero
• Record access system requirements
– Cylinder number, surface number, record number
Understanding Operating Systems, Fifth Edition 19
Movable-Head Magnetic Disk Storage
(continued)
Understanding Operating Systems, Fifth Edition 20
Optical Disc Storage
• Design difference
– Magnetic disk
• Concentric tracks of
sectors
• Spins at constant
angular velocity
(CAV)
• Wastes storage
space but fast data
retrieval
Understanding Operating Systems, Fifth Edition 21
Optical Disc Storage (continued)
• Design features
– Optical disc
• Single spiralling track
of same-sized
sectors running from
center to disc rim
• Spins at constant
linear velocity (CLV)
• More sectors and
more disc data
Understanding Operating Systems, Fifth Edition 22
Optical Disc Storage (continued)
• Two important performance measures
– Sustained data-transfer rate
• Speed to read massive data amounts from disc
• Measured in megabytes per second (Mbps)
• Crucial for applications requiring sequential access
– Average access time
• Average time to move head to specific disc location
• Expressed in milliseconds (ms)
• Third feature
– Cache size (hardware)
• Buffer to transfer data blocks from disc
Understanding Operating Systems, Fifth Edition 23
Optical Disc Storage (continued)
• CD-ROM technology (CD read-only memory)
– Similar to audio CD
• CD-ROM is sturdier with rigorous error correction
– Data recorded as zeros and ones
• Pits: indentations
• Lands: flat areas
– Reads with low-power laser
• Light strikes land and reflects to photodetector
• Pit is scattered and absorbed
• Photodetector converts light intensity into digital signal
– Various speed classifications (32X, 48X, 75X)
• How fast drive spins
Understanding Operating Systems, Fifth Edition 24
Optical Disc Storage (continued)
• CD-Recordable technology (CD-R)
– Requires expensive disk controller
– Records data using write-once technique
– Data cannot be erased or modified
– Disk
• Contains several layers
• Gold reflective layer and dye layer
• Records with high-power laser
• Permanent marks on dye layer
• CD cannot be erased after data recorded
– Data read on standard CD drive (low-power beam)
Understanding Operating Systems, Fifth Edition 25
Optical Disc Storage (continued)
• CD-Rewritable technology (CD-RW)
– Data written, changed, erased
– Uses phase change technology
• Amorphous and crystalline phase states
– Record data: beam heats up disc
• State changes from crystalline to amorphous
– Erase data: low-energy beam to heat up pits
• Loosens alloy to return to original crystalline state
– Drives read standard CD-ROM, CD-R, CD-RW discs
– Drives store large quantities of data, sound, graphics,
multimedia
Understanding Operating Systems, Fifth Edition 26
Optical Disc Storage (continued)
• DVD technology (Digital Versatile Disc)
• CD-ROM comparison
– Similar in design, shape, size
– Differs in data capacity
• Dual-layer, single-sided DVD holds 13 CDs
• Single-layer, single-sided DVD holds 8.6 GB (MPEG
video compression)
– Differs in laser wavelength
• Uses red laser (smaller pits, tighter spiral)
• DVDs cannot be read by CD or CD-ROM drives
• DVD-R and DVD-RW provide rewritable flexibility
Understanding Operating Systems, Fifth Edition 27
Magneto-Optical Storage
• Combines magnetic and optical disk technology
• Magnetic disk comparison
– Reads and writes similarly
– Magneto-optical (MO) disks store several GB
– Access rate
• Faster than floppy
• Slower than hard drive
– Hardier than optical discs
Understanding Operating Systems, Fifth Edition 28
Magneto-Optical Storage (continued)
• Read/write process
– Read
• Laser beam polarizes light by crystals in alloy
• Reflected to photodiode and interpreted
– Write
• Uses narrow laser beam and crystal polarization
• No permanent physical change
• Changes made many times
• Repeated writing
– No medium deterioration (occurs with optical discs)
Understanding Operating Systems, Fifth Edition 29
Flash Memory Storage
• Electronically erasable programmable read-only
memory (EEP)
– Nonvolatile and removable
– Emulates random access
• Difference: data stored securely (even if removed)
• Data stored on microchip card or “key”
– Compact flash, smart cards, memory sticks
– Often connected through USB port
• Write data: electric charge sent through floating gate
• Erase data: strong electrical field (flash) applied
Understanding Operating Systems, Fifth Edition 30
DASD Access Times
• File access time factors
– Seek time (slowest)
• Time to position read/write head on track
• Does not apply to fixed read/write head devices
– Search time
• Rotational delay
• Time to rotate DASD
• Rotate until desired record under read/write head
– Transfer time (fastest)
• Time to transfer data
• Secondary storage to main memory transfer
Understanding Operating Systems, Fifth Edition 31
Fixed-Head Devices
• Record access requires two items
– Track number and record number
• Access time = search time + transfer time
• Total access time
– Rotational speed dependent
• DASDs rotate continuously
– Three basic positions for requested record
• In relation to read/write head position
• DASD has little access variance
– Good candidates: low activity files, random access
• Blocking used to minimize access time
Understanding Operating Systems, Fifth Edition 32
Fixed-Head Devices (continued)
Understanding Operating Systems, Fifth Edition 33
Movable-Head Devices (continued)
• Record access requires three items
– Seek time + search time + transfer time
• Search time and transfer time calculation
– Same as fixed-head DASD
• Blocking is a good way to minimize access time
Understanding Operating Systems, Fifth Edition 34
Components of the I/O Subsystem
• I/O Channel
• Programmable units
– Positioned between CPU and control unit
• Synchronizes device speeds
– CPU (fast) with I/O device (slow)
• Manages concurrent processing
– CPU and I/O device requests
• Allows overlap
– CPU and I/O operations
• Channels: expensive because so often shared
Understanding Operating Systems, Fifth Edition 35
Components of the I/O Subsystem
(continued)
• I/O channel programs
– Specifies action performed by devices
– Controls data transmission
• Between main memory and control units
• I/O control unit: receives and interprets signal
• Disk controller (disk drive interface)
– Links disk drive and system bus
• Entire path must be available when I/O command
initiated
• I/O subsystem configuration
– Multiple paths increase flexibility and reliability
Understanding Operating Systems, Fifth Edition 36
Components of the I/O Subsystem
(continued)
Understanding Operating Systems, Fifth Edition 37
Components of the I/O Subsystem
(continued)
Understanding Operating Systems, Fifth Edition 38
Communication Among Devices
• Problems to resolve
– Know which components are busy/free
• Solved by structuring interaction between units
– Accommodate requests during heavy I/O traffic
• Handled by buffering records and queuing requests
– Accommodate speed disparity between CPU and I/O
devices
• Handled by buffering records and queuing requests
Understanding Operating Systems, Fifth Edition 39
Communication Among Devices
(continued)
• I/O subsystem units finish independently of others
• CPU processes data while I/O performed
• Success requires device completion knowledge
– Hardware flag tested by CPU
• Channel status word (CSW) contains flag
• Three bits in flag represent I/O system component
(channel, control unit, device)
• Changes zero to one (free to busy)
– Flag tested using polling and interrupts
• Interrupts are more efficient way to test flag
Understanding Operating Systems, Fifth Edition 40
Communication Among Devices
(continued)
• Direct memory access (DMA)
– Allows control unit main memory access directly
– Transfers data without the intervention of CPU
– Used for high-speed devices (disk)
• Buffers
– Temporary storage areas in main memory, channels,
control units
– Improves data movement synchronization
• Between relatively slow I/O devices and very fast CPU
– Double buffering: processing of record by CPU while
another is read or written by channel
Understanding Operating Systems, Fifth Edition 41
Communication Among Devices
(continued)
Understanding Operating Systems, Fifth Edition 42
Management of I/O Requests
• I/O traffic controller
– Watches status of devices, control units, channels
– Three main tasks
• Determine if path available
• If more than one path available, determine which one to
select
• If paths all busy, determine when one is available
– Maintain database containing unit status and
connections
Understanding Operating Systems, Fifth Edition 43
Management of I/O Requests
(continued)
• I/O scheduler
– Same job as process scheduler (Chapter 4)
– Allocates devices, control units, channels
– If requests greater than available paths
• Decides which request to satisfy first: based on
different criteria
– In many systems
• I/O requests not preempted
– For some systems
• Allow preemption with I/O request subdivided
• Allow preferential treatment for high-priority requests
Understanding Operating Systems, Fifth Edition 44
Management of I/O Requests
(continued)
• I/O device handler
– Performs actual data transfer
• Processes device interrupts
• Handles error conditions
• Provides detailed scheduling algorithms
– Device dependent
– Each I/O device type has device handler algorithm
Understanding Operating Systems, Fifth Edition 45
Management of I/O Requests
(continued)
Understanding Operating Systems, Fifth Edition 46
Device Handler Seek Strategies
• Predetermined device handler
– Determines device processing order
– Goal: minimize seek time
• Types
– First-come, first-served (FCFS), shortest seek time
first (SSTF), SCAN (including LOOK, N-Step SCAN,
C-SCAN, and C-LOOK)
• Scheduling algorithm goals
– Minimize arm movement
– Minimize mean response time
– Minimize variance in response time
Understanding Operating Systems, Fifth Edition 47
Device Handler Seek Strategies
(continued)
• FCFS
– On average: does not meet three seek strategy goals
– Disadvantage: extreme arm movement
Understanding Operating Systems, Fifth Edition 48
Device Handler Seek Strategies
(continued)
• Shortest Seek Time First (SSTF)
– Request with track closest to one being served
– Minimizes overall seek time
– Postpones traveling to out of way tracks
Understanding Operating Systems, Fifth Edition 49
Device Handler Seek Strategies
(continued)
• SCAN
– Directional bit
• Indicates if arm moving toward/away from disk center
– Algorithm moves arm methodically
• From outer to inner track, services every request in its
path
• If reaches innermost track, reverses direction and
moves toward outer tracks
• Services every request in its path
Understanding Operating Systems, Fifth Edition 50
Device Handler Seek Strategies
(continued)
• LOOK
– Arm does not go to either edge
• Unless requests exist
– Eliminates indefinite postponement
Understanding Operating Systems, Fifth Edition 51
Device Handler Seek Strategies
(continued)
• N-Step SCAN
– Holds all requests until arm starts on way back
• New requests grouped together for next sweep
• C-SCAN (Circular SCAN)
– Arm picks up requests on path during inward sweep
– Provides more uniform wait time
• C-LOOK
– Inward sweep stops at last high-numbered track
request
– No last track access unless required
Understanding Operating Systems, Fifth Edition 52
Device Handler Seek Strategies
(continued)
• Best strategy
– FCFS best with light loads
• Service time unacceptably long under high loads
– SSTF best with moderate loads
• Localization problem under heavy loads
– SCAN best with light to moderate loads
• Eliminates indefinite postponement
– Throughput and mean service times SSTF similarities
– C-SCAN best with moderate to heavy loads
• Very small service time variances
Understanding Operating Systems, Fifth Edition 53
Search Strategies: Rotational Ordering
• Rotational ordering
– Optimizes search times
• Orders requests once read/write heads positioned
– Read/write head movement time
• Hardware dependent
• Reduces time wasted
– Due to rotational delay
– Request arrangement
• First sector requested on second track is next number
higher than one just served
Understanding Operating Systems, Fifth Edition 54
Search Strategies: Rotational Ordering
(continued)
Understanding Operating Systems, Fifth Edition 55
Search Strategies: Rotational Ordering
(continued)
Understanding Operating Systems, Fifth Edition 56
Search Strategies: Rotational Ordering
(continued)
Understanding Operating Systems, Fifth Edition 57
RAID
• Physical disk drive set viewed as single logical unit
– Preferable over few large-capacity disk drives
• Improved I/O performance
• Improved data recovery
– Disk failure event
• Introduces redundancy
– Helps with hardware failure recovery
• Significant factors in RAID level selection
– Cost, speed, system’s applications
• Increases hardware costs
Understanding Operating Systems, Fifth Edition 58
RAID (continued)
Understanding Operating Systems, Fifth Edition 59
RAID (continued)
Understanding Operating Systems, Fifth Edition 60
Level Zero
• Uses data striping (not considered true RAID)
– No parity and error corrections
– No error correction/redundancy/recovery
• Benefits
– Devices appear as one logical unit
– Best for large data quantity non-critical data
Understanding Operating Systems, Fifth Edition 61
Level One
• Uses data striping (considered true RAID)
– Mirrored configuration (backup)
• Duplicate set of all data (expensive)
– Provides redundancy and improved reliability
Understanding Operating Systems, Fifth Edition 62
Level Two
• Uses small stripes (considered true RAID)
• Hamming code: error detection and correction
• Expensive and complex
– Size of strip determines number of array disks
Understanding Operating Systems, Fifth Edition 63
Level Three
• Modification of level two
– Requires one disk for redundancy
• One parity bit for each strip
Understanding Operating Systems, Fifth Edition 64
Level Four
• Same strip scheme as levels zero and one
– Computes parity for each strip
– Stores parities in corresponding strip
• Has designated parity disk
Understanding Operating Systems, Fifth Edition 65
Level Five
• Modification of level four
• Distributes parity strips across disks
– Avoids level four bottleneck
• Disadvantage
– Complicated to regenerate data from failed device
Understanding Operating Systems, Fifth Edition 66
Level Six
• Provides extra degree of error protection/correction
– Two different parity calculations (double parity)
• Same as level four/five and independent algorithm
– Parities stored on separate disk across array
• Stored in corresponding data strip
• Advantage: data restoration even if two disks fail
Understanding Operating Systems, Fifth Edition 67
Nested RAID Levels
• Combines multiple RAID levels (complex)
Understanding Operating Systems, Fifth Edition 68
Nested RAID Levels (continued)
Understanding Operating Systems, Fifth Edition 69
Summary
• Device Manager
– Manages every system device effectively as possible
• Devices
– Vary in speed and sharability degrees
– Direct access and sequential access
• Magnetic media: one or many read/write heads
– Heads in a fixed position (optimum speed)
– Move across surface (optimum storage space)
• Optical media: disk speed adjusted
– Data recorded/retrieved correctly
Understanding Operating Systems, Fifth Edition 70
Summary (continued)
• Flash memory: device manager tracks USB devices
– Assures data sent/received correctly
• I/O subsystem success dependence
– Communication linking channels, control units,
devices
• SCAN: eliminates indefinite postponement problem
– Best for light to moderate loads
• C-SCAN: very small service time variance
– Best for moderate to heavy loads
• RAID: redundancy helps hardware failure recover
– Consider cost, speed, applications
Understanding Operating Systems, Fifth Edition 71
Summary (continued)

More Related Content

Similar to Operating System for Undergraduates. level 200 course

Similar to Operating System for Undergraduates. level 200 course (20)

disk sechduling
disk sechdulingdisk sechduling
disk sechduling
 
Os7
Os7Os7
Os7
 
Storage Devices
Storage DevicesStorage Devices
Storage Devices
 
Csc1401 lecture07 -external memory
Csc1401   lecture07 -external memoryCsc1401   lecture07 -external memory
Csc1401 lecture07 -external memory
 
Storing information in a computer
Storing information in a computerStoring information in a computer
Storing information in a computer
 
9781111306366 ppt ch7
9781111306366 ppt ch79781111306366 ppt ch7
9781111306366 ppt ch7
 
Unit 4 DBMS.ppt
Unit 4 DBMS.pptUnit 4 DBMS.ppt
Unit 4 DBMS.ppt
 
Applicatiins of information and communication
Applicatiins of information and communicationApplicatiins of information and communication
Applicatiins of information and communication
 
Chapter4.ppt
Chapter4.pptChapter4.ppt
Chapter4.ppt
 
Storing Information in a Computer
Storing Information in a ComputerStoring Information in a Computer
Storing Information in a Computer
 
06_External Memory.ppt
06_External Memory.ppt06_External Memory.ppt
06_External Memory.ppt
 
MEMORY.pptx
MEMORY.pptxMEMORY.pptx
MEMORY.pptx
 
Storage system architecture
Storage system architectureStorage system architecture
Storage system architecture
 
RAM&&ROM.ppt
RAM&&ROM.pptRAM&&ROM.ppt
RAM&&ROM.ppt
 
06 external memory
06 external memory06 external memory
06 external memory
 
Compsystem2
Compsystem2Compsystem2
Compsystem2
 
Uc13.chapter.03
Uc13.chapter.03Uc13.chapter.03
Uc13.chapter.03
 
3.1 storage devices_and_media (1)
3.1 storage devices_and_media (1)3.1 storage devices_and_media (1)
3.1 storage devices_and_media (1)
 
ICS Lecture 3.pptx
ICS Lecture 3.pptxICS Lecture 3.pptx
ICS Lecture 3.pptx
 
memory unit
 memory unit memory unit
memory unit
 

More from ReubenMawukoDordunu

PreludeProgramming6ed_pp03.pptx.pdf for level 100
PreludeProgramming6ed_pp03.pptx.pdf for level 100PreludeProgramming6ed_pp03.pptx.pdf for level 100
PreludeProgramming6ed_pp03.pptx.pdf for level 100ReubenMawukoDordunu
 
PreludeProgramming6ed_pp10. for undergraduate candidates
PreludeProgramming6ed_pp10. for undergraduate candidatesPreludeProgramming6ed_pp10. for undergraduate candidates
PreludeProgramming6ed_pp10. for undergraduate candidatesReubenMawukoDordunu
 
Understanding and Using Information Technology_Exploring Windows 7_2.pptx
Understanding and Using Information Technology_Exploring Windows 7_2.pptxUnderstanding and Using Information Technology_Exploring Windows 7_2.pptx
Understanding and Using Information Technology_Exploring Windows 7_2.pptxReubenMawukoDordunu
 
Understanding and Using Information Technology_Exploring Windows 7_1.pptx
Understanding and Using Information Technology_Exploring Windows 7_1.pptxUnderstanding and Using Information Technology_Exploring Windows 7_1.pptx
Understanding and Using Information Technology_Exploring Windows 7_1.pptxReubenMawukoDordunu
 
Sch Organistion - Lect 5 Decision making in edu.pptx
Sch Organistion - Lect 5 Decision making in edu.pptxSch Organistion - Lect 5 Decision making in edu.pptx
Sch Organistion - Lect 5 Decision making in edu.pptxReubenMawukoDordunu
 
Sch Organistion - Lect 4 Edu Leadership.pdf
Sch Organistion - Lect 4 Edu Leadership.pdfSch Organistion - Lect 4 Edu Leadership.pdf
Sch Organistion - Lect 4 Edu Leadership.pdfReubenMawukoDordunu
 
Sch Organistion - Lect 1 Concept of Adm Mgt.pptx
Sch Organistion - Lect 1 Concept of Adm  Mgt.pptxSch Organistion - Lect 1 Concept of Adm  Mgt.pptx
Sch Organistion - Lect 1 Concept of Adm Mgt.pptxReubenMawukoDordunu
 

More from ReubenMawukoDordunu (8)

PreludeProgramming6ed_pp03.pptx.pdf for level 100
PreludeProgramming6ed_pp03.pptx.pdf for level 100PreludeProgramming6ed_pp03.pptx.pdf for level 100
PreludeProgramming6ed_pp03.pptx.pdf for level 100
 
PreludeProgramming6ed_pp10. for undergraduate candidates
PreludeProgramming6ed_pp10. for undergraduate candidatesPreludeProgramming6ed_pp10. for undergraduate candidates
PreludeProgramming6ed_pp10. for undergraduate candidates
 
Understanding and Using Information Technology_Exploring Windows 7_2.pptx
Understanding and Using Information Technology_Exploring Windows 7_2.pptxUnderstanding and Using Information Technology_Exploring Windows 7_2.pptx
Understanding and Using Information Technology_Exploring Windows 7_2.pptx
 
Understanding and Using Information Technology_Exploring Windows 7_1.pptx
Understanding and Using Information Technology_Exploring Windows 7_1.pptxUnderstanding and Using Information Technology_Exploring Windows 7_1.pptx
Understanding and Using Information Technology_Exploring Windows 7_1.pptx
 
Sch Organistion - Lect 5 Decision making in edu.pptx
Sch Organistion - Lect 5 Decision making in edu.pptxSch Organistion - Lect 5 Decision making in edu.pptx
Sch Organistion - Lect 5 Decision making in edu.pptx
 
Sch Organistion - Lect 4 Edu Leadership.pdf
Sch Organistion - Lect 4 Edu Leadership.pdfSch Organistion - Lect 4 Edu Leadership.pdf
Sch Organistion - Lect 4 Edu Leadership.pdf
 
Sch Organistion - Lect 1 Concept of Adm Mgt.pptx
Sch Organistion - Lect 1 Concept of Adm  Mgt.pptxSch Organistion - Lect 1 Concept of Adm  Mgt.pptx
Sch Organistion - Lect 1 Concept of Adm Mgt.pptx
 
GROUP L.pptx
GROUP L.pptxGROUP L.pptx
GROUP L.pptx
 

Recently uploaded

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Recently uploaded (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

Operating System for Undergraduates. level 200 course

  • 1. Understanding Operating Systems Fifth Edition Chapter 7 Device Management
  • 2. Understanding Operating Systems, Fifth Edition 2 Learning Objectives • Features of dedicated, shared, and virtual devices • Differences between sequential and direct access media • Concepts of blocking and buffering and how they improve I/O performance • Roles of seek time, search time, and transfer time in calculating access time • Differences in access times in several types of devices
  • 3. Understanding Operating Systems, Fifth Edition 3 Learning Objectives (continued) • Critical components of the input/output subsystem, and how they interact • Strengths and weaknesses of common seek strategies, including FCFS, SSTF, SCAN/LOOK, C-SCAN/C-LOOK, and how they compare • Different levels of RAID and what sets each apart from the others
  • 4. Understanding Operating Systems, Fifth Edition 4 Types of Devices • Dedicated Devices • Device assigned to one job at a time – For entire time job is active (or until released) – Example: tape drives, printers, and plotters • Disadvantage – Inefficient if device is not used 100% – Allocated for duration of job’s execution
  • 5. Understanding Operating Systems, Fifth Edition 5 Types of Devices (continued) • Shared Devices • Device assigned to several processes – Example: direct access storage device (DASD) • Processes share DASD simultaneously • Requests interleaved • Device manager supervision – Controls interleaving • Predetermined policies determine conflict resolution
  • 6. Understanding Operating Systems, Fifth Edition 6 Types of Devices (continued) • Virtual Devices • Dedicated and shared device combination • Dedicated devices transformed into shared devices – Example: printer • Converted by spooling program • Spooling – Speeds up slow dedicated I/O devices – Example: universal serial bus (USB) controller • Interface between operating system, device drivers, applications, and devices attached via USB host
  • 7. Understanding Operating Systems, Fifth Edition 7 Types of Devices (continued) • Storage media • Two groups – Sequential access media • Records stored sequentially – Direct access storage devices (DASD) • Records stored sequentially • Records stored using direct access files • Vast differences – Speed and sharability
  • 8. Understanding Operating Systems, Fifth Edition 8 Sequential Access Storage Media • Magnetic tape • Early computer systems: routine secondary storage • Today’s use: routine archiving and data backup • Records stored serially – Record length determined by application program – Record identified by position on tape – Record access • Tape mount • Fast-forwarded to record – Time-consuming process
  • 9. Understanding Operating Systems, Fifth Edition 9 Sequential Access Storage Media (continued) • Tape density: characters recorded per inch – Depends upon storage method (individual or blocked) • Tape reading/writing mechanics – Tape moves under read/write head when needed
  • 10. Understanding Operating Systems, Fifth Edition 10 Sequential Access Storage Media (continued) • Interrecord gap (IRG) – ½ inch gap inserted between each record – Same size regardless of records it separates • Blocking: group records into blocks • Transfer rate: (tape density) x (transport speed) • Interblock gap (IBG) – ½ inch gap inserted between each block – More efficient than individual records and IRG
  • 11. Understanding Operating Systems, Fifth Edition 11 Sequential Access Storage Media (continued)
  • 12. Understanding Operating Systems, Fifth Edition 12 Sequential Access Storage Media (continued) • Blocking advantages – Fewer I/O operations needed – Less wasted tape • Blocking disadvantages – Overhead and software routines needed for blocking, deblocking, and record keeping – Buffer space wasted • When only one logical record needed
  • 13. Understanding Operating Systems, Fifth Edition 13 Sequential Access Storage Media (continued) • Advantages – Low cost, compact storage capabilities, good for magnetic disk backup and long-term archival • Disadvantages – Access time • Poor for routine secondary storage – Poor for interactive applications
  • 14. Understanding Operating Systems, Fifth Edition 14 Direct Access Storage Devices • Directly read or write to specific disk area – Random access storage devices • Four categories – Magnetic disks – Optical discs – Flash memory – Magneto-optical disks • Access time variance – Not as wide as magnetic tape – Record location directly affects access time
  • 15. Understanding Operating Systems, Fifth Edition 15 Fixed-Head Magnetic Disk Storage • Looks like a large CD or DVD – Covered with magnetic film – Formatted • Both sides (usually) in concentric circles called tracks – Data recorded serially on each track • Fixed read/write head positioned over data • Advantages – Fast (more so than movable head) • Disadvantages – High cost and reduced storage
  • 16. Understanding Operating Systems, Fifth Edition 16 Fixed-Head Magnetic Disk Storage (continued)
  • 17. Understanding Operating Systems, Fifth Edition 17 Movable-Head Magnetic Disk Storage • One read/write head floats over disk surface – Example: computer hard drive – Disks • Single platter • Part of disk pack (stack of platters) • Disk pack platter – Two recording surfaces • Exception: top and bottom platters – Surface formatted with concentric tracks – Track number varies • 100 (floppy disk) to 1000+ (high-capacity disk)
  • 18. Understanding Operating Systems, Fifth Edition 18 Movable-Head Magnetic Disk Storage (continued) • Disk pack platter (continued) – Track surface number • Track zero: outermost concentric circle on each surface • Center: contains highest-numbered track – Arm moves over all heads in unison • Slower: fill disk pack surface-by-surface • Faster: fill disk pack track-by-track – Virtual cylinder: fill track zero • Record access system requirements – Cylinder number, surface number, record number
  • 19. Understanding Operating Systems, Fifth Edition 19 Movable-Head Magnetic Disk Storage (continued)
  • 20. Understanding Operating Systems, Fifth Edition 20 Optical Disc Storage • Design difference – Magnetic disk • Concentric tracks of sectors • Spins at constant angular velocity (CAV) • Wastes storage space but fast data retrieval
  • 21. Understanding Operating Systems, Fifth Edition 21 Optical Disc Storage (continued) • Design features – Optical disc • Single spiralling track of same-sized sectors running from center to disc rim • Spins at constant linear velocity (CLV) • More sectors and more disc data
  • 22. Understanding Operating Systems, Fifth Edition 22 Optical Disc Storage (continued) • Two important performance measures – Sustained data-transfer rate • Speed to read massive data amounts from disc • Measured in megabytes per second (Mbps) • Crucial for applications requiring sequential access – Average access time • Average time to move head to specific disc location • Expressed in milliseconds (ms) • Third feature – Cache size (hardware) • Buffer to transfer data blocks from disc
  • 23. Understanding Operating Systems, Fifth Edition 23 Optical Disc Storage (continued) • CD-ROM technology (CD read-only memory) – Similar to audio CD • CD-ROM is sturdier with rigorous error correction – Data recorded as zeros and ones • Pits: indentations • Lands: flat areas – Reads with low-power laser • Light strikes land and reflects to photodetector • Pit is scattered and absorbed • Photodetector converts light intensity into digital signal – Various speed classifications (32X, 48X, 75X) • How fast drive spins
  • 24. Understanding Operating Systems, Fifth Edition 24 Optical Disc Storage (continued) • CD-Recordable technology (CD-R) – Requires expensive disk controller – Records data using write-once technique – Data cannot be erased or modified – Disk • Contains several layers • Gold reflective layer and dye layer • Records with high-power laser • Permanent marks on dye layer • CD cannot be erased after data recorded – Data read on standard CD drive (low-power beam)
  • 25. Understanding Operating Systems, Fifth Edition 25 Optical Disc Storage (continued) • CD-Rewritable technology (CD-RW) – Data written, changed, erased – Uses phase change technology • Amorphous and crystalline phase states – Record data: beam heats up disc • State changes from crystalline to amorphous – Erase data: low-energy beam to heat up pits • Loosens alloy to return to original crystalline state – Drives read standard CD-ROM, CD-R, CD-RW discs – Drives store large quantities of data, sound, graphics, multimedia
  • 26. Understanding Operating Systems, Fifth Edition 26 Optical Disc Storage (continued) • DVD technology (Digital Versatile Disc) • CD-ROM comparison – Similar in design, shape, size – Differs in data capacity • Dual-layer, single-sided DVD holds 13 CDs • Single-layer, single-sided DVD holds 8.6 GB (MPEG video compression) – Differs in laser wavelength • Uses red laser (smaller pits, tighter spiral) • DVDs cannot be read by CD or CD-ROM drives • DVD-R and DVD-RW provide rewritable flexibility
  • 27. Understanding Operating Systems, Fifth Edition 27 Magneto-Optical Storage • Combines magnetic and optical disk technology • Magnetic disk comparison – Reads and writes similarly – Magneto-optical (MO) disks store several GB – Access rate • Faster than floppy • Slower than hard drive – Hardier than optical discs
  • 28. Understanding Operating Systems, Fifth Edition 28 Magneto-Optical Storage (continued) • Read/write process – Read • Laser beam polarizes light by crystals in alloy • Reflected to photodiode and interpreted – Write • Uses narrow laser beam and crystal polarization • No permanent physical change • Changes made many times • Repeated writing – No medium deterioration (occurs with optical discs)
  • 29. Understanding Operating Systems, Fifth Edition 29 Flash Memory Storage • Electronically erasable programmable read-only memory (EEP) – Nonvolatile and removable – Emulates random access • Difference: data stored securely (even if removed) • Data stored on microchip card or “key” – Compact flash, smart cards, memory sticks – Often connected through USB port • Write data: electric charge sent through floating gate • Erase data: strong electrical field (flash) applied
  • 30. Understanding Operating Systems, Fifth Edition 30 DASD Access Times • File access time factors – Seek time (slowest) • Time to position read/write head on track • Does not apply to fixed read/write head devices – Search time • Rotational delay • Time to rotate DASD • Rotate until desired record under read/write head – Transfer time (fastest) • Time to transfer data • Secondary storage to main memory transfer
  • 31. Understanding Operating Systems, Fifth Edition 31 Fixed-Head Devices • Record access requires two items – Track number and record number • Access time = search time + transfer time • Total access time – Rotational speed dependent • DASDs rotate continuously – Three basic positions for requested record • In relation to read/write head position • DASD has little access variance – Good candidates: low activity files, random access • Blocking used to minimize access time
  • 32. Understanding Operating Systems, Fifth Edition 32 Fixed-Head Devices (continued)
  • 33. Understanding Operating Systems, Fifth Edition 33 Movable-Head Devices (continued) • Record access requires three items – Seek time + search time + transfer time • Search time and transfer time calculation – Same as fixed-head DASD • Blocking is a good way to minimize access time
  • 34. Understanding Operating Systems, Fifth Edition 34 Components of the I/O Subsystem • I/O Channel • Programmable units – Positioned between CPU and control unit • Synchronizes device speeds – CPU (fast) with I/O device (slow) • Manages concurrent processing – CPU and I/O device requests • Allows overlap – CPU and I/O operations • Channels: expensive because so often shared
  • 35. Understanding Operating Systems, Fifth Edition 35 Components of the I/O Subsystem (continued) • I/O channel programs – Specifies action performed by devices – Controls data transmission • Between main memory and control units • I/O control unit: receives and interprets signal • Disk controller (disk drive interface) – Links disk drive and system bus • Entire path must be available when I/O command initiated • I/O subsystem configuration – Multiple paths increase flexibility and reliability
  • 36. Understanding Operating Systems, Fifth Edition 36 Components of the I/O Subsystem (continued)
  • 37. Understanding Operating Systems, Fifth Edition 37 Components of the I/O Subsystem (continued)
  • 38. Understanding Operating Systems, Fifth Edition 38 Communication Among Devices • Problems to resolve – Know which components are busy/free • Solved by structuring interaction between units – Accommodate requests during heavy I/O traffic • Handled by buffering records and queuing requests – Accommodate speed disparity between CPU and I/O devices • Handled by buffering records and queuing requests
  • 39. Understanding Operating Systems, Fifth Edition 39 Communication Among Devices (continued) • I/O subsystem units finish independently of others • CPU processes data while I/O performed • Success requires device completion knowledge – Hardware flag tested by CPU • Channel status word (CSW) contains flag • Three bits in flag represent I/O system component (channel, control unit, device) • Changes zero to one (free to busy) – Flag tested using polling and interrupts • Interrupts are more efficient way to test flag
  • 40. Understanding Operating Systems, Fifth Edition 40 Communication Among Devices (continued) • Direct memory access (DMA) – Allows control unit main memory access directly – Transfers data without the intervention of CPU – Used for high-speed devices (disk) • Buffers – Temporary storage areas in main memory, channels, control units – Improves data movement synchronization • Between relatively slow I/O devices and very fast CPU – Double buffering: processing of record by CPU while another is read or written by channel
  • 41. Understanding Operating Systems, Fifth Edition 41 Communication Among Devices (continued)
  • 42. Understanding Operating Systems, Fifth Edition 42 Management of I/O Requests • I/O traffic controller – Watches status of devices, control units, channels – Three main tasks • Determine if path available • If more than one path available, determine which one to select • If paths all busy, determine when one is available – Maintain database containing unit status and connections
  • 43. Understanding Operating Systems, Fifth Edition 43 Management of I/O Requests (continued) • I/O scheduler – Same job as process scheduler (Chapter 4) – Allocates devices, control units, channels – If requests greater than available paths • Decides which request to satisfy first: based on different criteria – In many systems • I/O requests not preempted – For some systems • Allow preemption with I/O request subdivided • Allow preferential treatment for high-priority requests
  • 44. Understanding Operating Systems, Fifth Edition 44 Management of I/O Requests (continued) • I/O device handler – Performs actual data transfer • Processes device interrupts • Handles error conditions • Provides detailed scheduling algorithms – Device dependent – Each I/O device type has device handler algorithm
  • 45. Understanding Operating Systems, Fifth Edition 45 Management of I/O Requests (continued)
  • 46. Understanding Operating Systems, Fifth Edition 46 Device Handler Seek Strategies • Predetermined device handler – Determines device processing order – Goal: minimize seek time • Types – First-come, first-served (FCFS), shortest seek time first (SSTF), SCAN (including LOOK, N-Step SCAN, C-SCAN, and C-LOOK) • Scheduling algorithm goals – Minimize arm movement – Minimize mean response time – Minimize variance in response time
  • 47. Understanding Operating Systems, Fifth Edition 47 Device Handler Seek Strategies (continued) • FCFS – On average: does not meet three seek strategy goals – Disadvantage: extreme arm movement
  • 48. Understanding Operating Systems, Fifth Edition 48 Device Handler Seek Strategies (continued) • Shortest Seek Time First (SSTF) – Request with track closest to one being served – Minimizes overall seek time – Postpones traveling to out of way tracks
  • 49. Understanding Operating Systems, Fifth Edition 49 Device Handler Seek Strategies (continued) • SCAN – Directional bit • Indicates if arm moving toward/away from disk center – Algorithm moves arm methodically • From outer to inner track, services every request in its path • If reaches innermost track, reverses direction and moves toward outer tracks • Services every request in its path
  • 50. Understanding Operating Systems, Fifth Edition 50 Device Handler Seek Strategies (continued) • LOOK – Arm does not go to either edge • Unless requests exist – Eliminates indefinite postponement
  • 51. Understanding Operating Systems, Fifth Edition 51 Device Handler Seek Strategies (continued) • N-Step SCAN – Holds all requests until arm starts on way back • New requests grouped together for next sweep • C-SCAN (Circular SCAN) – Arm picks up requests on path during inward sweep – Provides more uniform wait time • C-LOOK – Inward sweep stops at last high-numbered track request – No last track access unless required
  • 52. Understanding Operating Systems, Fifth Edition 52 Device Handler Seek Strategies (continued) • Best strategy – FCFS best with light loads • Service time unacceptably long under high loads – SSTF best with moderate loads • Localization problem under heavy loads – SCAN best with light to moderate loads • Eliminates indefinite postponement – Throughput and mean service times SSTF similarities – C-SCAN best with moderate to heavy loads • Very small service time variances
  • 53. Understanding Operating Systems, Fifth Edition 53 Search Strategies: Rotational Ordering • Rotational ordering – Optimizes search times • Orders requests once read/write heads positioned – Read/write head movement time • Hardware dependent • Reduces time wasted – Due to rotational delay – Request arrangement • First sector requested on second track is next number higher than one just served
  • 54. Understanding Operating Systems, Fifth Edition 54 Search Strategies: Rotational Ordering (continued)
  • 55. Understanding Operating Systems, Fifth Edition 55 Search Strategies: Rotational Ordering (continued)
  • 56. Understanding Operating Systems, Fifth Edition 56 Search Strategies: Rotational Ordering (continued)
  • 57. Understanding Operating Systems, Fifth Edition 57 RAID • Physical disk drive set viewed as single logical unit – Preferable over few large-capacity disk drives • Improved I/O performance • Improved data recovery – Disk failure event • Introduces redundancy – Helps with hardware failure recovery • Significant factors in RAID level selection – Cost, speed, system’s applications • Increases hardware costs
  • 58. Understanding Operating Systems, Fifth Edition 58 RAID (continued)
  • 59. Understanding Operating Systems, Fifth Edition 59 RAID (continued)
  • 60. Understanding Operating Systems, Fifth Edition 60 Level Zero • Uses data striping (not considered true RAID) – No parity and error corrections – No error correction/redundancy/recovery • Benefits – Devices appear as one logical unit – Best for large data quantity non-critical data
  • 61. Understanding Operating Systems, Fifth Edition 61 Level One • Uses data striping (considered true RAID) – Mirrored configuration (backup) • Duplicate set of all data (expensive) – Provides redundancy and improved reliability
  • 62. Understanding Operating Systems, Fifth Edition 62 Level Two • Uses small stripes (considered true RAID) • Hamming code: error detection and correction • Expensive and complex – Size of strip determines number of array disks
  • 63. Understanding Operating Systems, Fifth Edition 63 Level Three • Modification of level two – Requires one disk for redundancy • One parity bit for each strip
  • 64. Understanding Operating Systems, Fifth Edition 64 Level Four • Same strip scheme as levels zero and one – Computes parity for each strip – Stores parities in corresponding strip • Has designated parity disk
  • 65. Understanding Operating Systems, Fifth Edition 65 Level Five • Modification of level four • Distributes parity strips across disks – Avoids level four bottleneck • Disadvantage – Complicated to regenerate data from failed device
  • 66. Understanding Operating Systems, Fifth Edition 66 Level Six • Provides extra degree of error protection/correction – Two different parity calculations (double parity) • Same as level four/five and independent algorithm – Parities stored on separate disk across array • Stored in corresponding data strip • Advantage: data restoration even if two disks fail
  • 67. Understanding Operating Systems, Fifth Edition 67 Nested RAID Levels • Combines multiple RAID levels (complex)
  • 68. Understanding Operating Systems, Fifth Edition 68 Nested RAID Levels (continued)
  • 69. Understanding Operating Systems, Fifth Edition 69 Summary • Device Manager – Manages every system device effectively as possible • Devices – Vary in speed and sharability degrees – Direct access and sequential access • Magnetic media: one or many read/write heads – Heads in a fixed position (optimum speed) – Move across surface (optimum storage space) • Optical media: disk speed adjusted – Data recorded/retrieved correctly
  • 70. Understanding Operating Systems, Fifth Edition 70 Summary (continued) • Flash memory: device manager tracks USB devices – Assures data sent/received correctly • I/O subsystem success dependence – Communication linking channels, control units, devices • SCAN: eliminates indefinite postponement problem – Best for light to moderate loads • C-SCAN: very small service time variance – Best for moderate to heavy loads • RAID: redundancy helps hardware failure recover – Consider cost, speed, applications
  • 71. Understanding Operating Systems, Fifth Edition 71 Summary (continued)