Secondary Storage
Secondary Storage
(PCO303C)
UNIT II
MEMORY ORGANIZATION
TOPIC: SECONDARY STORAGE DEVICES
CONTENTS
Introduction
Comparison: Primary vs. Secondary Storage
Types of Secondary Storage Devices
Selecting a Secondary Storage Device
Trends in Secondary Storage
Data Management and Security
Maintaining Secondary Storage Devices
INTRODUCTION
Definition of Secondary Storage
Secondary storage refers to a category of storage devices in a computer
system that holds data for extended periods, even when the system is
powered off.
Unlike primary storage (RAM), which provides fast but temporary data
access, secondary storage retains information over the long term.
It includes devices like hard disk drives, solid-state drives, optical discs,
flash drives, and magnetic tapes.
Secondary storage devices are essential for storing large volumes of data,
applications, and files that are not actively being used but need to be
preserved for future use.
Role and Importance in Computer Systems:
Secondary storage devices play a crucial role in the overall functionality and
usability of computer systems. Here's why they are important:
Slower Speeds: HDDs are mechanical devices with moving parts, which
makes them slower than newer storage technologies like SSDs. Access
times are affected by the time it takes for the read/write heads to
physically move to the desired location on the platter.
Mechanical Vulnerability: The mechanical nature of HDDs makes them
susceptible to wear and tear. Physical shocks, drops, or sudden movements
can lead to data loss or damage.
Noise and Heat: The spinning of platters and movement of components
within HDDs can generate noise and heat, impacting the overall system
environment.
Bulkier Design: HDDs are typically larger and heavier than SSDs, which can
affect the portability and form factor of devices that incorporate them.
Organization of Disks
Disk contains concentric tracks.
• Tracks are divided into sectors
• A sector is the smallest addressable unit in a disk.
• Sectors are addressed by:
surface #
cylinder (track) #
sector #
Accessing Data
When a program reads a byte from the disk, the OS locates the surface,
track and sector containing that byte, and reads the entire sector into a
special area in main memory called buffer.
The bottleneck of a disk access is moving the read/write arm.
So it makes sense to store a file in tracks that are below/above each other
in different surfaces, rather than in several tracks in the same surface.
Cylinders
A cylinder is the set of tracks at a given radius of a disk pack. – i.e. a
cylinder is the set of tracks that can be accessed without moving
the disk arm.
All the information on a cylinder can be accessed without moving the
read/write arm.
Estimating Capacities
Since each cylinder can hold a certain amount of data, we need to determine how many
cylinders are required to store the entire file. Each cylinder can hold:
Cylinder capacity = Tracks per cylinder × Sectors per track × Bytes per sector Cylinder
capacity = 12 tracks × 40 sectors × 512 bytes = 245760 bytes
Since we can't have a fraction of a cylinder, we need to round up to the nearest whole
cylinder. Therefore, the file requires 21 cylinders.
Q2. Total Capacity of the Disk: The total capacity of the disk is the
product of the number of cylinders, tracks per cylinder, sectors per track,
and bytes per sector:
a) Average Latency: Average latency is the time it takes for the desired sector to
rotate under the read/write head after the head has been positioned over the
correct track.
It is half of the time it takes for one full revolution, considering the disk rotates at a
constant speed.
Average Latency = (1 / 2) × (1 / RPM) × 60 seconds
c) Time to Read the Entire Disk, One Cylinder at a Time: The time to read the
entire disk one cylinder at a time depends on the seek time, rotational delay, and
transfer time.
To calculate the time, we'll use the formula:
Time to Read = Seek Time + Rotational Delay + Transfer Time
Given Seek Time = 28 ms and Rotational Delay (Average Latency) = 8.33 ms,
Now, we can calculate the Transfer Time and then calculate the Total Time to
Read:
Transfer Time = (1 / 3600) × 60 seconds × 25 sectors/track ≈ 0.4167
seconds or 416.7 ms
Total Time to Read = Seek Time + Rotational Delay + Transfer Time
Total Time to Read = 28 ms + 8.33 ms + 416.7 ms ≈ 453.03 ms
To calculate the average time to read one sector, we need to consider the average
seek time, the average rotational delay, and the time it takes for the sector to
rotate under the read/write head.
The formula to calculate the average time to read one sector is as follows:
Average Time to Read One Sector = Average Seek Time + (Average Rotational
Delay / 2) + (1 / (2 * Rotation Speed))
Given:
Average seek time = 8 msec
So, the average time to read one sector is approximately 9.5 milliseconds.
SOLID STATE DRIVES (SSDS)
SOLID STATE DRIVES (SSDS)
SOLID STATE DRIVES (SSDS)
SOLID STATE DRIVES (SSDS)
SOLID STATE DRIVES (SSDS)
OPTICAL STORAGE
DEVICES
CD, DVD, Blu-ray: Optical storage devices use laser technology to read and write data on
optical discs, such as Compact Discs (CDs), Digital Versatile Discs (DVDs), and Blu-ray
discs.
Each type of disc offers different storage capacities and is used for various applications.
CD (Compact Disc): CDs were one of the first optical storage formats. They can store
around 700 MB of data, making them suitable for music albums, software distribution, and
small data backups.
DVD (Digital Versatile Disc): DVDs come in various formats, with the most common
being DVD-5 (4.7 GB) and DVD-9 (8.5 GB). They are used for video movies, software
installation, and data backup.
Blu-ray Disc: Blu-ray discs have significantly higher storage capacity compared to CDs
and DVDs.
A single-layer Blu-ray disc can hold around 25 GB, while a dual-layer disc can store up to
50 GB.
Blu-ray discs are used for high-definition video content, large data backups, and
professional applications like video editing.
FLASH DRIVES (USB
DRIVES)
Flash drives, also known as USB drives,
thumb drives, or pen drives, are portable
storage devices that use flash memory
technology to store and retrieve data.
They typically have a USB connector on one end that can be inserted into a
USB port on a computer, laptop, or other compatible devices.
Their small size and lack of moving parts make them easy to carry in
pockets, bags, or even on keychains.
Flash drives are "plug and play," meaning they don't require additional
power or drivers in most cases.
This convenience allows users to quickly access and transfer data on-the-
go without the need for an internet connection.
Use Cases:
Data Transfer: Flash drives are primarily used for transferring files
between devices. They're ideal for sharing documents, photos, videos, and
other types of data.
Backup and Storage: Flash drives can serve as portable backup devices
for important files, allowing users to keep copies of data in case of system
failures or data loss.
Software and Applications: Some applications can be run directly from a
flash drive, making it a convenient way to carry software tools, utilities, and
even lightweight applications.
Bootable Drives: Flash drives can be used to create bootable media for
installing or repairing operating systems. This is particularly useful for IT
professionals and tech enthusiasts.
Presentation and Collaboration: Flash drives enable easy sharing of
presentations and collaborative work during meetings, conferences, and
educational settings.
Limitations:
Limited Storage: While flash drive capacities have increased significantly
over time, they are still limited compared to larger external hard drives or
cloud storage options.
Durability: Flash drives are generally durable but can still be sensitive to
physical damage, extreme temperatures, or exposure to moisture.
Data Security: Due to their small size, flash drives are easy to misplace or
lose, which raises security concerns if they contain sensitive information.
Write and Erase Cycles: Like other flash memory-based devices, flash
drives have a finite number of write and erase cycles. Excessive write
operations can eventually lead to data degradation.
Speed Variability: The speed of flash drives can vary, with some models
offering faster read/write speeds than others. This may impact the time it
takes to transfer data.
MAGNETIC TAPES
Magnetic tapes are a type of storage medium that uses magnetization to
store and retrieve digital information.
They were widely used for data storage and backup purposes before the
advent of modern storage technologies like hard disk drives (HDDs) and
solid-state drives (SSDs).
Despite their declining use in recent years, magnetic tapes are still
employed in certain industries for archival, long-term data storage, and
data backup needs.
MAGNETIC TAPES
Characteristics
No direct access, but very fast sequential access.
Resistant to different environmental conditions.
Easy to transport, store, cheaper than disk.
Before it was widely used to store application data; nowadays, it’s mostly
used for backups or archives.
A sequence of bits are stored on magnetic tape.
For storage, the tape is wound on a reel.
To access the data, the tape is unwound from one reel to another.
As the tape passes the head, bits of data are read from or written onto the
tape.
Given:
Recording density = 1600 bits per inch (bpi)
Tape length = 2400 feet
Interblock gap = ½ inch
Record size = 512 bytes
Blocking factor = 25 (number of records per block)
Calculating Effective Tape Length: The effective length of the tape is
the actual usable length after accounting for the interblock gap. The
interblock gap is not available for data storage, so we subtract it from the
total tape length:
Effective Tape Length = Total Tape Length - Interblock Gap
Effective Tape Length = 2400 feet - ½ inch (converted to feet)
Calculating Data Storage Capacity: The data storage capacity on the
tape is determined by the effective tape length and the recording density.
We'll convert the effective tape length to inches to match the recording
density's unit.
Data Storage Capacity = Effective Tape Length (in inches) × Recording
Density
Data Storage Capacity = (Effective Tape Length in feet × 12 inches/foot) ×
1600 bpi
Calculating the Number of Records: Now we'll divide the data storage
capacity by the product of the record size and the blocking factor to find
the total number of records that can be written on the tape:
Given that the blocking factor is 25 and the record size is 512 bytes: