top of page
Search

Storage device

  • Writer: Abhilasha
    Abhilasha
  • Jul 11, 2024
  • 9 min read

Mass Storage Systems

Storage Devices Overview:

  1. Definition and Types:

  • A storage device retains information even when the computer is turned off.

  • Types include internal (non-removable) and external (removable) devices.

  1. Examples:

  • Hard Disk: Internal, circular magnetized surface storing data in sectors and tracks. Operates at speeds of 60-120 revolutions per second.

  • Compact Disk (CD): Holds up to 650 megabytes of data. Types include CD-ROM (read-only), CD-R (write-once), CD-RW (rewritable).

  • Magnetic Tape: Inexpensive storage for large data amounts (up to 26 gigabytes), commonly used for backups.

  • Removable Media: Examples like Zip drives, using special disks holding 100 megabytes to 2 gigabytes.

Characteristics of Storage Devices:

  1. Persistence: Data remains on the medium even when power is off.

  2. Cost: Generally cheaper than primary memory (RAM).

  3. Capacity: Capable of storing large amounts of data.

  4. Speed: Rotational speeds have increased over time, enhancing data access.

  5. Backup: Often used for backing up data to prevent loss.


Introduction to Hard Drives

Overview:

In today's digital world, data storage is essential for ensuring data safety and accessibility. Hard drives, alongside cloud storage and pen drives, play a crucial role in meeting these needs. This presentation explores the architecture of hard drives, focusing on their components and how they efficiently store and retrieve data.

What is a Hard Drive?

A hard drive is an electro-mechanical device used for storing data. It utilizes disk platters coated with a magnetic material to store data in binary form (zeros and ones). This storage is non-volatile, meaning data remains even when the device is powered off. Hard drives are often used as Read-Only Memory (ROM) in systems, preserving essential data and software.

Key Components:

  1. Disk Platter: Circular magnetic disk made of aluminum where data is stored.

  2. Spindle: Rotates the disk platters, enabling data read/write operations.

  3. R/W Head: Moves over the platter's surface to read and write data magnetically.

  4. Actuator Arm: Carries the R/W head, positioning it accurately over the disk platter.

  5. PCB (Printed Circuit Board): Provides electrical connectivity between components.

How Data is Stored:

  • Actuator and R/W Arm: Moves the read/write head across the platter to access data.

  • Spindle: Rotates the platter at high speed, crucial for data access and transfer.

  • Magnetic Platter: Stores data in binary format using magnetic charges.

  • Circuit Board: Controls data flow between the hard drive components and the computer.

  • Connections: Link the hard drive to the computer's circuitry for data exchange.


Disk Platter and Hard Drive Components

Disk Platter:

  • Description: Circular magnetic disk made of aluminum, used for primary data storage in a hard drive.

  • Function: Stores data in tiny magnetic regions representing binary data (zeros and ones).

  • Arrangement: Multiple platters stacked vertically within the hard drive, separated by spacers, and mounted on a central spindle.

Spindle and R/W Head:

  • Spindle:

  • Function: Rotates the platters at high speeds.

  • Importance: Allows the read/write (R/W) head to access different parts of the disk surface.

  • R/W Head:

  • Function: Hovers just above the platter surface to read and write data.

  • Movement: Moves as the platter spins underneath, performing data operations.

Actuator Arm and Axis:

  • Actuator Arm:

  • Function: Carries the R/W head for precise data operations.

  • Movement: Moves backward and forward across the platter surface.

  • Accuracy: Ensures the R/W head is positioned accurately for data read and write tasks.

  • Actuator Axis:

  • Central Role: Part of the actuator assembly facilitating movement.

  • Mechanism: Powered by a motor to control the actuator arm's motion.

Actuator, Ribbon Cable, and PCB:

  • Actuator:

  • Purpose: Controls the movement of the head arm assembly.

  • Precision: Ensures accurate positioning of the R/W head for efficient data handling.

  • Ribbon Cable:

  • Role: Transmits data from the disk platter to the Printed Circuit Board (PCB).

  • Essential: Facilitates data flow within the hard drive, ensuring information reaches the processing board.

  • PCB (Printed Circuit Board):

  • Function: Provides electrical connectivity between hard drive components.

  • Support: Enables communication and power distribution essential for proper hard drive function.

Recirculation Filter:

  • Purpose: Maintains cleanliness within the hard drive.

  • Functionality: Captures and filters contaminants from internal air circulation.

  • Benefits: Prevents data loss and hardware damage by ensuring a clean operating environment.


Architecture of Solid State Drive (SSD)

User Commands and Interface:

  • Commands originate from the user through the host interface (e.g., SATA, NVMe).

  • These commands are then processed by the SSD controller.

SSD Controller:

  • The SSD controller includes a processor responsible for managing data flow and operations.

  • It interprets user commands and directs them to the appropriate components within the SSD.

Flash Controller:

  • Receives commands from the SSD controller and manages interactions with the NAND flash memory.

  • Controls data storage, retrieval, and maintenance operations on the NAND flash chips.

Embedded RAM:

  • SSDs contain embedded RAM memory used for caching frequently accessed data.

  • RAM is also used for storing mapping information that links logical addresses to physical NAND flash memory locations.

NAND Flash Memory:

  • NAND flash memory packages are grouped into gangs and accessed through multiple channels.

  • Organized for parallel data transfer and to optimize data throughput.


Disk Scheduling Algorithms

Overview: Disk scheduling algorithms manage the order in which input/output (I/O) requests are handled by a computer's disk. They aim to optimize performance by minimizing disk arm movement and reducing data access times.

Importance: Disk scheduling in operating systems is crucial for minimizing waiting times of I/O requests. By efficiently organizing requests, these algorithms enhance system performance by reducing disk arm movements and improving data retrieval speed. This is essential for maintaining system responsiveness, especially during heavy workload periods.

Types of Algorithms:

  • FCFS (First-Come, First-Served): Processes requests in the order they arrive.

  • SSTF (Shortest Seek Time First): Services the request that requires the least disk arm movement.

  • SCAN and C-SCAN: Move the disk arm across the surface in one direction, servicing requests along the way.

  • LOOK and C-LOOK: Similar to SCAN algorithms but do not move to the end of the disk; they reverse direction at the last request serviced.


  • Seek Time:

  • Definition: The time taken by the disk arm to move the read/write head to the specific track where data is stored.

  • Importance: Seek time directly affects the latency of accessing data on the disk. Lower seek times indicate faster access.

  • Rotational Latency:

  • Definition: The time required for the desired disk sector to rotate under the read/write head after the head is positioned over the correct track.

  • Importance: Rotational latency depends on the rotational speed of the disk. Faster rotational speeds reduce latency, enhancing data retrieval efficiency.

  • Disk Access Time:

  • Definition: The total time required to complete a data request, consisting of seek time, rotational latency, and transfer time.

  • Importance: Disk access time measures the efficiency of the entire process of accessing data from the disk. It is a critical metric in evaluating disk performance.

  • Disk Response Time:

  • Definition: The average time a request spends waiting in the queue and being serviced by the disk. It includes disk access time and any queue wait time.

  • Importance: Disk response time reflects the overall responsiveness of the system to data requests. Lower response times indicate faster data retrieval for applications.

  • Transfer Time:

  • Definition: The time taken to transfer data between the disk and the system once the read/write head is positioned correctly.

  • Importance: Transfer time is influenced by the data transfer rate of the disk and impacts the overall speed of data retrieval and storage operations.

  • Starvation:

  • Definition: A condition where a low-priority job or request is delayed indefinitely because higher-priority jobs continue to monopolize the disk scheduler.

  • Importance: Starvation highlights the need for fair and balanced disk scheduling algorithms to ensure that all requests, regardless of priority, receive timely service.


  1. FCFS (First-Come-First-Serve):

  • Description: Processes requests in the order they arrive.

  • Pros: Simple to implement.

  • Cons: Can lead to high wait times and inefficient disk use, especially if there are requests scattered across the disk.

  1. SSTF (Shortest Seek Time First):

  • Description: Selects requests with the shortest seek time (distance) first.

  • Pros: More efficient than FCFS in terms of reducing seek time.

  • Cons: May cause starvation for requests that are far away from the current position of the disk arm.

  1. SCAN (Elevator Algorithm):

  • Description: The disk arm moves in one direction, servicing requests until it reaches the end, then reverses direction.

  • Pros: Provides better performance than FCFS and SSTF.

  • Cons: Can still lead to starvation for requests at the extremes of the disk if there is a continuous stream of requests.

  1. C-SCAN (Circular SCAN):

  • Description: Similar to SCAN, but only services requests in one direction and jumps to the opposite end of the disk after reaching one end.

  • Pros: Offers uniform wait times and reduces the risk of starvation.

  • Cons: Requires careful handling of requests to ensure fairness across the disk.


Error Detection and Correction:

  • Error Detection: Operating systems use various techniques like parity bits and cyclic redundancy checks (CRC) to detect errors in data transmission. Parity checks detect single-bit errors, while CRC detects more complex errors.

  • Error Correction: Error correction codes (ECC) are used to not only detect but also correct errors in data. ECC is particularly useful in critical systems where data integrity is crucial, allowing the system to recover from errors without relying on retransmission.

Storage Attachment Methods:

  • Host-Attached: This method involves connecting storage directly to the computer via local I/O ports like USB, Firewire, or Thunderbolt. It provides direct and fast access to storage devices.

  • Network-Attached (NAS): NAS devices are connected to a network, allowing authorized users to access and retrieve data from a centralized location. NAS devices are scalable and provide flexibility for expanding storage needs.

  • Storage Area Network (SAN): SANs provide block-level access to storage over a high-speed network. They are composed of hosts, switches, and storage elements interconnected using technologies like Fibre Channel, providing efficient data access and management across multiple hosts and storage devices.


Introduction to RAID:

RAID (Redundant Array of Independent Disks) is a data storage technology that combines multiple physical disks into a single logical unit. This approach enhances performance and provides fault tolerance by distributing data across the disks and implementing techniques like mirroring and parity.

RAID Levels:

  1. RAID 0 (Striping):

  • Description: Splits data into blocks and writes them across multiple disks simultaneously.

  • Advantages: Cost-efficient, improves read/write performance, no storage overhead.

  • Disadvantages: No fault tolerance, data loss if any disk fails.

  • Use Cases: Suitable for non-critical data where performance is crucial, such as temporary files or backups stored elsewhere.

  1. RAID 1 (Mirroring):

  • Description: Duplicates data across at least two disks.

  • Advantages: Redundancy, improved read performance, simple to configure.

  • Disadvantages: Uses half of the storage capacity, higher cost due to needing more disks.

  • Use Cases: Ideal for critical systems where data integrity and availability are paramount, like accounting databases or smaller servers.

  1. RAID 5 (Striping with Parity):

  • Description: Distributes data blocks across multiple disks along with parity information.

  • Advantages: High performance, fault tolerance against a single disk failure, efficient storage use.

  • Disadvantages: Longer rebuild times, complex setup, complete data loss if more than one disk fails.

  • Use Cases: Commonly used in environments needing a balance of performance and fault tolerance, such as file and application servers.

RAID Implementation Types:

  • Hardware-Based RAID: Uses a dedicated RAID controller card installed in a motherboard slot, offering high performance and reliability.

  • Software-Based RAID: Utilizes utility software on the operating system to manage RAID operations, impacting CPU performance but cost-effective.

  • Firmware/Driver-Based RAID: Embedded in the motherboard firmware or managed by a driver, providing a balance between hardware and software RAID in terms of cost and performance.


Overview of Input-Output Devices:

Input-output (I/O) devices are integral to computer systems, enabling communication between the computer and the outside world. They are categorized into three main types: Human readable, Machine readable, and Communication devices.

Human Readable Devices: These devices allow users to interact directly with computers and interpret outputs:

  • Printers: Produce physical copies of documents.

  • Displays: Provide visual output.

  • Keyboards: Input text and commands.

  • Mice: Navigate and interact with the computer interface.

Machine Readable Devices: These facilitate communication with electronic devices and automate data processes:

  • USB devices: Interface for data transfer and peripheral connection.

  • Disk drives: Store and retrieve digital information.

  • Controllers: Manage other devices.

  • Sensors: Detect and respond to physical inputs like temperature.

Communication Devices: Used for remote interactions and network connectivity:

  • Modems: Convert digital signals to analog for transmission.

  • Digital line drivers: Enhance signal quality over long distances.

  • Network interface cards (NICs): Connect computers to networks.

I/O Parameters:

  • Data Rate: Varies significantly among devices, from keyboards (low) to disk drives and network interfaces (high).

  • Error Conditions: Handling varies; some devices manage errors automatically, others require manual intervention.

  • Data Representation: Uses different encoding schemes (e.g., ASCII, binary) affecting compatibility and integration.

  • Complexity of Control: Ranges from simple interfaces for printers to complex ones for disk drives and network controllers.

  • Unit of Transfer: Data can be transferred as bytes/characters or larger blocks, impacting efficiency.

Evolution of I/O Function:

  1. Direct CPU Control: CPU handles all I/O operations.

  2. Introduction of I/O Modules: Uses interrupts for programmed I/O, offloading some tasks.

  3. Interrupt-Only I/O: Relies entirely on interrupts, reducing CPU workload.

  4. Direct Memory Access (DMA): Allows I/O modules to control memory directly, improving efficiency.

Direct Memory Access (DMA):

  • Enables direct data transfer between devices and memory.

  • Reduces CPU involvement, efficient for high-volume data transfers like disk I/O.

  • Configurations include single bus and I/O bus setups.

Direct I/O with Polling vs. Interrupt Driven I/O:

  • Polling: CPU continuously checks device status, less efficient.

  • Interrupt Driven: Device signals CPU when ready, efficient multitasking.


IO (Input/Output) Interface Overview:

An IO (Input/Output) Interface is a crucial mechanism that enables communication between computers or devices and the external world. It facilitates the exchange of data between the system and external peripherals like keyboards, mice, printers, and network adapters in a standardized manner.

Block Devices:

  • Definition and Storage: Store data in fixed-size blocks with addresses assigned by the OS for efficient data management.

  • Communication: Drivers communicate by sending entire blocks of data, ensuring quick and efficient transfer.

  • Examples: Hard disks, USB cameras, essential for storing and accessing large data quantities rapidly.

Character Devices:

  • Definition and Function: Handle data as sequential streams of characters, used in devices like serial ports and sound cards.

  • Examples: Serial ports, keyboards, process data sequentially as streams of characters.

  • Differences from Block Devices: Unlike block devices, character devices handle data streams and are accessed sequentially.

Network Devices:

  • Operation: Handle data transfer over networks using socket interfaces for bi-directional communication.

  • Communication: Data sent into the network can be read out sequentially at the other end, facilitating full-duplex communication.

  • Examples: Routers, network interface cards (NICs), modems, represented in systems with dedicated device data structures.

Storage Management:

  • Clock and Timers: Provide current time for timestamping files, logging events, and scheduling tasks.

  • Timers: Set for executing tasks at intervals or delays, crucial in scheduling algorithms and timeouts.

  • Elapsed Time: Tracks process duration, system uptime calculation, essential for performance monitoring.

  • Programmable Interrupt Timer (PIT): Generates interrupts at regular intervals for time-based operations.

Mass Storage Systems:

  • Definition: Provide large data storage with devices like hard drives, SSDs, and magnetic tapes.

  • Data Structures: Organize and manage data efficiently, using arrays, linked lists, and hash tables.

  • Disk Performance Parameters: Metrics include latency, throughput, and IOPS for efficient storage management.

  • Disk Scheduling: Algorithms optimize disk I/O request order, such as FCFS, SSTF, and SCAN.

  • Disk Management: Tasks like partitioning, formatting, and maintaining storage devices ensure efficient data storage and retrieval.

I/O Hardware and Kernel Subsystem:

  • Hardware: Interfaces with storage devices to manage I/O operations efficiently.

  • Kernel Subsystem: Manages data transfer between hardware and applications, ensuring efficient I/O operations.

 
 
 

Recent Posts

See All
PE internals

Linked Libraries and Functions Imported Functions: Definition: These are functions used by a program that are actually stored in...

 
 
 
OS internals

Privilege Separation Concept: Modern operating systems separate user applications (untrusted) from critical operating system components...

 
 
 
Memory Management in short

Address Space CPU Access: To run instructions and access data in main memory, the CPU needs unique addresses for that data. Definition:...

 
 
 

Comments


Subscribe Form

Thanks for submitting!

©2021 by just dump 1. Proudly created with Wix.com

bottom of page