0% found this document useful (0 votes)
18 views50 pages

Secondary Storage

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

Secondary Storage

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

COMPUTER ORGANIZATION

(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:

 Data Persistence: Secondary storage ensures that data remains intact


even when the computer is powered off or restarted. This allows users to
store files and information for the long term without worrying about data
loss.
 Large Storage Capacity: Compared to primary storage, secondary
storage devices offer much larger storage capacities. This is essential for
storing extensive software applications, multimedia files, databases, and
backups.
 Data Organization: Secondary storage enables users to organize and
manage their data efficiently. Files can be stored, categorized, and
accessed whenever needed, contributing to effective data management.
 Backup and Recovery: Secondary storage is commonly used for creating
backups of important data. Regular backups provide a safety net in case of
system failures, accidental deletions, or data corruption.
 Portability and Sharing: Devices like USB drives and external hard drives
provide portable storage options.
 Archival Purposes: Secondary storage devices are often used for archiving
old files, historical records, and other data that needs to be retained for
compliance, legal, or historical reasons.
 Multimedia and Entertainment: Secondary storage is essential for storing
multimedia content like videos, photos, music, and games.
 Software Installation: Operating systems and software applications are
stored on secondary storage devices.
 Data Security: Secondary storage devices can be used to store sensitive or
confidential information that should not be kept on primary storage due to
security concerns.
 Scalability: As data needs grow, secondary storage can be expanded by
adding more storage devices or upgrading to higher-capacity options.
TYPES OF SECONDARY STORAGE DEVICES
Hard Disk Drives (HDD)
Explanation of Components:
Hard Disk Drives (HDDs) are a type of secondary storage device that has been a
cornerstone of computing for decades. They consist of several key components that
work together to store and retrieve data:
 Platters: These are circular, flat disks coated with a magnetic material. Data is
stored on the platters in the form of magnetic patterns.
 Read/Write Heads: Positioned above and below each platter, these heads are
responsible for reading and writing data. They move across the platters' surfaces to
access different portions of the disk.
 Actuator Arm: The actuator arm supports the read/write heads and positions them
over the correct track on the platters to access data.
 Spindle Motor: This motor spins the platters at high speeds (usually thousands of
revolutions per minute) to enable rapid data access.
Advantages:

 Cost-Effectiveness: HDDs provide larger storage capacities at a lower cost


per gigabyte compared to many other storage options.
 Familiarity and Longevity: HDDs have been in use for a long time, and they
continue to be a reliable choice for storage needs.
 Mature Technology: The technology behind HDDs is well-established,
leading to stable and predictable performance.
 Data Retention: Data stored on HDDs remains intact even when the power
is off, ensuring long-term data preservation.
Disadvantages:

 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

 Track capacity = # of sectors/track * bytes/sector


 Cylinder capacity = # of tracks/cylinder * track capacity
 Drive capacity = # of cylinders * cylinder capacity
 Number of cylinders = # of tracks in a surface

Knowing these relationships allows us to compute the amount of disk space


a file is likely to require
 Exercise

Store a file of 20000 records on a disk with the following characteristics:


# of bytes per sector = 512
# of sectors per track = 40
# of tracks per cylinder = 12
# of cylinders = 1331
Q1. How many cylinders does the file require if each data record requires
256 bytes?
Q2. What is the total capacity of the disk?
Solution
The file size is given in terms of records (20000 records), and each record requires 256
bytes.
To calculate the total size of the file in bytes:
 Total file size = Number of records × Bytes per record
 Total file size = 20000 records × 256 bytes = 5120000 bytes

 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

 Number of cylinders required = Total file size / Cylinder capacity


 Number of cylinders required = 5120000 bytes / 245760 bytes ≈ 20.82

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:

 Total capacity = Cylinders × Tracks per cylinder × Sectors per track ×


Bytes per sector
 Total capacity = 21 cylinders × 12 tracks × 40 sectors × 512 bytes =
13025280 bytes

 To convert the total capacity to megabytes (MB), we can divide by


1,048,576 (since 1 MB = 1,048,576 bytes):
 Total capacity ≈ 13025280 bytes / 1,048,576 bytes/MB ≈ 12.41 MB

So, the total capacity of the disk is approximately 12.41 megabytes.


Given:
 Number of surfaces = 20

 Tracks per surface = 800

 Sectors per track = 25

 Bytes per sector = 512

 RPM (Revolutions per minute) = 3600

 Track-to-track seek time = 7 ms

 Average seek time = 28 ms

 Maximum seek time = 50 ms

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

 Given RPM = 3600,

 Average Latency = (1 / 2) × (1 / 3600) × 60 ≈ 0.00833 seconds or 8.33 ms


b) Disk Capacity: Disk capacity can be calculated by multiplying the number of
surfaces, tracks per surface, sectors per track, and bytes per sector.
 Disk Capacity = Number of surfaces × Tracks per surface × Sectors per track ×
Bytes per sector
 Disk Capacity = 20 surfaces × 800 tracks/surface × 25 sectors/track × 512
bytes/sector

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,

we need to find the Transfer Time.


 Transfer Time is the time it takes to read data from the entire track once the
read/write head is positioned correctly. It's based on the time taken to read one
sector and multiply it by the number of sectors per track.
Transfer Time = Time to read one sector × Sectors per track

Time to read one sector = 1 / RPM × 60 seconds (same as Average Latency)


Transfer Time = (1 / RPM) × 60 seconds × Sectors per track

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

 Average rotational delay = 3 msec

 Spindle speed (Rotation speed) = 10,000 rpm

 Calculating the Average Time to Read One Sector:

 Average Time to Read One Sector = 8 ms + (3 ms / 2) + (1 / (2 * (10,000 / 60)))


seconds

 Average Time to Read One Sector = 8 ms + 1.5 ms + 0.0005 seconds ≈ 9.5 ms

 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.

 Flash memory is a type of non-volatile


memory that retains data even when
power is turned off.

 This makes flash drives highly versatile and


convenient for transferring files between
devices.
Portability and Convenience:

 Flash drives are characterized by their compact size and convenience.

 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:

 Number of Records = Data Storage Capacity / (Record Size × Blocking


Factor)

 Given that the blocking factor is 25 and the record size is 512 bytes:

 Number of Records = Data Storage Capacity / (512 bytes × 25)

You might also like