0% found this document useful (0 votes)
11 views

Memory-Hierarchy-1

Uploaded by

pras4nna2
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)
11 views

Memory-Hierarchy-1

Uploaded by

pras4nna2
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/ 36

Memory :

• Memory, in the context of computing, refers to the


electronic components and systems that store data and
instructions for the computer to process. It plays a crucial
role in computer systems by providing a temporary or
permanent storage location for various types of
information that the computer needs to operate and
perform tasks. Memory is used to store both program
code (instructions) and data that the programs
manipulate. There are several types of memory in a
computer system:
Register:

• Location: Inside the CPU.


• Speed: Fastest.
• Capacity: Smallest (in bytes or kilobytes).
• Cost: Highest per bit.
• Purpose: Stores data that the CPU is currently
processing. Registers are used for immediate operations
and are directly accessible by the CPU's control unit.
Cache Memory:

• Location: Close to the CPU, often built into the processor


chip.
• Speed: Very fast (slightly slower than registers).
• Capacity: Larger than registers but still relatively small
(kilobytes to megabytes).
• Cost: High per bit.
• Purpose: Stores frequently accessed data and
instructions to speed up access. Cache memory reduces
the time the CPU needs to fetch data from the main
memory.
Cache Memory:

Levels:
• L1 Cache: The smallest and fastest, closest to the CPU
cores.
• L2 Cache: Larger and slightly slower, may be shared
among cores.
• L3 Cache: Even larger and slower, shared by all cores in
multi-core processors.
Buffer

• A buffer, in the context of computing and technology,


refers to a temporary storage area that holds data while
it's being transferred from one location to another or while
it's being processed.
• An example of buffer memory is the print spooler in a
computer. When you send a document to a printer, the
data is stored in a buffer (spooler) before it is printed. This
allows the computer to continue processing other tasks
while the printer, which may be slower, gradually prints
the document from the buffer.
Main Memory (RAM):

• Location: Typically located on the motherboard.


• Speed: Slower than cache memory.
• Capacity: Larger (gigabytes).
• Cost: Moderate per bit.
• Purpose: Stores data and instructions that are currently
in use or may be used soon. RAM provides a balance
between speed and capacity but is volatile, meaning data
is lost when the power is turned off.
PRIMARY MEMORY(Main Memory)

• Primary memory, often referred to as main memory or


RAM (Random Access Memory), is a volatile type of
memory that provides fast access to data and instructions
needed by the CPU.
• It is used to store the currently executing programs, data
that is being processed, and intermediate results.
• Data in primary memory can be read from and written to
quickly, making it essential for the computer's active
operations.
• However, primary memory loses its content when the
computer is powered off.
• Primary memory has three types.
RAM

• RAM stands for "Random Access Memory," and it is a


type of primary memory used in computer systems to
temporarily store data and instructions that the CPU
(central processing unit) is actively using. RAM is a
volatile memory, meaning its contents are lost when the
computer is powered off or restarted. There are two types
of RAM:
SRAM(static random access memory)
• Architecture: SRAM uses a flip-flop circuit as the memory cell, which
consists of several transistors. These transistors maintain their state as
long as power is supplied, hence the term "static." Each cell typically
stores a single bit of data.
• Speed: SRAM is faster than DRAM because of its simple architecture. It
has lower access times and can operate at higher clock frequencies.
• Stability: Since SRAM cells hold their data as long as power is applied,
they don't require frequent refreshing like DRAM cells. This makes SRAM
more suitable for caches and other applications where speed is critical.
• Complexity and Size: SRAM cells are more complex and require more
transistors per cell compared to DRAM cells. This complexity makes
SRAM more expensive to manufacture and limits its capacity per chip.
• Usage: SRAM is often used in cache memory, as it provides faster access
to frequently used data and instructions. It's also used in other
applications that require low-latency and high-speed access, such as
networking equipment and high-performance computing.
DRAM(Dynamic Random Access Memory)
• Architecture: DRAM uses a capacitor and a transistor as the memory cell.
The charge stored in the capacitor represents the data. However, due to
the leakage of charge over time, DRAM cells need to be refreshed
periodically, which is why it's called "dynamic."
• Speed: DRAM is slower compared to SRAM due to its more complex
refresh requirements and additional overhead for reading and writing data.
• Refresh: As mentioned, DRAM requires regular refreshing of its memory
cells to prevent data loss. This refresh process introduces some access
delays.
• Size and Capacity: DRAM cells are simpler and smaller, allowing for
higher memory densities on a single chip. This makes DRAM more
suitable for providing larger amounts of memory.
• Usage: DRAM is commonly used as main memory in computers, laptops,
and other devices. Its larger capacity compensates for its slower speed
compared to SRAM, making it suitable for storing the data and programs
that a CPU actively uses.
ROM
• ROM stands for "Read-Only Memory." It's a type of computer
memory that stores data that cannot be easily modified or erased by
normal computer processes. Unlike RAM (Random Access
Memory), where data can be read from and written to, ROM holds
information that is "burned" or programmed into it during
manufacturing and remains unchanged throughout the life of the
device. Here's what you need to know about ROM:
• Permanent Storage: ROM contains data that is meant to be
permanent and not altered by the computer's operations. It holds
essential instructions that the computer needs to start up and
perform basic functions.

• Non-Volatile: Just like secondary storage devices (hard drives,


SSDs), ROM is non-volatile, meaning it retains its data even when
Types of ROM:
• PROM (Programmable Read-Only Memory):

PROM is a type of ROM that can be programmed by the user after purchase.
It's initially blank and can be "burned" with data using a PROM programmer.
Once programmed, the data is permanent and cannot be changed.
Used for applications where fixed data or instructions need to be stored but may need
to be programmed after manufacturing.
EPROM (Erasable Programmable Read-Only Memory):

EPROM can be erased and reprogrammed using ultraviolet (UV) light.


It has a transparent window on its package that allows UV light to penetrate and erase
the memory cells.
Requires a special UV eraser to reset the memory.
Used for applications where the data may need to be updated, such as
firmware(Firmware is a type of software that is permanently programmed into a
hardware device's memory.) updates.
• EEPROM (Electrically Erasable Programmable Read-Only Memory):

• EEPROM can be reprogrammed electronically, without the need for UV light.


• Data can be written and erased using electrical signals.
• Used for applications requiring non-volatile storage that can be updated more
conveniently than EPROM.
• Flash Memory:

• Flash memory is a type of EEPROM that can store multiple bits in a single cell,
making it more space-efficient.
• It's widely used in memory cards, USB drives, solid-state drives (SSDs), and other
portable storage devices.
• Flash memory can be written and erased in blocks, making it suitable for both
storage and data transfer.
Secondary Storage
Location: Connected to the motherboard, often via interfaces
like SATA or NVMe.
Speed: Slower than RAM.
Capacity: Much larger (hundreds of gigabytes to terabytes).
Cost: Lower per bit.
Purpose: Stores data and programs permanently until needed.
Secondary storage includes hard drives (HDDs), solid-state
drives (SSDs), and external storage devices. This storage is
non-volatile, meaning it retains data even when the power is
off.
Secondary Memory

• Secondary memory, also known as secondary storage or


external memory, is a type of computer memory that is
used to store data and programs on a long-term basis.
Unlike primary memory (RAM), which is volatile and only
holds data temporarily while the computer is running,
secondary memory retains data even when the computer
is turned off.
Characteristics of Secondary Memory:

• Non-volatile: Data is retained even when the power is


turned off.
• Large Storage Capacity: Secondary memory typically has
much larger storage capacity compared to primary
memory.
• Slower Access Speed: Data retrieval and storage are
slower compared to primary memory.
• Permanent Storage: Used for storing operating systems,
applications, and files.
Examples of Secondary Memory:

• Hard Disk Drives (HDDs):


• Description: Traditional mechanical storage devices that
use magnetic disks (platters) to store data. They have
moving parts, such as spinning platters and read/write
heads.
• Capacity: Can range from hundreds of gigabytes (GB) to
several terabytes (TB).
• Usage: Commonly used for storing operating systems,
software applications, and user data.
Platter

• Description: A platter is a flat, circular disk made of a non-


magnetic material, usually aluminum or glass, coated with
a thin layer of magnetic material. A typical HDD contains
multiple platters stacked on top of each other.
• Function: The platters store data in the form of magnetic
patterns. Both sides of a platter can be used to store data.
Track

• Description: A track is a concentric circle on the surface of


a platter where data is magnetically recorded and read.
Each platter has thousands of tracks, and all tracks on all
platters are organized in the same manner.
• Function: Tracks organize data on the platter, allowing the
read/write head to access specific areas of the disk.
Sector

• Description: A sector is the smallest unit of storage on a


disk. Each track is divided into smaller sections called
sectors. Traditionally, a sector holds 512 bytes of data,
although more modern HDDs use 4096 bytes (4KB)
sectors.
• Function: Sectors are the basic units where data is read
from or written to on the disk. Each sector is identified by
a unique address.
Cylinder

• Description: A cylinder is a set of tracks that are vertically


aligned across all platters in an HDD. For example, Track
0 on Platter 1, Track 0 on Platter 2, and so on, together
form a cylinder.
• Function: Cylinders allow data to be accessed more
efficiently since all tracks in a cylinder can be read without
moving the read/write head to a different position.
Read/Write Head

Description: The read/write head is a tiny electromagnetic


device that hovers just above the surface of the platter.
There is one read/write head for each side of each platter in
the HDD.
• Function: The read/write head reads data from the platter
by detecting magnetic fields and writes data by altering
the magnetic state of the material on the platter.
Arm Assembly (Actuator Arm)

• Description: The arm assembly, also known as the


actuator arm, holds the read/write heads and moves them
across the platter’s surface.
• Function: The actuator arm positions the read/write heads
precisely over the correct track on the platter. It moves
quickly back and forth across the platter, allowing the
heads to access different tracks and sectors.
Spindle

• Description: The spindle is the central axis around which


the platters spin. It is powered by a spindle motor.
• Function: The spindle spins the platters at a constant
speed, allowing the read/write heads to access data on
the moving platters.
SUMMARY OF HDD

• Platter: Stores data magnetically.


• Track: Organizes data in concentric circles on the platter.
• Sector: The smallest unit of storage where data is
read/written.
• Cylinder: A collection of aligned tracks across all platters.
• Read/Write Head: Reads from and writes to the platter.
SUMMARY OF HDD:

• Arm Assembly: Moves the read/write head across the


platter.
• Spindle: Spins the platters for data access.
Solid-State Drives (SSDs):

• Description: Modern storage devices that use flash


memory (similar to USB drives) to store data. They have
no moving parts, which makes them faster and more
durable than HDDs.
• Capacity: Typically ranges from 120 GB to several TB.
• Usage: Increasingly replacing HDDs in laptops and
desktops due to their speed and reliability.
Optical Discs (CDs, DVDs, Blu-rays):

• Description: These are storage media that use laser


technology to read and write data. CDs typically store up
to 700 MB, DVDs up to 4.7 GB (single-layer), and Blu-
rays up to 25 GB (single-layer).
• Usage: Used for distributing software, movies, music, and
for backup storage.
USB Flash Drives:

• Description: Portable storage devices that use flash


memory to store data. They are small, removable, and
rewritable.
• Capacity: Typically ranges from 4 GB to 1 TB.
• Usage: Commonly used for transferring files between
computers and for short-term backups.
Memory Cards (SD cards, microSD cards):

• Description: Small, portable storage devices used


primarily in mobile devices, cameras, and other portable
electronics. They use flash memory.
• Capacity: Typically ranges from 2 GB to 1 TB.
• Usage: Used in smartphones, digital cameras, and other
portable devices.
External Hard Drives:

• Description: These are HDDs or SSDs encased in a


portable enclosure, connected to a computer via USB,
Thunderbolt, or other interfaces.
• Capacity: Ranges from hundreds of GB to several TB.
• Usage: Used for data backup, additional storage, and
data transfer.
Magnetic Tapes:

• Description: Older storage technology that uses magnetic


tape for storing large volumes of data. It is mostly used for
archival and backup purposes due to its durability and
cost-effectiveness for large data sets.
• Capacity: Ranges from a few GB to several TB.
• Usage: Used in data centers and enterprises for long-term
storage and backup.
Importance of Secondary Memory:

• Data Persistence: Ensures that data remains intact and


accessible even after the system is powered down.
• Large Volume Storage: Accommodates the vast
amounts of data generated and used by modern
applications, from multimedia files to large databases.
• Cost-Effective: Secondary memory is more cost-effective
for storing large amounts of data compared to primary
memory.
Summary:

• Secondary memory is crucial for storing data


permanently, making it accessible when needed, and
providing the necessary storage capacity for modern
computing needs. Examples like HDDs, SSDs, USB
drives, and optical discs illustrate the diversity in form
factors, capacities, and use cases for secondary memory.

You might also like