0% found this document useful (0 votes)
4 views40 pages

Chatgpt To PDF HTML To PDF Api: Printed Using, Powered by Pdfcrowd - 1/40

The document provides an overview of computer data storage, detailing its definition, memory structure, and types including primary, secondary, off-line, tertiary, and cloud storage. It discusses the characteristics of memory hierarchy, emphasizing access time, frequency of access, storage capacity, and cost per bit. Additionally, it covers primary storage types, specifically RAM, and its two main types: Static RAM (SRAM) and Dynamic RAM (DRAM), along with their operational details.

Uploaded by

Eva
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)
4 views40 pages

Chatgpt To PDF HTML To PDF Api: Printed Using, Powered by Pdfcrowd - 1/40

The document provides an overview of computer data storage, detailing its definition, memory structure, and types including primary, secondary, off-line, tertiary, and cloud storage. It discusses the characteristics of memory hierarchy, emphasizing access time, frequency of access, storage capacity, and cost per bit. Additionally, it covers primary storage types, specifically RAM, and its two main types: Static RAM (SRAM) and Dynamic RAM (DRAM), along with their operational details.

Uploaded by

Eva
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/ 40

4.

Data Storage

• Computer data storage is a technology consisting of computer


components and recording media used to retain digital data
• Storage device stores the data and instruction in a computer
 Known as memory
• Memory is divided into large number of small parts
– Each part is called a cell

CSC 347 3

– Each part is called a cell


– Each cell can store a fixed number of bits
• Each cell has a unique number assigned to it
– Known as address of cell
– Address varies from 0 to memory size – 1
o Example: A 64k words computer memory unit has:
64 * 1024 = 65,536 memory locations
The address of these locations varies from 0 to 65,535

Lecture 4: Data Storage

Types of Data Storage

• There are four types of


storage:
– Primary Storage
• RAM, Cache etc.
– Secondary Storage
• Hard Disk

CSC 347 Lecture 4: Data Storage 4

– Off-line Storage
• USB flash drive, memory card
etc.

– Tertiary Storage
• Magnetic Tape, Optical disk
etc.
– Others
• Cloud storage, RAID etc.

Data Storage

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 1/40
• A computer system’s storage unit is ranked according to the
following criteria:
 Access Time – Time required to retrieve the data
 Storage Capacity – Amount of the data that can be
stored in storage unit
 Cost per bit of storage – Minimizing the cost is main

CSC 347 5
 Cost per bit of storage – Minimizing the cost is main
goal

Computer Data Storage Overview

Definition:
Computer data storage involves components and media used to retain digital data. Storage devices
hold both data and instructions, often referred to as memory.

Memory Structure:

Divided into parts: Memory is split into numerous cells.


Cell characteristics:
Stores a fixed number of bits.
Each cell has a unique address.
Example:
A 64k word memory has 65,536 memory locations.
Address ranges from 0 to 65,535.

Types of Data Storage

1. Primary Storage:
Examples: RAM, Cache.
Features: Fast access, volatile (data is lost when power is off).
2. Secondary Storage:
Examples: Hard Disk, SSD.
Features: Persistent, slower than primary storage.
3. Off-line Storage:
Examples: USB flash drives, memory cards.
Features: Portable and removable.
4. Tertiary Storage:
Examples: Magnetic tapes, optical disks (CDs/DVDs).
Features: Mainly for archiving and backups.
5. Others:
Examples: Cloud storage, RAID (Redundant Array of Independent Disks).
Features: Advanced solutions for scalability, reliability, and redundancy.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 2/40
Criteria for Ranking Storage Units:

1. Access Time:
Time taken to retrieve data from storage.
2. Storage Capacity:
The amount of data a storage unit can hold.

3. Cost per Bit:


Efforts focus on minimizing the cost per unit of data storage.

Important Concepts Recap:

Primary vs. Secondary Storage: Faster but volatile vs. Persistent but slower.
Memory Addresses: Unique identifiers for cells in memory.
Cost Efficiency: A key goal in storage technology.

Let me know if you'd like further clarifications or examples!

Memory Hierarchy-• Characteristics of Memory Hierarchy (from top to


bottom) are as follows:
– Access time by the CPU: increases
– Frequency of access of the memory by the CPU: decreases
– Capacity in terms of storage: increases
– Cost per bit of storage: decreases

Memory Hierarchy Overview

The memory hierarchy in a computer system organizes different types of memory based on speed,
capacity, cost, and usage frequency. It helps optimize the performance and cost of the system.

Characteristics of Memory Hierarchy (Top to Bottom):

1. Access Time:
Access time increases as we move down the hierarchy.
Memory closer to the CPU (like cache) is faster to access than distant memory (like hard
drives).
2. Frequency of Access:
Frequency decreases as we go down the hierarchy.
The CPU frequently accesses faster memory (like cache) and rarely accesses slower storage
(like secondary storage).
3. Storage Capacity:
Capacity increases as we move down.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 3/40
Lower levels (like hard drives or cloud storage) hold much larger amounts of data compared
to upper levels.
4. Cost per Bit of Storage:
Cost decreases moving downward.
High-speed memory like cache is expensive, while slower storage like magnetic tape or cloud
storage is more economical.

Typical Memory Hierarchy (Top to Bottom):

1. Registers:
Closest to the CPU, fastest access, and very limited capacity.
2. Cache:
Small and fast memory, stores frequently used data.
3. Primary Memory (RAM):
Moderate speed and capacity, used for active data and processes.
4. Secondary Storage:
Includes hard drives and SSDs, slower but much larger in capacity.
5. Tertiary/Off-line Storage:
Includes magnetic tapes, optical disks, and external drives, primarily for backups and
archiving.
6. Cloud Storage:
Remote storage accessible via the internet, offers massive capacity and scalability.

Key Observations:

Trade-offs exist between speed, cost, and storage capacity.


The CPU tries to interact with faster memory first (e.g., cache or RAM) to improve efficiency.
Proper management of this hierarchy is crucial for optimal system performance.

Let me know if you need examples or more detailed explanations!

Memory/Storage Covered in this lecture

 Primary Storage
o Random Access Memory (RAM)

 Secondary Storage

CSC 347 7

o Hard Disk Drive (HDD)

Lecture 4: Data Storage

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 4/40
Primary Storage

Random Access Memory (RAM)

• A RAM constitutes the internal memory of CPU for


storing data, program, and program result
• Also know as Read/Write memory
• Access time in RAM is independent of the address to
the word, resulting:

CSC 347 8
the word, resulting:
– Each storage location inside the memory is easy to reach as
other location and takes the same amount of time

• In the form of integrated circuits that allow the stored


data to be accessed in any order
• Volatile in nature
• Small in terms of its physical size, and capacity

Lecture 4: Data Storage (Main Memory)

Primary Storage
Types of RAM

• Two basic types of RAM: Static RAM (SRAM), and Dynamic RAM (DRAM)
• Static RAM (SRAM)
– Term static indicates that memory retains its contents as long as power remains
applied
– Chips use a matrix of 6-transistors and no capacitors
– SRAM need not have to be refreshed on a regular basis
– SRAM uses more chips than DRAM for the same amount of storage space

CSC 347 9
– It’s used as cache memory needs to be very fast and Small
– It can give access time as low as 10 ns
• Dynamic RAM (DRAM)
– Term dynamic indicates that the memory must be constantly refreshed in order for it
to maintain the data
 This is done by placing the memory on a refresh circuit that rewrites the data
several hundred times per second
– All DRAMs made up of memory cells
 These cells are composed one capacitor and one transistor
– DRAM memory access time is 60 ns

Lecture 4: Data Storage (Main Memory)

Primary Storage
SRAM Design
• A typical SRAM cell is made up of six MOSFETs
(Metal Oxide Semiconductor Field Effect
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 5/40
Transistors)
• Each bit in an SRAM is stored on four transistors
(M1, M2, M3, M4) that form two cross-coupled
inverters
• This storage cell has two stable states which are used
to denote 0 and 1

CSC 347 10

to denote 0 and 1
• Two additional access transistors serve to control the
access to a storage cell during read and write
operations
• Access to the cell is enabled by the word line (WL)
which controls two access transistors M5 and
M6 which, in turn, control whether the cell should be
connected to the bit lines: and BL
– They are used to transfer data for both read and
write operations

Figure2. A six-transistor CMOS

SRAM cell

Lecture 4: Data Storage (Main Memory)

Primary Storage
SRAM Design

Memory

• If the output lines ( ) is connected to


something, Read or Write is possible in
the memory. BL and are act as these
lines.
• To access these lines, M5 and M6 access
transistors are used
• If WL = 1, M5 and M6 are on that means
M5 and M6 are the access transistors

CSC 347 11
Figure2. A six-transistor CMOS

SRAM cell

Lecture 4: Data Storage (Main Memory)

Simplified circuit (two inverters are connected)

Basic Not gate has been changed to CMOS inverter

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 6/40
10

10

Q=1 Q=0

• If WL = 1, M5 and M6 are on that means


BL and lines are accessible resulting
Read and Write are possible
• If WL = 0, access is off and memory is in
hold state
• BL and are act as input lines When
something need to Write in to memory
• BL and are act as output lines When
something need to read from memory
• Pre-charged capacitors are used for read
and write (not shown in figure)

Primary Storage
SRAM Operation

• An SRAM cell has three different states:

– Standby (the circuit is idle)


– Reading (the data has been requested) or
– writing (updating the contents)Primary Storage

SRAM Operation : Standby

• If the word line is not asserted,


the access transistors M5 and M6
disconnect the cell from the bit
lines

CSC 347 13
• The two cross-coupled inverters
formed by M1 – M4 will continue
to reinforce each other as long as
they are connected to the supply

Figure2. A six-transistor CMOS

SRAM cell

Lecture 4: Data Storage (Main Memory)

• During the read time in SRAM, Memory Should hold


some value
• Suppose Memory: Q = 1 and = 0
• Bit line (BL) and are going to be used to read
• When the Word Line (WL) = 1, access transistors are on
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 7/40
• While reading, BL and are the output lines
• Precharged VDD
• Check the voltage difference at the both side:
Primary Storage
SRAM Operation : Reading

• Check the voltage difference at the both side:


• Q=1 & load-voltage in BL=VDD; no voltage difference
• =0 & load-voltage in =VDD; voltage difference
• Voltage is decreased

• Send the found values of BL and to a sense amplifier


 Sense amplifier will sense which line has the higher
voltage and thus determine whether there is 1 or 0 stored
• When the voltage decreases output value is 1
• Memory read is successful
• When in Memory: Q = 0 and = 1, What happens?
CSC 347 14
Figure2. A six-transistor CMOS

SRAM cell

Lecture 4: Data Storage (Main Memory)

• Suppose memory value Q = 0 and = 1


• Bit line (BL) and are going to be used to write
• When the Word Line (WL) = 1, BL and are ready to
access
• To write into memory, BL and are input lines, is
force to ground because
Primary Storage

SRAM Operation : Write Operation

• = 1 and is ground; Voltage difference


• When voltage is decreasing, M1 and M2 transistors
are going to be affected
• If voltage < threshold voltage of M1
• M1 is Off
• M2 is On ; Q = 1
• It can be easily seen that Q was 0, but now Q is 1;
resulting write operation is successful in memory

CSC 347 15
Figure2. A six-transistor CMOS

SRAM cell

Lecture 4: Data Storage (Main Memory)

Primary Storage
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 8/40
DRAM Operation

• DRAM memory technology has MOS technology at


the heart of the design, fabrication and operation
• DRAM memory cell uses a capacitor to store each bit
of data and a transfer device - a MOSFET (Metal Oxide
Semiconductor Field Effect Transistor) that acts as a
switch
• The level of charge on the memory cell capacitor

CSC 347 16
• The level of charge on the memory cell capacitor
determines whether that particular bit is a logical “1” or
“0”
 Presence of charge in the capacitor indicates a logic “1” and
 Absence of charge indicates a logical “0”
• Two lines are connected to each dynamic RAM cell -
the Word Line (W/L) and the Bit Line (B/L) connect
as shown so that the required cell within a matrix can
have data read or written to it

Figure3. DRAM
Memory cell
T

Lecture 4: Data Storage (Main Memory)

Primary Storage
DRAM Read / Write

 When the word line is selected, the transistor turns


on and the charge stored on the capacitor is fed out
onto a bit line and to a sense amplifier
 The sense amplifier compares the capacitor voltage
to a reference value and determines if the cell

contains logic 1 or logic 0

Read Operation:

CSC 347 17
 The read out from the cell discharges the capacitor,
which must be stored to complete the operation

• A voltage signal is applied to the bit line


– a high voltage represents 1, and

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 9/40
– a low voltage represents 0
• A signal is then applied to the word line, allowing a charged to be transferred to the capacitor

Detailed Notes on Memory/Storage from Lecture 4

Primary Storage: Random Access Memory (RAM)

Overview:

RAM is the internal memory of the CPU, storing data, programs, and results.
It is also referred to as Read/Write Memory.
RAM is volatile: Data is lost when power is off.
Access Time: Independent of the storage location (all locations take equal time to access).
Form: Integrated circuits allowing data access in any order.
Small in physical size and capacity.

Types of RAM:

1. Static RAM (SRAM):


Static: Retains data as long as power is applied (no refreshing needed).
Built using 6-transistor cells (no capacitors).
Used as cache memory (fast but small).
Access Time: Can go as low as 10 ns.
Requires more chips than DRAM for the same storage capacity.
2. Dynamic RAM (DRAM):
Dynamic: Requires constant refreshing to maintain data.
Built using 1 capacitor and 1 transistor per memory cell.
Access Time: Around 60 ns.
Slower and less expensive than SRAM.

SRAM Details:

Design:

Each SRAM cell uses 6 MOSFETs (transistors).


Four transistors (M1, M2, M3, M4) form cross-coupled inverters to store a single bit.
Two additional transistors (M5, M6) control read/write access via bit lines (BL, BL̅ ).
Controlled by the Word Line (WL):
WL = 1: Access is enabled (read/write possible).
WL = 0: Access is disabled (standby mode).

Operations:

1. Standby:
WL is not asserted; M5 and M6 disconnect the cell from the bit lines.
Stored data (Q and Q̅ ) is maintained by cross-coupled inverters.
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 10/40
2. Read:
WL = 1 enables access.
Voltage differences in BL and BL̅ indicate stored data (1 or 0).
A sense amplifier detects voltage changes to determine the bit.
3. Write:
WL = 1 enables access.
BL and BL̅ are used as input lines to write data.
Stored value changes when new data is written (e.g., Q changes from 0 to 1).

DRAM Details:

Design:

DRAM uses capacitors to store data and a MOSFET transistor as a switch.


Bit Value:
1: Presence of charge in the capacitor.
0: Absence of charge in the capacitor.
Connected via:
Word Line (WL) to control access.
Bit Line (BL) to transfer data for read/write operations.

Operations:

1. Read:
WL is activated, enabling the transistor.
The capacitor's charge flows to BL and is amplified by a sense amplifier.
The capacitor is discharged during the read operation, requiring a refresh to restore data.
2. Write:
Voltage signals (high for 1, low for 0) are sent to BL.
WL activates, allowing the charge to transfer to the capacitor, storing the bit.

Primary vs. Secondary Storage

Primary Storage (RAM):


Volatile, fast, smaller capacity, higher cost.
Directly accessible by the CPU.
Secondary Storage (HDD/SSD):
Non-volatile, slower, larger capacity, lower cost.
Used for long-term data storage.

Let me know if you need further breakdowns or examples!

Secondary Storage

• It is not directly accessible by the CPU

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 11/40
• Computer usually uses its input/output channels to
access this type of storage and transfers the desire data
using intermediate area in primary storage
• Secondary storage characteristics
– Media

CSC 347 18

– Capacity
– Storage devices
– Access speed
• Terminology

 Reading: is the process of accessing information


 Writing: is the process of saving information

Lecture 4: Data Storage (Secondary Storage )

Secondary Storage

Hard Disk

• Hard Disk Drive (HDD), it is the main and usually


largest data storage device in a computer (usually,
160GB to 15TB)
• Hard disk speed is the speed at which content can
be read and written on a hard disk.

CSC 347 19
be read and written on a hard disk.
• A HDD unit comes with a set rotation speed varying
from 5400 to 7200 rpm (for desktop and laptop)
• Disk access time is measured in milliseconds

Lecture 4: Data Storage (Secondary Storage )

• Hard disks save files by altering the magnetic charges of the


disk’s surface to represent 1s and 0s
• Hard disks retrieve data and programs by reading these
charges from the magnetic disk
• Characters are represented by positive (+) and negative (−)
charges using the ASCII, EBCDIC, or Unicode binary code

Secondary Storage
Hard Disk (Cont’)

CSC 347 20

charges using the ASCII, EBCDIC, or Unicode binary code

Lecture 4: Data Storage (Secondary Storage )


Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 12/40
Secondary Storage

External Hard Disk

CSC 347 Lecture 4: Data Storage (Secondary Storage ) 21


Keywords Internal Hard Disk External Hard Disk
Portability No Yes
Price Less expensive More Expensive
Speed Fast Slow
Size Big Small
Special Installation Required Does not required

Internal Hard Disk

Secondary Storage
Hard Disk (Cont’)
Components of a Hard Drive

 Platters are multiple hard metal surfaces that are stacked one on top of
another contained in the hard drive
 Read/Write Heads write and read 1s and 0s to and from hard drive surface
o A Head Crash occurs when a read/write head touches the hard drive platter
 Track is a concentric circle on a hard drive platter

CSC 347 22
 Sectors – Each track is divided into sectors which contains 512 bytes of data
o ZBR (Zone Bit Recording) efficiently uses the hard drive surface by placing
more sectors on the outer tracks than on the inner tracks
o Interleaving is a method of numbering sectors for the most efficient transfer of
data between hard drive and controller. Hard drives normally use 1:1 interleave
 Cylinder runs through each track of a stack of platters
o Cylinders are necessary to differentiate files stored on same track and sector of
different platters
 When a hard disk is formatted, tracks, sectors, and cylinders are assigned

Lecture 4: Data Storage (Secondary Storage )

Secondary Storage
Hard Disk (Cont’)

CSC 347 23

Hard Drive Geometry


Lecture 4: Data Storage (Secondary Storage )

Secondary Storage
Hard Disk (Cont’)

CSC 347 Lecture 4: Data Storage (Secondary Storage ) 24

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 13/40
Secondary Storage
Hard Disk (Cont’)

CSC 347 25

Zone Bit Recording Sectors


Lecture 4: Data Storage (Secondary Storage )

Secondary Storage
Hard Disk (Cont’)

CSC 347 26

3:1 Interleaving
Lecture 4: Data Storage (Secondary Storage )

Secondary Storage
Hard Disk (Cont’)
How a Hard Disk Work?

1.

2.

CSC 347 Lecture 4: Data Storage (Secondary Storage ) 27

3.

Secondary Storage
Hard Disk (Cont’)
How a Hard Disk Work? (Cont’)
4. 5.

CSC 347 Lecture 4: Data Storage (Secondary Storage ) 28

6.

Secondary Storage
Hard Disk (Cont’)

• Hard disks are sensitive instruments


• Their read/write heads ride on a cushion of air about 0.000001
inch thick.
 It is so thin that a smoke particle, fingerprint, dust, or human hair could
cause what is known as a head crash

CSC 347 29
• A head crash occurs when a read/write head makes contact with the
hard disk’s surface or with particles on its surface
• A head crash is a disaster for a hard disk

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 14/40
Figure3. Materials that can cause a head crash

Lecture 4: Data Storage (Secondary Storage )

Secondary Storage
Hard-drive Partitioning Hard Disk (Cont’)
• Partitioning divides a hard drive so that the computer system sees
more than one drive
• Types of Partitions:
– The Primary Partition is the first detected drive on the hard drive
– The Extended Partition is a hard drive division
– Logical drives divides the extended partition into separate units which

CSC 347 30
– Logical drives divides the extended partition into separate units which
appear as separate drive letters

• The boot sector called MBR (Master Boot Record) is the first sector of a
hard drive (Cylinder 0, head 0, sector 1)
– it contains the main partition and the code, called the Boot Loader, which
when loaded in to the memory, will allow the system to boot up
– After it is loaded into memory, this program will determine from which
system partition to boot, and will start the program (called the
bootstrap), which will start up operating system present on that partition

Lecture 4: Data Storage (Secondary Storage )

Secondary Storage
Hard Disk (Cont’)
Hard-drive Partitioning (Cont’)

• The order in which the partitions are assigned drive letters


depends on three factors:
– The number of hard drives
– The type of partitions on the hard drives
How Drive Letters Are Assigned:

CSC 347 31

– The type of partitions on the hard drives


– The operating system
• The first floppy drive detected is assigned drive letter A:
• The second floppy drive detected is assigned drive letter B:
• The first hard drive primary partition detected receives
drive letter C:
• Drive letters assigned after letter C: are dependent upon
the operating system installed

Lecture 4: Data Storage (Secondary Storage )

Secondary Storage
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 15/40
Hard Disk (Cont’)
Hard-drive Partitioning (Cont’)

• A File System defines how data is stored on a drive.


– FAT (File Allocation Table) is a method of organizing a computer’s file
system
– FAT16 file system is supported by DOS, Windows 9x, NT, 2000, and XP

CSC 347 32
– FAT16 file system is supported by DOS, Windows 9x, NT, 2000, and XP
– FAT32 file system used by Windows 95 Service Release 2, Windows 98,
Windows 2000, XP and so on that supports hard drives up to 2TB in size
– NTFS (NT File System) file system used with Windows NT, Window XP, 7,
8, 9, 10
– Linux Ex2, Ex3, Ex4 and beyond for Linux

Lecture 4: Data Storage (Secondary Storage )

Secondary Storage
Hard Disk (Cont’)

• Preventive Maintenance will prolong the life of HDD


– CHKDSK is a program that locates clusters disassociated from
data files
• Lost Clusters are sectors on a disk that the file allocation

Preventive Maintenance for Hard Drives

CSC 347 33
• Lost Clusters are sectors on a disk that the file allocation
table cannot associate with any file or directory

– SCANDISK is a software program used to detect and repair


lost clusters
– Disk Cleanup utility helps free up hard drive space by
emptying the Recycle Bin, removing temporary files, etc.
– Defragmentation is the process of placing files in contiguous
sectors. This allows for faster hard disk access of files

Lecture 4: Data Storage (Secondary Storage )

Secondary Storage
Hard Disk (Cont’)
Performance Enhancements
• Disk caching
– Provides a temporary high- speed holding area
between a secondary storage device and the CPU
Improves performance by anticipating data
needs and reducing time to access
data from secondary storage

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 16/40
CSC 347 34

• Redundant Arrays of Inexpensive Disks (RAID)


– Several inexpensive hard-disk drives are connected
together
Improves performance by providing expanded
storage, fast access, and high reliability

• File compression and decompression


 Files compressed before storing and then
decompressed before being used again
Improves performance through efficient storage
Lecture 4: Data Storage (Secondary Storage )

Secondary Storage
Hard Disk (Cont’)

Redundant Arrays of Inexpensive Disks (RAID)

• Storage is an important part of fault tolerance


• A disk failure results in data loss that is not desired in any
organization and therefore, data loss prevention is required
• RAID can be one of the best ways to prevent data loss
– The data is copied on multiple disk

CSC 347 35
– The data is copied on multiple disk
– Different RAID Levels: RAID 0 (Striping), RAID 1
(Mirroring), RAID 2 (Bit-level striping with Hamming
code for error correction), RAID 3 (Byte-level striping with
dedicated parity), RAID 4 (Block-level striping with dedicated
parity), RAID 5 (Block-level striping with distributed
parity), RAID 6 (Block-level striping with double
distributed parity), RAID 10 (Striping + Mirroring),

Summary of Key Points: Lecture 4: Data Storage

Primary Storage

Random Access Memory (RAM):

Internal CPU memory for storing data and programs.


Volatile (loses data when power is off).
Types of RAM:
Static RAM (SRAM): Faster, used in cache memory, retains data without refreshing, but uses
more power and is more expensive.
Dynamic RAM (DRAM): Slower, cheaper, requires constant refreshing to retain data.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 17/40
SRAM Design & Operation:

Composed of six MOSFETs (Metal Oxide Semiconductor Field Effect Transistors).


Operations include standby, reading, and writing:
Standby: Holds data when idle.
Read: Sense amplifiers detect stored values (1 or 0).
Write: Updates stored values by controlling voltage.

DRAM Design & Operation:

Uses capacitors and MOSFETs to store bits.


Operations involve charge levels:
Presence of charge = 1, absence = 0.
Requires refreshing as capacitor charge depletes.

Secondary Storage

Characteristics:

Not directly accessible by the CPU.


Accessed via I/O channels and intermediate primary storage.
Important attributes: media, capacity, storage devices, and access speed.

Hard Disk Drives (HDD):

Main storage device, capacities range from 160GB to 15TB.


Data stored using magnetic charges (1s and 0s).
Speed depends on rotation rates (5400–7200 rpm) and access time (milliseconds).
Sensitive to dust, fingerprints, and head crashes.

Key HDD Components:

Platters: Stacked surfaces for data storage.


Read/Write Heads: Access data; can cause head crashes if contact occurs.
Tracks and Sectors: Concentric circles and subdivisions for organizing data.
Cylinders: Vertical alignment of tracks across platters.

Partitioning & File Systems:

Partition Types: Primary, extended, and logical drives.


File Systems: FAT (16/32), NTFS, and Linux Ext. formats.

Maintenance & Performance:

Preventive measures include CHKDSK, SCANDISK, disk cleanup, and defragmentation.


Enhancements:
Disk Caching: Temporary high-speed buffer.
RAID (Redundant Arrays of Inexpensive Disks): Improves reliability and performance
through disk striping, mirroring, or parity.

RAID (Redundant Arrays of Inexpensive Disks):

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 18/40
Protects against data loss with redundancy.
Common RAID Levels:
RAID 0: Striping, no redundancy.
RAID 1: Mirroring, data copied to two disks.
RAID 5: Distributed parity for fault tolerance.
RAID 10: Combines striping and mirroring.

Let me know if you want detailed explanations or examples for any of these points!

Secondary Storage
Hard Disk (Cont’)

Redundant Arrays of Inexpensive Disks (RAID)

• RAID 0
– It splits data among two or more disks.
– Provides good performance.
– Lack of data redundancy means there is no
fail over support with this configuration.

CSC 347 37

fail over support with this configuration.


– In the diagram to the right, the odd blocks
are written to disk 0 and the even blocks to
disk 1 such that A1, A2, A3, A4, ... would
be the order of blocks read if read
sequentially from the beginning.
– Used in read only Network File System
(NFS) systems and gaming systems. Lecture 4: Data Storage (Secondary Storage )

Secondary Storage
Hard Disk (Cont’)

Redundant Arrays of Inexpensive Disks (RAID)

• RAID 1
– RAID1 is ‘data mirroring’.
– Two copies of the data are held on
two physical disks, and the data is
always identical.

CSC 347 38

– Twice as many disks are required


to store the same data when
compared to RAID 0.
– Array continues to operate so long

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 19/40
as at least one drive is functioning.

Lecture 4: Data Storage (Secondary Storage )

Secondary Storage
Hard Disk (Cont’)

Redundant Arrays of Inexpensive Disks (RAID)

• RAID 5
– RAID 5 is an ideal
combination of good
performance, good fault
tolerance and high capacity

CSC 347 39

tolerance and high capacity


and storage efficiency.
– An arrangement of parity
and CRC to help rebuilding
drive data in case of disk
failures.
– “Distributed Parity” is the
key word here.

Lecture 4: Data Storage (Secondary Storage )

Secondary Storage
Hard Disk (Cont’)

Redundant Arrays of Inexpensive Disks (RAID)

• RAID 6
– It is seen as the best way to guarantee data
integrity as it uses double parity.
– It has a drawback though of longer write time.

CSC 347 Lecture 4: Data Storage (Secondary Storage ) 40

Secondary Storage
Hard Disk (Cont’)

Redundant Arrays of Inexpensive Disks (RAID)

• RAID 10
– Combines RAID 1 and RAID
0.
– Which means having the
pleasure of both - good

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 20/40
CSC 347 41

pleasure of both - good


performance and good
failover handling.
– Also called ‘Nested RAID’.
– Benefits from the fault
tolerance of RAID 1 and
The Speed of RAID 0

RAID (Redundant Arrays of Inexpensive Disks) Overview

RAID is a data storage virtualization technology that combines multiple physical drives to improve
performance, fault tolerance, or both. Each RAID level offers distinct features tailored to specific use
cases.

RAID 0 (Striping)

Functionality:
Splits data across two or more disks in sequential blocks (e.g., A1, A2, A3).
No redundancy; a failure in any disk results in total data loss.
Advantages:
High performance in read/write operations.
Efficient for read-only systems like Network File Systems (NFS) and gaming.
Disadvantages:
No fault tolerance or data recovery capabilities.
Use Cases:
Gaming systems and temporary data processing.

RAID 1 (Mirroring)

Functionality:
Duplicates data across two physical disks.
Data on one disk is always identical to the other.
Advantages:
High fault tolerance—data remains accessible even if one disk fails.
Simplified recovery.
Disadvantages:
Requires twice the storage capacity (50% efficiency).
Use Cases:
Critical systems requiring high data integrity, such as financial applications.

RAID 5 (Striping with Distributed Parity)

Functionality:
Combines data striping with distributed parity across disks.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 21/40
Parity allows recovery of lost data in case of a single disk failure.
Advantages:
Good balance of performance, fault tolerance, and storage efficiency.
Ideal for systems requiring high read/write speeds and redundancy.
Disadvantages:
Rebuilding a failed disk takes time and impacts performance.
Use Cases:
Enterprise systems, database servers, and file servers.

RAID 6 (Striping with Double Parity)

Functionality:
Extends RAID 5 by adding double parity for enhanced data integrity.
Can withstand two simultaneous disk failures.
Advantages:
Superior fault tolerance compared to RAID 5.
Disadvantages:
Slower write operations due to double parity calculations.
Use Cases:
Systems requiring high fault tolerance, such as archival and backup servers.

RAID 10 (Striping + Mirroring)

Functionality:
Combines RAID 0 and RAID 1 for both speed and redundancy.
Data is mirrored and striped across multiple disks.
Advantages:
High performance from striping.
Fault tolerance from mirroring ensures data availability.
Disadvantages:
Requires a minimum of four disks and higher cost.
Use Cases:
High-performance applications like video editing and database operations.

Let me know if you’d like diagrams or additional explanations for any RAID level!

yes RAID level which one best for what describe with logic

RAID Levels and Their Best Use Cases

Each RAID level has unique strengths and weaknesses, making it suitable for specific scenarios. Here's
an explanation of the best use cases for each level with logical reasoning:

RAID 0: Striping

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 22/40
Best For:
High-performance applications requiring fast read/write speeds.
Temporary or non-critical data storage.
Logic:
Why: RAID 0 splits data across multiple disks without redundancy, maximizing speed.
Drawback: A single disk failure results in complete data loss, making it unsuitable for critical
data.
Use Cases:
Gaming systems for fast data loading.
Video editing where speed is prioritized over fault tolerance.
Temporary storage where data loss is acceptable.

RAID 1: Mirroring

Best For:
Systems requiring high reliability and fault tolerance.
Critical data that cannot afford loss.
Logic:
Why: RAID 1 duplicates data across disks, ensuring data integrity. Even if one disk fails, the
system continues to function.
Drawback: Storage efficiency is only 50% as one disk is used solely for redundancy.
Use Cases:
Financial systems where data integrity is crucial.
Small servers needing high reliability.
Personal or enterprise storage for critical data like medical records.

RAID 5: Striping with Distributed Parity

Best For:
Balanced systems needing performance, fault tolerance, and efficient storage.
Logic:
Why: RAID 5 uses distributed parity to provide redundancy while still utilizing most of the disk
space. It offers good performance and can recover from a single disk failure.
Drawback: Rebuilding a failed disk takes time and temporarily reduces system performance.
Use Cases:
Web servers with high read/write demands.
Database servers where uptime and fault tolerance are essential.
Medium-sized businesses needing efficient redundancy.

RAID 6: Striping with Double Parity

Best For:
Highly critical systems requiring maximum fault tolerance.
Scenarios where multiple simultaneous disk failures are possible.
Logic:

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 23/40
Why: RAID 6 extends RAID 5 by adding double parity, allowing it to withstand two
simultaneous disk failures.
Drawback: Slightly slower write speeds due to the calculation of two parity bits.
Use Cases:
Backup and archival systems requiring extreme reliability.
Enterprise servers storing critical customer or transaction data.
Data centers where downtime is unacceptable.

RAID 10: Striping + Mirroring

Best For:
High-performance systems requiring both speed and fault tolerance.
Logic:
Why: RAID 10 combines the speed of RAID 0 and the redundancy of RAID 1. It mirrors data
for fault tolerance while striping it for speed.
Drawback: Requires a minimum of four disks, making it more expensive than other RAID
levels.
Use Cases:
High-end database servers needing fast access and high availability.
Video production systems requiring speed and reliability.
Large enterprises with critical applications like ERP systems.

Summary Table

RAID
Best For Why Drawbacks
Level
High performance, non-critical
RAID 0 Maximizes speed No fault tolerance
data
RAID 1 Critical data integrity Complete redundancy (mirroring) 50% storage efficiency
Balanced performance & fault Efficient redundancy with good
RAID 5 Slower rebuild times
tolerance performance

Withstands two simultaneous disk


RAID 6 Maximum fault tolerance Slower write speeds
failures
Expensive, needs 4+
RAID 10 Speed + redundancy Combines RAID 0 & RAID 1 benefits
disks

Decision-Making Logic:

Choose RAID 0 for speed-sensitive applications with non-critical data.


Choose RAID 1 for small systems requiring high reliability.
Choose RAID 5 for general-purpose servers balancing performance and fault tolerance.
Choose RAID 6 for critical systems requiring extra data integrity.
Choose RAID 10 for high-performance, high-reliability applications with a bigger budget.

Let me know if you'd like further clarification!

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 24/40
which one better between them

Determining which RAID level is better depends entirely on your use case and priorities. Here’s a
comparative analysis to help you decide:

Comparison of RAID Levels

Criteria RAID 0 RAID 1 RAID 5 RAID 6 RAID 10

✅✅✅ High ✅✅ Good for ✅✅ Good for ✅✅✅ High for


Performance
(Speed) for read/write
✅ Moderate read, slower read, slower
read/write
write write
✅✅ ✅ Can tolerate 1 ✅✅ Can ✅✅✅
Fault
Tolerance
❌ None Redundant (1
disk failure
tolerate 2 Redundant
disk) failures (multiple disks)

✅✅ ~66%-90%
Storage
Efficiency
✅✅✅ 100% ❌ 50% (depends on # ✅✅ ~50%-80% ❌ 50%
disks)

Rebuild Time
❌ Not ✅ Minimal ❌ Long ❌❌ Very long ✅ Minimal
applicable

✅ Low (2 ✅ Low to ✅✅ Medium ❌ High (4+ ❌❌ High (4+


Cost Medium (2
disks) (3+ disks) disks) disks)
disks)

Which is Better?

RAID 0 (Striping)

Better for: Maximum speed and non-critical data.


Why not better: Zero fault tolerance; a single failure means complete data loss.
Verdict: Use only for performance-critical, disposable data (e.g., gaming, temporary files).

RAID 1 (Mirroring)

Better for: Small-scale systems requiring high reliability.


Why not better: Doubles disk cost; you lose half of the storage capacity.
Verdict: Great for critical personal or small business data but not scalable for large systems.

RAID 5 (Distributed Parity)

Better for: General-purpose servers balancing performance, storage, and fault tolerance.
Why not better: Rebuilding after disk failure is time-consuming and performance drops during
recovery.
Verdict: Best for medium-scale businesses or systems with high uptime requirements.

RAID 6 (Double Parity)

Better for: Maximum fault tolerance where data integrity is critical.


Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 25/40
Why not better: Slower writes and higher cost due to the need for extra disks.
Verdict: Best for large-scale, mission-critical systems (e.g., data centers, backups).

RAID 10 (Striping + Mirroring)

Better for: High-performance and high-reliability systems.


Why not better: Expensive; requires at least four disks, and only 50% of storage is usable.
Verdict: Best for enterprises needing both speed and fault tolerance.

Overall Recommendation

Choose RAID 10 if you can afford the cost and need both speed and fault tolerance (best overall
performance and reliability).
Choose RAID 5 or RAID 6 if you want a balance between fault tolerance, cost, and storage
efficiency.
Avoid RAID 0 unless speed is the only priority, and RAID 1 is ideal for small setups.

Let me know your specific needs (e.g., budget, performance, or fault tolerance), and I can refine the
recommendation further!

sram vs dram all details in table

Here’s a detailed comparison between SRAM (Static Random Access Memory) and DRAM (Dynamic
Random Access Memory) presented in a table format:

Feature SRAM (Static RAM) DRAM (Dynamic RAM)


Memory that uses flip-flops (latches) to Memory that stores data using capacitors,
Definition
store data statically, without refreshing. requiring periodic refreshing to retain data.

Speed
✅ Very fast (access time is in ❌ Slower compared to SRAM (access time is
nanoseconds). longer than SRAM but still in nanoseconds).
Power ✅ Low power in idle mode because no ❌ Higher power consumption due to
Consumption refreshing is required. continuous refreshing of capacitors.
Storage Stores data in flip-flops using 6 transistors Stores data as electric charges in capacitors (1
Technique per bit. transistor + 1 capacitor per bit).

Density (Size)
❌ Lower density; requires more space for ✅ Higher density; more compact design for
a given storage capacity. larger storage capacities.

Cost
❌ Expensive due to more complex ✅ Cheaper because it uses fewer transistors
circuitry (uses more transistors). per bit.
Volatility Volatile (loses data when the power is off). Volatile (loses data when the power is off).

Complexity
✅ Simpler to use since no refreshing ❌ More complex due to the need for refresh
circuitry is needed. circuitry.

Data Stability
✅ Highly stable; does not require periodic ❌ Less stable; needs to be refreshed
refreshing. periodically to prevent data loss.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 26/40
Feature SRAM (Static RAM) DRAM (Dynamic RAM)
Used in cache memory (CPU cache: L1, L2, Used in main memory (RAM) of computers
Applications
L3), high-speed registers, and buffers. and devices.
Access Time Faster access time (~1-10 ns). Slower access time (~50-100 ns).
Highly scalable, enabling larger memory
Scalability Less scalable due to larger size per bit.
modules.
Generates more heat due to frequent refresh
Heat Generation Generates less heat due to lower activity.
cycles.

Reliability ✅ More reliable and less prone to errors. ❌ Less reliable; susceptible to charge leakage
over time.
Refresh Requires periodic refresh (every few
No refresh needed.
Requirement milliseconds).
Memory Cells
6 transistors per bit. 1 transistor and 1 capacitor per bit.
per Bit

Summary of Use Cases

SRAM:
Best for small, high-speed memory applications like CPU caches and registers.
Suitable for performance-critical tasks where speed outweighs cost.
DRAM:
Ideal for large, cost-effective memory solutions like main system memory (RAM).
Suitable for devices requiring high memory capacities, such as desktops, laptops, and servers.

If you have any additional questions or need further details, let me know!

which one is better sram or dram?

The choice between SRAM and DRAM depends on the application and requirements, as each has
strengths and weaknesses. Here's a detailed comparison to help decide which is better in different
contexts:

1. SRAM (Static RAM)

Advantages:
✅ Faster Speed: SRAM is much faster than DRAM, making it ideal for high-speed operations
(e.g., CPU cache).
✅ No Refresh Required: Data remains stable as long as power is supplied, eliminating the
need for periodic refreshing.
✅ Low Latency: Offers extremely low access time, which is critical for performance-sensitive
tasks.
✅ High Reliability: More reliable due to the absence of capacitors, which can leak charge.
Disadvantages:

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 27/40
❌ Cost: SRAM is expensive due to the higher transistor count (6 transistors per bit).
❌ Lower Density: Occupies more physical space, limiting its scalability for large memory
capacities.
❌ Application Limitations: Not practical for large-scale storage like main memory.
Best Use Cases:
CPU caches (L1, L2, L3).
High-speed registers.
Small buffers in networking and graphics systems.

2. DRAM (Dynamic RAM)

Advantages:
✅ Higher Density: DRAM uses fewer components (1 transistor + 1 capacitor per bit), making
it more compact and allowing larger memory capacities.
✅ Cost-Effective: Cheaper to manufacture, making it suitable for large-scale memory
solutions.
✅ Widely Used: DRAM is the standard for main memory in most devices due to its balance of
cost, speed, and capacity.
Disadvantages:
❌ Slower Speed: DRAM is slower than SRAM due to the need for periodic refreshing and
longer access times.
❌ Power Consumption: Requires more power because of the refresh cycles.
❌ Data Stability: Less stable since it relies on capacitor charge, which can leak over time.
Best Use Cases:
Main memory (RAM) in computers, laptops, and servers.
Graphics memory (VRAM) for GPUs.
Applications requiring large memory capacities at a lower cost.

Which One is Better?

Choose SRAM if:


Speed and reliability are critical (e.g., CPU cache, high-performance computing).
Cost is not a significant concern.
Choose DRAM if:
Large memory capacity is required (e.g., system memory, storage applications).
Cost-effectiveness and scalability are more important than speed.

Conclusion

Neither SRAM nor DRAM is universally "better" — the decision depends on the use case:

SRAM is better for performance-critical, small-scale applications.


DRAM is better for high-capacity, cost-effective applications.

If you’re designing a system, combining both (e.g., SRAM for cache, DRAM for main memory) is the best
way to balance performance and cost.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 28/40
why sram is not use as main memory?

SRAM is not used as main memory because of several practical and economic limitations compared to
DRAM, which is better suited for this purpose. Below are the reasons why SRAM is not used as the main
memory:

1. Cost

Reason: SRAM requires 6 transistors per memory cell, making it significantly more expensive to
manufacture than DRAM, which uses only 1 transistor and 1 capacitor per memory cell.
Impact: The high manufacturing cost makes SRAM impractical for large-scale use, such as main
memory, where high capacities are required.

2. Density

Reason: Due to its design (6 transistors per cell), SRAM takes up more physical space on a chip
compared to DRAM.
Impact: SRAM provides lower memory density, meaning less memory can be packed into the
same area. For main memory, where large capacities (e.g., several gigabytes or terabytes) are
required, DRAM is much more space-efficient.

3. Scalability

Reason: SRAM's complex structure makes it challenging to scale down to smaller sizes for modern
high-capacity memory needs.
Impact: DRAM is more scalable, enabling manufacturers to produce higher-capacity memory chips
to meet growing demands.

4. Power Consumption

Reason: SRAM consumes more power per bit of data because it continuously draws power to
maintain the state of its 6 transistors.
Impact: For large memory sizes, such as main memory, the power consumption of SRAM would be
unreasonably high, especially in energy-sensitive devices like laptops and mobile phones.

5. Refresh Requirements

Advantage of DRAM: Although DRAM requires periodic refreshing, its simpler design (capacitors)
offsets this by being more power-efficient for high-capacity memory.
Impact: For main memory, the refresh requirement of DRAM is an acceptable trade-off compared
to the high power usage of SRAM.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 29/40
6. Application Suitability

SRAM Use Case: SRAM is optimized for speed and is used in smaller capacities, such as:
CPU caches (L1, L2, L3): Where high-speed access is critical.
Buffers and Registers: For temporary, high-speed data storage.
DRAM Use Case: DRAM is slower but provides high capacity and is ideal for main memory, where
the primary requirement is large storage at an affordable cost.

Summary

Feature SRAM DRAM


Cost Expensive Affordable
Density Low (6 transistors per cell) High (1 transistor + 1 capacitor per cell)
Speed Faster Slower

Power Consumption Higher Lower (for large capacities)


Use Case CPU cache, registers, buffers Main memory, large-capacity storage

Conclusion:
While SRAM is faster and more reliable, its high cost, low density, and high power consumption make it
unsuitable for main memory. DRAM, with its cost-effectiveness, scalability, and high density, is the
preferred choice for main memory in modern computing systems.

Internal Hard Disk vs External Hard Disk in table ,, and ,,Internal &External componenets of Hard
Disk

Internal Hard Disk vs External Hard Disk: Comparative Table

Feature Internal Hard Disk External Hard Disk


A fixed storage device installed inside the A portable storage device connected externally
Definition
computer. via USB or other interfaces.
Portability Not portable. Highly portable.
Installation Requires installation inside the system. Plug-and-play; no installation required.
Faster due to direct connection to the Slower due to USB or external interface
Speed
motherboard (SATA or NVMe). bottlenecks.

Size Larger, built to fit inside desktops or laptops. Compact and portable in design.
Capacity Typically higher (up to 20 TB or more). Moderate to high (up to 18 TB or more).
Cost Cost-effective for the same storage capacity. More expensive due to portability and casing.
Power Requires external power or draws power via
Powered by the computer’s power supply.
Source USB.
Ideal for backups, media storage, or transferring
Use Case Ideal for primary storage or system drives.
files between devices.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 30/40
Feature Internal Hard Disk External Hard Disk
Data More prone to theft or physical damage due to
Secure, as it remains inside the system.
Security portability.
Exposed to potential damage from drops or
Durability Protected within the system case.
mishandling.

Internal and External Components of a Hard Disk

Component Internal Components External Components


Magnetic disks that store data as magnetic Not visible externally; enclosed within the
Platters
charges. casing.
Rotates the platters at high speeds (e.g.,
Spindle Not accessible; inside the drive.
5400 or 7200 RPM).
Read/Write Float on a cushion of air to read/write data
Internal mechanism; not visible.
Heads to/from the platters.

Moves the read/write heads across the


Actuator Arm Internal mechanism; controlled electronically.
platters.
Actuator
Drives the movement of the actuator arm. Enclosed inside the drive.
Motor
Controller A circuit board that controls the hard disk’s Integrated within the casing, handles external
Board operations and data flow. interfaces (e.g., USB).
High-speed SRAM for temporarily storing
Cache (Buffer) Hidden inside; part of the internal circuitry.
data.

Not applicable; housed inside the computer Durable external shell for protection and
Casing
system. portability.
Connects to the motherboard via SATA, USB, Thunderbolt, or eSATA interface for
Interface
PATA, or NVMe. connecting to external devices.
Power Connects to the system’s power supply unit
May use USB power or an external adapter.
Connector (PSU).
Commonly included to indicate activity or
LED Indicators Not common for internal hard drives.
power status.

Key Differences in Components

Internal HDDs are optimized for speed, storage capacity, and integration with the system, while
external HDDs prioritize portability, durability, and user-friendly connectivity.

Hard Disk (Cont’)


Components of a Hard Drive

 Platters are multiple hard metal surfaces that are stacked one on top of
another contained in the hard drive
 Read/Write Heads write and read 1s and 0s to and from hard drive surface
o A Head Crash occurs when a read/write head touches the hard drive platter
 Track is a concentric circle on a hard drive platter

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 31/40
CSC 347 22
 Sectors – Each track is divided into sectors which contains 512 bytes of data
o ZBR (Zone Bit Recording) efficiently uses the hard drive surface by placing
more sectors on the outer tracks than on the inner tracks
o Interleaving is a method of numbering sectors for the most efficient transfer of
data between hard drive and controller. Hard drives normally use 1:1 interleave
 Cylinder runs through each track of a stack of platters
o Cylinders are necessary to differentiate files stored on same track and sector of
different platters
 When a hard disk is formatted, tracks, sectors, and cylinders are assigned

Components of a Hard Drive

Component Description
Platters - Hard metal surfaces that store data.
- Multiple platters are stacked vertically within the hard drive.
- Data is stored magnetically on both sides of each platter.
Read/Write
- Tiny components that read data from or write data to the platters.
Heads
- They float just above the platter surface on a cushion of air.

- Head Crash: Occurs when the read/write head touches the platter, potentially damaging it
and causing data loss.
Tracks - Concentric circles on the surface of a platter.
- Tracks are like circular paths where data is stored.
Sectors - Each track is divided into smaller sections called sectors.
- A sector usually contains 512 bytes of data.
- ZBR (Zone Bit Recording): Optimizes data storage by placing more sectors on the outer
tracks than on the inner tracks.
- Interleaving: A method of numbering sectors to improve the efficiency of data transfer
between the drive and controller.
- Modern drives typically use a 1:1 interleave.
Cylinders - A vertical alignment of tracks across multiple platters.
- Cylinders are used to distinguish files stored on the same track and sector across different
platters.

Formatting - When a hard disk is formatted, the following are created:


- Tracks (concentric circles on platters).
- Sectors (subdivisions of tracks).
- Cylinders (stacked tracks across all platters).

Summary

Platters provide the physical surface for data storage.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 32/40
Read/Write Heads perform the actual data transfer.
Tracks, Sectors, and Cylinders organize data spatially.
ZBR and Interleaving ensure efficient data usage and transfer.
Proper formatting sets up the hard disk's structure for storing and retrieving data.

internal vs external components

Internal vs External Components of a Hard Disk

Component Type Internal Components External Components


- Multiple metal or glass disks that are - Not applicable; platters are internal
Platters
stacked in the hard disk drive. components of the drive.
- Devices that read and write data
- Not applicable; read/write heads are
Read/Write Heads from the platters. They move across
internal components.
the disk surfaces.
- A mechanical arm that moves the
- Not applicable; actuator arm is
Actuator Arm read/write heads across the disk
internal.
platters.
- A motor that rotates the platters at - Not applicable; spindle motor is
Spindle Motor
high speed (measured in RPM). internal.
- External hard disks usually have a
- The main circuit board that manages
simple USB interface or similar
Controller Circuit Board the communication between the hard
controller, but the main controller is still
disk and the computer.
internal.
- External hard disks have their own
- Internal connection to the
Power Connector power connector, often through a USB
computer's power supply.
or external power cable.
- The internal connection to the - External hard disks use USB, FireWire,
Data Connector (SATA/ATA) motherboard via SATA (Serial ATA) or or Thunderbolt interfaces to connect to
older interfaces like IDE. external devices.
- A small amount of fast memory used - External hard disks may have a small
Cache (Buffer Memory) to store frequently accessed data cache, but it is generally similar to
temporarily. internal disks.
- The external enclosure houses the
- The protective casing that houses
internal hard drive and connects it to
Enclosure the platters, read/write heads, and
external power/data sources (USB,
other internal components.
eSATA).

- External hard drives may have built-in


- Some internal hard drives may have
cooling fans or passive cooling to
Cooling System heat dissipation mechanisms to cool
prevent overheating during prolonged
the drive, such as heat sinks.
use.
- External hard disks rely on ports such
USB/FireWire/Thunderbolt - Not part of the internal drive but
as USB, FireWire, or Thunderbolt for
Port necessary for external connection.
connection to external devices.

Key Differences:

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 33/40
Internal Components: These are the essential hardware parts of the hard drive that operate
within the computer, such as platters, read/write heads, and actuator arms. They function to store
and retrieve data from the disk.
External Components: These refer to the parts that make the hard drive portable and usable
outside the computer. The primary external components are the enclosure, power connector, and
data interface (USB, Thunderbolt, etc.) that allow the drive to connect to external devices.

While internal components focus on data storage and mechanical operations, external components
focus on portability and connectivity.

Secondary Storage
Hard Disk (Cont’)

• Preventive Maintenance will prolong the life of HDD


– CHKDSK is a program that locates clusters disassociated from
data files
• Lost Clusters are sectors on a disk that the file allocation

Preventive Maintenance for Hard Drives

CSC 347 33
• Lost Clusters are sectors on a disk that the file allocation
table cannot associate with any file or directory

– SCANDISK is a software program used to detect and repair


lost clusters
– Disk Cleanup utility helps free up hard drive space by
emptying the Recycle Bin, removing temporary files, etc.
– Defragmentation is the process of placing files in contiguous
sectors. This allows for faster hard disk access of files

Preventive Maintenance for Hard Drives

Maintaining a hard drive (HDD) can significantly prolong its lifespan and improve its performance. Below
are some common preventive maintenance tasks and their purposes:

Preventive
Description Purpose
Maintenance Task
A built-in utility that checks the file system for - Detects errors in the file system.
CHKDSK (Check Disk) errors and fixes them. It locates and attempts to - Repairs issues with file allocation
repair any bad sectors or clusters. and disk consistency.
- Prevents wasted space and
Clusters are small units of storage, and lost
improves file access.
Lost Clusters clusters occur when the file allocation table (FAT)
- Helps in recovering data that was
can't associate certain sectors with a file.
once associated with a file.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 34/40
Preventive
Description Purpose
Maintenance Task
A program that scans and repairs lost clusters or - Detects and repairs bad sectors.
SCANDISK disk errors. Similar to CHKDSK but provides more - Repairs lost clusters and restores
options for repairs. files to the system.
- Frees up disk space.
A utility that removes temporary files, system files, - Improves performance by
Disk Cleanup
and other unnecessary data from the hard disk. eliminating junk files and reducing
clutter on the disk.
- Optimizes file storage and access
The process of rearranging fragmented data so speed.
Defragmentation that files are stored in contiguous sectors on the - Reduces the time it takes to read
disk. or write files by grouping data
together.

Additional Details:

CHKDSK: It helps prevent data corruption and ensures that all sectors on the disk are functioning
correctly. If sectors are marked as bad, they won’t be used, preventing further data corruption.
Lost Clusters: They occur when sectors on a disk are marked as free, but the file allocation table
can't identify their association with any file. Using CHKDSK or SCANDISK helps to identify and
recover these lost clusters.
SCANDISK: More advanced than CHKDSK, SCANDISK can also check for surface errors, scan the
disk for logical errors, and perform fixes that might require restarting the computer.
Disk Cleanup: This is particularly useful for clearing up space by removing files such as old
temporary files, system logs, and files that have been placed in the Recycle Bin but haven’t been
deleted yet.
Defragmentation: Over time, files on a hard drive can become fragmented (split across various
physical locations on the disk). Defragmentation helps reduce the time it takes for the hard disk to
access these files by organizing them in contiguous blocks.

By performing these tasks regularly, you can ensure your hard drive operates at peak performance and
reduce the likelihood of data loss or hard drive failure.

Performance Enhancements
• Disk caching
– Provides a temporary high- speed holding area
between a secondary storage device and the CPU
Improves performance by anticipating data
needs and reducing time to access
data from secondary storage

CSC 347 34

• Redundant Arrays of Inexpensive Disks (RAID)


– Several inexpensive hard-disk drives are connected

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 35/40
together
Improves performance by providing expanded
storage, fast access, and high reliability

• File compression and decompression


 Files compressed before storing and then
decompressed before being used again
Improves performance through efficient storage

Performance Enhancements for Hard Drives

Here are three key performance enhancement techniques used with hard drives to improve speed,
reliability, and efficiency:

Performance
Description Purpose
Enhancement
- Speeds up access to
frequently used data.
A temporary high-speed holding area between the
- Reduces the time it takes to
secondary storage (HDD) and the CPU. Disk cache
Disk Caching access data from the hard
stores frequently accessed data to reduce access
drive.
times.
- Optimizes data read/write by
anticipating CPU needs.

- Increases storage capacity.


- Provides faster data access
A technology where multiple inexpensive hard drives
Redundant Arrays of (depending on the RAID level).
are connected to improve data storage, speed, and
Inexpensive Disks - Enhances data redundancy
reliability. Various RAID levels offer different benefits
(RAID) and fault tolerance, ensuring
(e.g., RAID 0, RAID 1, RAID 5, etc.).
data safety in case of drive
failure.
- Saves storage space.
- Reduces the amount of data
being read from disk, leading
A method of reducing the size of files by using
File Compression and to faster access.
compression algorithms before storing them and
Decompression - Improves system
decompressing them when they are accessed.
performance by utilizing less
space and reducing the load
on storage devices.

More Details:

Disk Caching: A portion of the RAM is used as cache to store data frequently accessed by the CPU,
significantly reducing the time it takes to read and write data to the hard disk. When data is
requested, the system first checks if it is in the cache, providing much faster access.
RAID (Redundant Arrays of Inexpensive Disks): By connecting multiple hard drives together,
RAID increases the overall performance, capacity, and reliability. The array distributes data across
several disks, and redundancy (in some RAID levels) ensures data protection against drive failure.
RAID setups like RAID 0 focus on performance, while RAID 1 offers redundancy, and RAID 5 offers a
good balance of both.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 36/40
File Compression and Decompression: Compression reduces the file size by eliminating
redundancies in the data, allowing for more efficient storage. When the file is needed, it is
decompressed. This method can significantly improve storage efficiency and the time it takes to
access data, as less data needs to be read from disk.

By utilizing these techniques, you can enhance the overall performance of the hard disk and the
computer system, reducing latency and increasing the reliability and speed of data access.

Components on a Motherboard

Chipset

• Chipset refers to a group of integrated circuits or chips that are designed


to work together
• A chipset controls the system bus structures, and facilitates the
movement of data and instructions between the processor, cache
memory, and internal and external peripheral devices
• Two main chips in chipset are: memory-control-hub (Northbridge), and
I/O-control-hub (Southbridge)

CSC 347 18
I/O-control-hub (Southbridge)
– Northbridge links the CPU to very high-speed devices, especially main
memory and graphics controllers
– Southbridge connects to lower-speed peripheral buses (such as PCI). In many
modern chipsets, the southbridge actually contains some on-chip integrated
peripherals, such as Ethernet, USB, and audio devices

• Chipset controls the flow of bits that travel between the CPU, system
memory, and the motherboard bus
• Efficient data transfers, fast expansion bus support, and advanced power
management, and many more are the features of chipset

Components on a Motherboard: Chipset

The chipset on a motherboard plays a crucial role in managing communication between the CPU,
memory, and peripheral devices. Below is an organized overview of the chipset's components and
functions:

Component Description Key Features


- Controls system bus structures.
A group of integrated circuits designed to work
- Facilitates communication
Chipset together to control the system bus and manage
between CPU, cache, memory, and
data flow between key components.
peripherals.

Northbridge Links the CPU to high-speed devices like the main - Handles data transfer between
(Memory-Control memory (RAM) and graphics controllers. CPU and memory.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 37/40
Component Description Key Features
Hub) - Supports high-speed data
transfers for GPUs.
- Contains on-chip integrated
Southbridge (I/O- Connects to lower-speed devices like PCI, USB, peripherals.
Control Hub) Ethernet, and audio controllers. - Manages input/output (I/O)
operations efficiently.

Functions of the Chipset

1. System Communication:
The chipset ensures efficient data transfer between the CPU, memory, and other components
of the motherboard.
Manages communication between high-speed and low-speed buses.
2. Efficient Data Transfer:
Enhances system performance by optimizing the flow of data.
Supports advanced technologies like PCIe (Peripheral Component Interconnect Express) for
fast expansion bus support.
3. Power Management:
Offers advanced power management features, ensuring energy efficiency during operation.
4. Peripheral Integration:
The Southbridge often integrates peripherals like USB, Ethernet, and audio devices directly
onto the chipset, reducing the need for additional external chips.
5. Expansion Bus Support:
Provides compatibility with a wide range of expansion buses, allowing the connection of
additional devices such as network cards, sound cards, and storage controllers.

Differences Between Northbridge and Southbridge

Aspect Northbridge Southbridge


Links CPU to high-speed devices
Primary Function Connects to lower-speed peripheral buses.
(RAM, GPU).
Speed Handles high-speed data transfers. Manages lower-speed operations.
USB, Ethernet, audio devices, PCI, and I/O
Components Managed Memory, graphics controllers.
devices.
Integration in Modern Often integrated into the CPU for Still exists as a separate component in
Systems efficiency. modern chipsets.

In summary, the chipset is essential for coordinating all the components on a motherboard, ensuring
smooth and efficient operation of the computer system.

Fetch-Decode-Execute operation

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 38/40
The Fetch-Decode-Execute Cycle is the fundamental process by which a computer's CPU operates. This
cycle is repeated continuously to execute instructions in a program. Below is a detailed explanation of
each step:

Steps in the Fetch-Decode-Execute Cycle

Step Description
The CPU retrieves (fetches) an instruction from the main memory (RAM) based on the Program
1. Fetch
Counter (PC).
- Program Counter (PC): Holds the memory address of the next instruction to be executed.
- The instruction is loaded into the Instruction Register (IR) for processing.

2. Decode The fetched instruction is decoded by the Control Unit (CU) of the CPU.
- The CU interprets the binary instruction and determines the operation to be performed.
- If required, the instruction's operands (data or memory addresses) are identified during this stage.
3.
The CPU performs the operation specified by the instruction.
Execute
- This may involve arithmetic/logic operations, data transfer, or control flow changes.
- The result of the operation may be stored back in memory or in a CPU register.

Detailed Explanation of Each Step

1. Fetch

The CPU fetches the instruction from the memory location pointed to by the Program Counter
(PC).
After fetching, the Program Counter is incremented to point to the next instruction.
The fetched instruction is stored in the Instruction Register (IR).

2. Decode

The Control Unit reads the instruction from the Instruction Register.
It breaks the instruction into parts:
Opcode: Specifies the operation (e.g., add, subtract, load, store).
Operands: Specifies the data or memory locations involved.
Based on the opcode, the control signals are generated to execute the instruction.

3. Execute

The operation defined by the instruction is carried out:


Arithmetic/Logical Operations: Performed in the Arithmetic Logic Unit (ALU).
Data Transfer: Moving data between registers, memory, or I/O devices.
Control Operations: Changing the flow of execution, such as jumps or branches.
The result is stored in a register or memory for further use.

Diagram of the Fetch-Decode-Execute Cycle


Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 39/40
sql

+----------------+ +---------------+ +------------------+


| Fetch | -----> | Decode | -----> | Execute |
| (Retrieve the | | (Interpret | | (Perform the |
| instruction from| | the instruction)| | operation) |
| memory) | +---------------+ +------------------+
+----------------+

Key Components Involved

1. Program Counter (PC): Tracks the address of the next instruction.


2. Instruction Register (IR): Holds the current instruction being executed.
3. Control Unit (CU): Decodes instructions and generates control signals.
4. Arithmetic Logic Unit (ALU): Executes arithmetic and logic operations.
5. Registers: Temporarily hold data for quick access during execution.
6. Memory (RAM): Stores the program and data.

Example

For an instruction like `ADD R1, R2, R3`:

1. Fetch: Retrieve the instruction `ADD R1, R2, R3` from memory.
2. Decode: Identify the operation (`ADD`) and the operands (`R1`, `R2`, `R3`).
3. Execute: Add the contents of registers `R2` and `R3`, and store the result in `R1`.

This process enables the CPU to carry out instructions systematically and efficiently, forming the
backbone of computer operation.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 40/40

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy