C-CS316 - Lect12 - Storage Management
C-CS316 - Lect12 - Storage Management
Operating Systems
C-CS316 Spring 2024
LECTURE 12:
Storage Management
Dr. Basma Hassan Dr. Ahmed Salama
[email protected] [email protected]
HDD Scheduling
Storage Attachment
RAID Structure
• Bulk of secondary storage for modern computers is hard disk drives (HDDs) and nonvolatile
memory (NVM) devices
• HDDs spin platters of magnetically-coated material under moving read-write heads
• Drives rotate at 60 to 250 times per second
• Transfer rate is rate at which data flow between drive(HDD) and computer(Motherboard)
• Positioning time (random-access time) is time to move disk arm to desired cylinder (seek
time) + time for desired sector to rotate under the disk head (rotational latency)
• Head crash results from disk head making contact with the disk surface
• Platters range from .85” to 14” (historically) Commonly 3.5”, 2.5”, and 1.8”
• Range from 30GB to 3TB per drive
• Performance
• Transfer Rate – theoretical – 6 Gb/sec Effective Transfer Rate – real – 1Gb/sec
• Seek time from 3ms to 12ms – 9ms common for desktop drives
• Latency based on spindle speed = 1 / (RPM / 60) = 60 / RPM
• Average latency = ½ latency seconds
• Access Latency = Average access time = average seek time + average latency
• Average I/O time = average access time + (amount to transfer / transfer rate) +
controller overhead
• For example to transfer a 4KB block on a 7200 RPM disk with a 5ms average seek
time, 1Gb/sec transfer rate with a .1ms controller overhead, calculate the Average I/O
time
• Converting the transfer rate from bits per second to bytes per millisecond:
= 32.768/1000 = 0.032768
• Total I/O Time=Average Seek Time+ average latency + Transfer Time + Controller Overhead
1956
IBM RAMDAC computer included the IBM Model
350 disk storage system
5M (7 bit) characters
50 x 24” platters
Access time = < 1 second
• Less capacity
• Busses can be too slow -> connect directly to PCI for example
• Because NVM much faster than HDD, new fast interface for NVM called NVM express
(NVMe), connecting directly to PCI bus
• The operating system is responsible for using hardware efficiently — for the disk
drives, this means having a fast access time and disk bandwidth
• Disk bandwidth is the total number of bytes transferred, divided by the total time
between the first request for service and the completion of the last transfer
• I/O request includes input or output mode, disk address, memory address, number of sectors
to transfer
• Idle disk can immediately work on I/O request, busy disk means work must queue
• Optimization algorithms only make sense when a queue exists
• Parity one form of checksum – uses modular arithmetic to compute, store, compare
values of fixed-length words
• Error-correction code (ECC) not only detects, but can correct some errors
• Soft errors correctable, hard errors detected but not corrected
• Implemented via remote procedure calls (RPCs) between host and storage
over typically TCP or UDP on IP network
• Unlike NAS, accessed over the Internet or a WAN to remote data center
• NAS presented as just another file system, while cloud storage is API based, with
programs using the APIs to provide access
• Use APIs because of latency and failure scenarios (NAS protocols wouldn’t work
well)
• If mirrored disks fail independently, consider disk with 1300,000 mean time to failure and 10
hour mean time to repair
MTTDL=MTTF2 / (2×MTTR)
RAID (0 + 1)
mirrored stripes
RAID (1 + 0)
striped mirrors