CH10
CH10
Systems
■ HDD Scheduling
■ NVM Scheduling
■ Swap-Space Management
■ Storage Attachment
■ RAID Structure
■ Performance
● Drive rotation is at 60 to 250 times per second
● Transfer rate is rate at which data flow between drive and computer
● Positioning time (random-access time) is time to move disk arm to
desired cylinder (seek time) and time for desired sector to rotate under
the disk head (rotational latency)
track t spindle
arm assembly
sector s
cylinder c read-write
head
platter
arm
rotation
■ Performance
● Seek time from 3ms to 12ms (e.g., 9ms is common for desktop drives)
■ For example, to transfer a 4KB block on a 7200 RPM disk with a 5ms
average seek time, 1Gb/sec transfer rate with a 0.1ms controller
overhead, the average I/O time for 4KB block is
● = 5ms + 4.17ms + 0.1ms + transfer time
4 Transfer time = 4KB / 1Gb/s * 8Gb / GB * 1GB / 10242KB = 32 / (10242) =
0.031 ms
● = 9.27ms + 0.031ms = 9.301ms
■ 1956
■ IBM RAMDAC
computer included
the IBM Model 350
disk storage system
■ 5M (7 bit) characters
■ 50 x 24” platters
■ Other forms include USB drives (thumb drive, flash drive), DRAM disk
replacements, surface-mounted on motherboards, and main storage
in devices like smartphones
● Busses can be too slow –> connect directly to PCIe for example
● Less capacity
● Can only be erased a limited number of times before worn out ~ 100,000
■ With no overwrite, pages end up with mix of valid and invalid data
■ Each cell has lifespan, so wear leveling needed to write equally to all
cells
● Mapping proceeds in order through that track, then the rest of the tracks
in that cylinder, and then through the rest of the cylinders from outermost
to innermost
■ Note that drive controllers have small buffers and can manage a
queue of I/O requests (of varying “depth”)
■ Several algorithms exist to schedule the servicing of disk I/O requests
■ The disk arm starts at one end of the disk, and moves toward the
other end, servicing requests until it gets to the other end of the disk,
where the head movement is reversed and servicing continues.
■ But note that if requests are uniformly dense, largest density at other
end of disk and those wait the longest
■ The head moves from one end of the disk to the other, servicing
requests as it goes
● When it reaches the other end, however, it immediately returns to the
beginning of the disk, without servicing any requests on the return trip
■ Treats the cylinders as a circular list that wraps around from the last
cylinder to the first one
● But write amplification (one write, causing garbage collection and many
read/writes) can decrease the performance advantage
■ To use a disk to hold files, the operating system still needs to record
its own data structures on the disk
● Partition the disk into one or more groups of cylinders, each treated as a
logical disk
■ Root partition contains the OS, other partitions can hold other Oses,
other file systems, or be raw
● Mounted at boot time
■ Boot block can point to boot volume or boot loader set of blocks that
contain enough code to know how to load the kernel from the file
system
● Or a boot management program for multi-os booting
Operating System Concepts 28 Silberschatz, Galvin and Gagne ©2018
Device Storage Management (Cont.)
● host-attached
● network-attached
● cloud
■ Host attached access through local I/O ports, using one of several
technologies
● To attach many devices, use storage busses such as USB, firewire,
thunderbolt
● 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
● Examples include Dropbox, Amazon S3, Microsoft OneDrive, Apple
iCloud
client
server
client
storage LAN/WAN
array server
client
storage SAN
array data-processing
center
■ RAID within a storage array can still fail if the array fails, so automatic
replication of the data between arrays is common
■ Frequently, a small number of hot-spare disks are left unallocated,
automatically replacing a failed disk and having data rebuilt onto them
checksum D1 checksum D2
FS FS FS
storage pool
■ Requests for secondary storage I/O are generated by the file system
and by the virtual memory system. Each request specifies the
address on the device to be referenced in the form of a logical block
number.
■ Object storage is used for big data problems such as indexing the
Internet and cloud photo storage. Objects are self-defining collections
of data, addressed by object ID rather than file name. Typically it
uses replication for data protection, computes based on the data on
systems where a copy of the data exists, and is horizontally scalable
for vast capacity and easy expansion.