M08-Storage Devices

CS 439 Principles of Computing Systems

1. Storage Systems

1.1 Recalling the Storage Hierarchy

  • Tapes: Magnetic tapes used for large-scale data storage; typically slower access times and primarily used for backups and archives.

  • Flash/Disk: Traditional hard disk drives (HDDs) and flash storage; HDDs use spinning disks, while flash storage utilizes semiconductor memory.

  • SSD/SCM: Solid State Drives provide faster data access compared to traditional disk drives; Storage Class Memory (SCM) offers a new tier in the memory hierarchy, enabling near-DRAM speeds with non-volatility.

  • CDs: Compact Discs used for storing music, data, and software, with moderate speeds and less capacity compared to modern storage solutions.

  • Main Memory: Volatile memory (RAM) that temporarily holds data and instructions for active processes in computing systems.

  • L3, L2, L1 Cache: Levels of CPU cache memory that allow faster access to frequently used data compared to main memory.

  • CPU: Central Processing Unit, the primary component of a computer that performs most of the processing inside a computer.

2. Disks

2.1 Storage Devices

  • Definition of Disks as Storage Devices: Disks are magnetic or optical storage solutions used to store data persistently; their design varies to optimize for speed, capacity, and cost.

2.2 Disk Structure

  • Tracks and Sectors: Disks are divided into concentric circles called tracks, which are further segmented into sectors to organize data.

  • Platters: The stacked discs in a hard disk drive (HDD) that hold the magnetic coating necessary for data storage.

3. Cross Section View

3.1 Disk Internals

  • Platters and Heads: The read/write heads move across the platters to access data; the design ensures they do not contact the platter surface during operation.

  • Head parked outside the platter on startup: This protects the platters during boot processes, preventing wear.

  • Head movement in and out of position: Crucial for accessing the correct track and sector, which allows data retrieval and storage.

4. Steady State Operation

4.1 Functionality

  • Platter rotation creates air pressure, preventing head contact: The rotation speeds (commonly 5400 to 7200 RPM for consumer HDDs) generate air pressure that keeps the heads afloat above the platter surface.

  • Head movement referred to as "seek": The motion of the read/write heads to the desired track.

  • Importance of head not touching the platter to avoid disk damage: Physical contact can lead to a crash, causing data loss and damage to the drive.

5. Disk Properties

5.1 Key Characteristics

  • Capacity: Calculated by the formula: number of platters × tracks per platter × sectors per track × sector size.

  • Speed: Influenced by:

    • Arm seek time: Typically 3 to 12 milliseconds; critical for performance assessments.

    • Rotation latency: Understand rotational speeds expressed in RPM, affecting the time to access specific data sectors.

    • Data transfer rate: Measured in MB/sec; enterprise disks can achieve rates up to 300 MB/sec or higher depending on technology.

6. Disk Reliability

6.1 Metrics

  • MTTF (Mean Time to Failure): Average failure time for disks, typically less than 2.5 million hours.

  • Sectors with ECC (Error Correction Code): Essential for detecting and correcting errors in data storage.

  • Dual-porting for host-failure: Ensures that two machines can connect to one disk, enhancing reliability.

  • Handling bad sectors: Systems need to implement strategies to detect, account for, and mask bad sectors to minimize impact on performance.

7. Disk Read & Write Operations

7.1 Reading and Writing

  • Operations done in sectors: Disks read and write in sectors, not capable of reading a single byte due to their organization.

  • Maximum number of sectors per operation: Typically limited by the drive's architecture, with larger operations requiring more complex handling.

7.2 Sector Sizes

  • Advanced Format (AF): Introduced 4KB sector sizes to improve efficiency and performance.

  • 512e: Emulation for older disks that used 512-byte sectors, ensuring backward compatibility.

  • Efficiency of contiguous reads/writes: Optimizing data access patterns that minimize seeking results in faster operations.

8. Contiguous Sectors

8.1 Layout

  • Physically contiguous sectors: These may still require multiple seeks during data transfer, emphasizing the role of efficient data organization.

  • Logically contiguous sectors: These may be spaced apart in physical memory but are handled in a way that optimizes access patterns during read/write operations.

  • Organizing data for sequential read/write: Crucial for enhancing performance metrics, reducing latency, and improving throughput.

9. Power Management

9.1 Device Management

  • For connected devices: Seeks to maintain constant power states, enabling high availability for active operations.

  • Limited power management features: Focus on reduced rotational speeds during idle times, though functionality may vary.

9.2 Portable Devices

  • Advanced Power Management (APM): Introduces operational states for conserving power in portable devices without sacrificing performance.

  • High startup and seek current: Design considerations necessary for devices that experience intermittent operations, accounting for potential spikes in power demands.

10. Disk Head Scheduling

10.1 Strategies for Request Handling

  • FCFS (First Come First Served): Simple scheduling algorithm that processes requests in the order they are received.

  • SSF (Shortest Seek First): Prioritizes requests that require the least movement of the disk’s read/write head.

  • SCAN: Moves the head in one direction until it reaches the outer edge and then reverses direction to service requests.

  • Elevator algorithm: Similar to SCAN, but more efficiency derived from its directional reversals.

  • Priority-based scheduling: Rarely used but can be effective for critical data requests.

11. Example Request Sets

  • Given tracks: 12, 150, 23, 14, 33, 53, 11, 64, 30, 24 - starting head position at track 40 going outward to test disk scheduling techniques.

12. Average Seek Distance

12.1 Calculation Formula

  • For a disk with N tracks, average seek distance = ( \frac{1}{3} (N - 1) ). This formula helps estimate average seek operations across tracks.

13. RAID (Redundant Array of Independent Disks)

13.1 Importance of RAID

  • Designed to overcome limitations of slow disks: RAID configurations enable faster data access and redundancy to prevent data loss.

  • Single RAID controller interfacing with multiple disks: Centralized management of multiple disk resources improves performance and security.

14. RAID Levels

14.1 Level 0 (Data Striping)

  • Data striped across multiple disks: Enhances performance but no redundancy; if one drive fails, all data is lost.

  • Advantages and disadvantages: Fast performance with high risk of data loss.

14.2 Level 1 (Disk Mirroring)

  • Replication of data across disks: Provides redundancy; if one disk fails, the data remains safe on the other.

  • Advantages and disadvantages: Slower write speeds with improved data reliability.

15. Complex RAID Levels

15.1 Level 01 (0 + 1)

  • Data striping and replication across disk pairs: Balances performance and redundancy but requires a minimum of four disks.

  • Advantages and disadvantages: Mitigates some risks but can be complex to manage.

15.2 Level 2 (Bit Striping) and Level 3 (Byte Striping)

  • Rarely used due to their complexity and specific use cases that are better filled by other RAID levels.

15.3 Level 4

  • Independent reads/writes with one parity disk providing data reliability; performance can vary depending on workload.

15.4 Level 5

  • Distributed parity without a dedicated parity disk; offers a good balance of performance, capacity, and fault tolerance.

15.5 Level 6

  • Two parity blocks distributed across disks enhance reliability, helping to recover from multiple disk failures.

15.6 Level Z

  • Utilized by ZFS filesystem; allows for adjustable block sizes and employs checksums to maintain data integrity.

16. SSD Storage Devices

16.1 SSD Overview

  • Definition: Solid State Drive, utilizing semiconductor technology for data storage.

  • Composition: Typically contains NAND flash memory chips.

  • Key performance metrics:

    • Read time: Often in microseconds.

    • Write time: Generally slower than read times, can vary based on write load.

    • Retention capability: Information can last for years without power but under degradation from writes.

17. Flash Memory Structure

17.1 Transistor Overview

  • Understanding N-MOS transistors, crucial in flash memory; includes components such as gate, source, drain, metal, and insulator organization, essential for storing charge.

18. Writing Process

18.1 Step-by-Step

  • Strong voltage applied to gate: Creates conditions for electrons to tunnel through the insulator and be trapped on the isolated metal, resulting in charge storage.

19. Read vs. Write

19.1 Logic

  • Impact of charge on current flow: The stored charge influences the current, with states read as binary 0 or 1 based on thresholds.

20. Erasing Process

20.1 Steps Involved

  • Strong voltage pulled during erasure: Entire charge from the isolated metal is extracted, resetting the memory cell to its initial state.

21. Flash Memory Organization

  • Descriptions of SLC (Single Level Cell), MLC (Multi-Level Cell), TLC (Triple Level Cell), and QLC (Quad-Level Cell) indicating performance differences and use cases.

22. Characteristics of Flash Memory

22.1 Performance Differences

  • Writing and reading speed variances: Writing remains significantly slower than reading, and erasing is even slower, impacting overall drive performance.

23. Erasure Considerations

23.1 Quantum Physics Governing Erasures

  • Exploration into tunneling phenomena affecting insulation health and long-term reliability of flash memory technologies.

24. Effects of Repeated Erasures

  • The cumulative burden on the insulation can significantly affect the reliability and longevity of flash devices.

25. The Flash Rule Summary

  • Core principles determining logical states of flash memory based on charge presence; serves as the basis for evaluating performance criteria.

26. From Transistor to Device: NAND-Flash

  • Examination of how NAND flash architecture incorporates block and page structuring, impacting read or write operations efficiency.

27. Example Use Case

  • Illustrative case highlighting complexities associated with updating pages within flash memory and incorporating necessary management strategies.

28. Manipulating Pages

  • Explanation of must-read blocks before performing erasures, underlining the write/erase process's dependency on a specific architectural approach.

29. Implications of Updating Pages

  • Discusses how SSD lifespan and performance can diminish due to the overhead of frequent updates and data management strategies.

30. Solution Concept: Level of Indirection

  • Logical mapping of pages to physical memory addresses to optimize space utilization and improve access times.

31. Mapping Implementation: Flash Translation Layer (FTL)

  • Dissecting how SSD controllers utilize FTL to manage logical to physical page mappings for enhanced operational efficiency.

32. Garbage Collection

32.1 Strategies

  • Lazy vs. Eager approaches: Examining proactive vs. reactive garbage collection strategies, along with TRIM command applications to enhance SSD lifespan.

33. SSD Aging Mechanism

  • Complications arising from repeated erasures and capacity reductions impacting performance over time due to write amplification effects.

34. Overprovisioning Solution

  • Overview of spare pages introduced in SSDs and HDDs, enabling better wear leveling and overall capacity management.

35. Wear Leveling Strategy

  • Discusses methodologies ensuring even distribution of write operations across memory cells, enhancing SSD lifespan while complicating design due to conflict with garbage collection.

36. Integrating RAID Ideas into SSD: RAIN

  • Explores how RAID principles are adapted for SSDs, aiming to improve data integrity and performance in an increasingly flash-driven world.

robot