0% found this document useful (0 votes)
24 views21 pages

C-CS316 - Lect12 - Storage Management

The document discusses storage management topics including mass storage structure, hard disk drives, disk scheduling, error detection and correction, storage device management, storage attachment methods, and RAID structures.

Uploaded by

omarelgohary800
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views21 pages

C-CS316 - Lect12 - Storage Management

The document discusses storage management topics including mass storage structure, hard disk drives, disk scheduling, error detection and correction, storage device management, storage attachment methods, and RAID structures.

Uploaded by

omarelgohary800
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Introduction to

Operating Systems
C-CS316 Spring 2024

LECTURE 12:
Storage Management
Dr. Basma Hassan Dr. Ahmed Salama
[email protected] [email protected]

Faculty of Computing and Information Sciences


Chapter 11: Mass-Storage Structure

Overview of Mass Storage Structure

HDD Scheduling

Error Detection and Correction

Storage Device Management

Storage Attachment

RAID Structure

Faculty of Computing and Information Sciences


2
Overview of Mass Storage 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

• Disks can be removable

Faculty of Computing and Information Sciences


3
Moving-head Disk Mechanism

Faculty of Computing and Information Sciences


4
Hard Disk Drives

• 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

Faculty of Computing and Information Sciences


5
Hard Disk Performance

• 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

Faculty of Computing and Information Sciences


6
Hard Disk Performance
• Average Seek Time = 5 ms average latency = 0.5 x 60/7200 secs = 0.004172 x 1000 = 4.17 ms
• Transfer Rate = 1 Gb/sec =1×109 bits per second
• Controller Overhead = 0.1 ms
• Block Size (Amount to transfer)= 4 KB = 4×1024 bytes

• 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

• Total I/O Time=5 ms + 4.17 ms + 0.032768 ms + 0.1 ms = 9.1832 ms

Faculty of Computing and Information Sciences


7
The First Commercial Disk Drive

1956
IBM RAMDAC computer included the IBM Model
350 disk storage system

5M (7 bit) characters
50 x 24” platters
Access time = < 1 second

Faculty of Computing and Information Sciences


8
Nonvolatile Memory Devices
• Solid-State Disks (SSDs)

• Can be more reliable than HDDs

• More expensive per MB

• Maybe have shorter life span – need careful management

• Less capacity

• But much faster

• Busses can be too slow -> connect directly to PCI for example

• No moving parts, so no seek time or rotational latency

Faculty of Computing and Information Sciences


9
Disk Attachment

• Host-attached storage accessed through I/O ports talking to I/O busses

• Several busses available, including advanced technology attachment (ATA), serial


ATA (SATA), eSATA, serial attached SCSI (SAS), universal serial bus (USB), and fibre
channel (FC).

• Most common is SATA

• Because NVM much faster than HDD, new fast interface for NVM called NVM express
(NVMe), connecting directly to PCI bus

Faculty of Computing and Information Sciences


10
Disk Scheduling

• The operating system is responsible for using hardware efficiently — for the disk
drives, this means having a fast access time and disk bandwidth

• Minimize seek time

• Seek time  seek distance

• 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

Faculty of Computing and Information Sciences


11
Disk Scheduling (con’t)

• There are many sources of disk I/O request


• OS
• System processes
• Users processes

• I/O request includes input or output mode, disk address, memory address, number of sectors
to transfer

• OS maintains queue of requests, per disk or device

• Idle disk can immediately work on I/O request, busy disk means work must queue
• Optimization algorithms only make sense when a queue exists

Faculty of Computing and Information Sciences


12
Error Detection and Correction
• Fundamental aspect of many parts of computing (memory, networking, storage)
• Error detection determines if there a problem has occurred (for example a bit flipping)
• If detected, can halt the operation
• Detection frequently done via parity bit

• Parity one form of checksum – uses modular arithmetic to compute, store, compare
values of fixed-length words

• Another error-detection method common in networking is cyclic redundancy check


(CRC) which uses hash function to detect multiple-bit errors

• Error-correction code (ECC) not only detects, but can correct some errors
• Soft errors correctable, hard errors detected but not corrected

Faculty of Computing and Information Sciences


13
Storage Disk Management
• Low-level formatting, or physical formatting — Dividing a disk into sectors that the
disk controller can read and write
• Each sector can hold header information, plus data, plus error correction code
(ECC)
• 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
• Logical formatting or “making a file system”
• To increase efficiency most file systems group blocks into clusters
• Disk I/O done in blocks
• File I/O done in clusters

Faculty of Computing and Information Sciences


14
Storage Attachment
• Computers access storage in three ways
• host-attached
• network-attached
• cloud

• Host attached access through local I/O ports

• High-end systems use fibre channel (FC)

• High-speed serial architecture using fibre or copper cables

• Multiple hosts and storage devices can connect to the FC fabric

Faculty of Computing and Information Sciences


15
Network-Attached Storage
• Network-attached storage (NAS) is storage made available over a network
rather than over a local connection (such as a bus)
• Remotely attaching to file systems
• NFS (Network File System) and CIFS (Common Internet File System) are
common protocols

• Implemented via remote procedure calls (RPCs) between host and storage
over typically TCP or UDP on IP network

• iSCSI (Internet Small Computer System Interface)protocol uses IP network to


carry the SCSI protocol
• iSCSI provides a scalable and cost-effective solution for remote storage
access in enterprise environments, offering the benefits of block-level
storage consolidation, network flexibility, and interoperability with
existing TCP/IP infrastructure.

Faculty of Computing and Information Sciences


16
Cloud Storage
• Similar to NAS, provides access to storage across a 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

• Examples include Dropbox, Amazon S3, Microsoft OneDrive, Apple iCloud

• Use APIs because of latency and failure scenarios (NAS protocols wouldn’t work
well)

Faculty of Computing and Information Sciences


17
RAID Structure
• RAID – redundant array of inexpensive disks
• multiple disk drives provides reliability via redundancy
• Increases the mean time to failure (MTTF)
• Mean time to repair (MTTR) – exposure time when another failure could cause data loss
• Mean time to data loss (MTTDL) based on above factors

• 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)

Faculty of Computing and Information Sciences


18
RAID (Cont.)
• Disk striping uses a group of disks as one storage unit
• RAID is arranged into six different levels
• RAID schemes improve performance and improve the reliability of the storage
system by storing redundant data

• Mirroring or shadowing (RAID 1) keeps duplicate of each disk


• Striped mirrors (RAID 1+0)
provides high performance and high reliability
• mirrored stripes (RAID 0+1)
• Block interleaved parity (RAID 4, 5, 6) uses much less redundancy

Faculty of Computing and Information Sciences


19
RAID Levels

RAID (0 + 1)
mirrored stripes

RAID (1 + 0)
striped mirrors

Faculty of Computing and Information Sciences


20
End of Lecture!
Thanks for your Attention!

Faculty of Computing and Information Sciences


21

You might also like