Chatgpt To PDF HTML To PDF Api: Printed Using, Powered by Pdfcrowd - 1/40
Chatgpt To PDF HTML To PDF Api: Printed Using, Powered by Pdfcrowd - 1/40
Data Storage
CSC 347 3
– 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
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:
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.
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.
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.
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.
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:
Primary Storage
o Random Access Memory (RAM)
Secondary Storage
CSC 347 7
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 4/40
Primary Storage
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
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
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
SRAM cell
Primary Storage
SRAM Design
Memory
CSC 347 11
Figure2. A six-transistor CMOS
SRAM cell
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 6/40
10
10
Q=1 Q=0
Primary Storage
SRAM Operation
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
SRAM cell
SRAM cell
CSC 347 15
Figure2. A six-transistor CMOS
SRAM cell
Primary Storage
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 8/40
DRAM Operation
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
Primary Storage
DRAM Read / Write
Read Operation:
CSC 347 17
The read out from the cell discharges the capacitor,
which must be stored to complete the operation
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
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:
SRAM Details:
Design:
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:
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.
Secondary Storage
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
Secondary Storage
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
Secondary Storage
Hard Disk (Cont’)
CSC 347 20
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
Secondary Storage
Hard Disk (Cont’)
CSC 347 23
Secondary Storage
Hard Disk (Cont’)
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 13/40
Secondary Storage
Hard Disk (Cont’)
CSC 347 25
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.
3.
Secondary Storage
Hard Disk (Cont’)
How a Hard Disk Work? (Cont’)
4. 5.
6.
Secondary Storage
Hard Disk (Cont’)
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
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
Secondary Storage
Hard Disk (Cont’)
Hard-drive Partitioning (Cont’)
CSC 347 31
Secondary Storage
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 15/40
Hard Disk (Cont’)
Hard-drive Partitioning (Cont’)
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
Secondary Storage
Hard Disk (Cont’)
CSC 347 33
• Lost Clusters are sectors on a disk that the file allocation
table cannot associate with any file or directory
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
Secondary Storage
Hard Disk (Cont’)
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),
Primary Storage
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 17/40
SRAM Design & Operation:
Secondary Storage
Characteristics:
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’)
• 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
Secondary Storage
Hard Disk (Cont’)
• 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
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 19/40
as at least one drive is functioning.
Secondary Storage
Hard Disk (Cont’)
• RAID 5
– RAID 5 is an ideal
combination of good
performance, good fault
tolerance and high capacity
CSC 347 39
Secondary Storage
Hard Disk (Cont’)
• 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.
Secondary Storage
Hard Disk (Cont’)
• 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
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.
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.
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.
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
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.
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.
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.
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
Decision-Making Logic:
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:
✅✅ ~66%-90%
Storage
Efficiency
✅✅✅ 100% ❌ 50% (depends on # ✅✅ ~50%-80% ❌ 50%
disks)
Rebuild Time
❌ Not ✅ Minimal ❌ Long ❌❌ Very long ✅ Minimal
applicable
Which is Better?
RAID 0 (Striping)
RAID 1 (Mirroring)
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.
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!
Here’s a detailed comparison between SRAM (Static Random Access Memory) and DRAM (Dynamic
Random Access Memory) presented in a table format:
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
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!
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:
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.
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.
Conclusion
Neither SRAM nor DRAM is universally "better" — the decision depends on the use case:
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
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
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.
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.
Internal HDDs are optimized for speed, storage capacity, and integration with the system, while
external HDDs prioritize portability, durability, and user-friendly connectivity.
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
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.
Summary
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.
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’)
CSC 347 33
• Lost Clusters are sectors on a disk that the file allocation
table cannot associate with any file or directory
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
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
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.
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
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
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:
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.
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.
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:
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.
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
Example
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