Unit 4 organization
Unit 4 organization
User
Basic concept and hierarchy, semiconductor RAM memories, 2D and 2 1/2D mem-
ory organization.
ChatGPT
Basic Concept and Hierarchy of Memory:
Memory in a computer system is used to store data and instructions. It can be
classified into primary memory (e.g., RAM, cache) and secondary memory
(e.g., hard drives, SSDs). The hierarchy is designed to balance speed, cost,
and capacity, where faster memory is smaller and more expensive.
• Registers: Fastest and smallest memory, located in the CPU.
• Cache Memory: Intermediate memory, faster than RAM but smaller in
size.
• Primary Memory (RAM): Volatile memory, directly accessible by the
CPU.
• Secondary Storage: Non-volatile, slower, and used for long-term data
storage.
• Tertiary Storage: Very slow, often used for archival purposes (e.g.,
tapes).
1
2D and 2 1/2D Memory Organization:
Memory organization determines how data is structured and accessed.
2D Memory Organization:
• Memory is organized in a row and column matrix.
• Each cell in the matrix stores a single bit.
• Addressing involves selecting a specific row and column (e.g., using row
and column decoders).
• Advantages: Simple design and efficient for small-scale memory.
• Applications: Used in traditional DRAM designs.
User
ROM memories
ChatGPT
ROM (Read-Only Memory) Memories are non-volatile memory types,
meaning the data stored within them is retained even when the power is turned
2
off. As the name suggests, ROM is primarily used for storing firmware or soft-
ware that doesn’t need frequent changes, such as system boot-up instructions
and permanent data.
Types of ROM:
1. MROM (Masked ROM):
• The data is permanently written during the manufacturing process,
meaning it cannot be modified or erased later.
• Usage: Historically used for firmware in devices, but largely replaced
by more flexible ROM types.
2. PROM (Programmable ROM):
• Initially blank, PROM can be programmed once by the user with a
special device (usually a PROM programmer).
• Once programmed, it cannot be erased or rewritten.
• Usage: Often used for storing data that is not expected to change
frequently.
3. EPROM (Erasable Programmable ROM):
• Can be erased by exposing it to UV light and then reprogrammed.
• Requires a special device for erasure and rewriting, typically taking
several minutes for the process.
• Usage: Used in systems where occasional updates are needed (e.g.,
embedded systems).
4. EEPROM (Electrically Erasable Programmable ROM):
• Can be erased and rewritten electrically, typically byte-by-byte, with-
out removing the chip from the system.
• Slower than RAM and can wear out after a certain number of write
cycles.
• Usage: Often used for storing configuration settings, firmware, and
small amounts of critical data.
5. Flash Memory:
• A modern, faster version of EEPROM that allows for large blocks of
data to be erased and rewritten electronically.
• Usage: Common in USB drives, SSDs, memory cards, and embedded
systems for firmware storage.
Characteristics of ROM:
• Non-Volatility: Data is not lost when power is turned off, unlike RAM.
3
• Read-Only: ROM is primarily read and cannot be modified easily (de-
pending on the type).
• Data Integrity: Since it is not easily altered, ROM provides a secure
method for storing essential software like system firmware.
Applications of ROM:
• Boot-up Instructions: ROM is used to store the computer’s BIOS or
firmware that is required to start the system.
• Embedded Systems: Used to store programs in devices like washing ma-
chines, microwaves, and cameras, where data modification is unnecessary
or uncommon.
• Firmware Storage: Flash memory in ROM chips is used to store the
operating system in many consumer electronics and computing devices.
Erasure
Type Modifiability Mechanism Typical Use Case
MROM Cannot be Not erasable Factory-loaded
modified firmware
PROM Can be Not erasable One-time
programmed programmable
once storage
EPROM Can be Erased via UV Used for
programmed light prototyping and
multiple times development
EEPROM Can be erased Byte-by-byte Storing
and erasure configuration
reprogrammed data and
electrically firmware
Flash Can be erased Electronically Used in modern
and rewritten in erasable storage devices
blocks (e.g., SSDs, USB
drives)
In summary, ROM plays an essential role in providing stable and secure storage
for critical data in electronic systems.
4
User
Auxiliary memories: magnetic disk, magnetic tape and optical disks, Pag-
ing, RAID.
ChatGPT
Auxiliary Memories are secondary storage devices that provide large capacity
storage for data that isn’t actively being used by the CPU but needs to be saved
for long-term use. These types of memories are slower than primary storage (like
RAM) but are much more cost-effective for large data storage. Below are the
types of auxiliary memories:
1. Magnetic Disk:
• Description: Magnetic disks are data storage devices that use magnetic
storage to read, write, and store data. The most common type of magnetic
disk is the Hard Disk Drive (HDD).
• Structure: Consists of one or more rotating platters coated with a mag-
netic material. Data is stored in concentric tracks and sectors on the disk
surface. A read/write head accesses the data.
• Advantages:
– High storage capacity: Modern HDDs offer several terabytes of
storage.
– Relatively low cost: Compared to solid-state drives (SSDs), mag-
netic disks are cheaper for large storage.
• Disadvantages:
– Slower access speed: Mechanical moving parts (such as the
read/write head) make HDDs slower than SSDs.
– Susceptible to damage: Moving parts make them more vulnerable
to physical damage from shock or vibrations.
2. Magnetic Tape:
• Description: Magnetic tape is a type of storage medium that stores data
in a sequential manner on a long, thin strip of plastic film coated with a
magnetic material.
• Structure: Tapes are wound onto reels and data is written or read se-
quentially, making it slower than direct-access storage media like disks.
• Advantages:
5
– High capacity: Tape drives offer high storage capacity at a lower
cost.
– Long-term storage: Tapes are ideal for archival storage due to
their longevity.
• Disadvantages:
– Sequential access: Unlike magnetic disks, tape storage does not
allow for direct access to data, making it slower to retrieve specific
information.
– Wear and tear: Over time, tapes can degrade and become unread-
able.
• Usage: Often used for backup and archival purposes, especially in enter-
prise environments.
3. Optical Disks:
• Description: Optical disks use laser technology to read and write data.
Examples include CDs, DVDs, and Blu-ray discs.
• Structure: Data is encoded on the disk in the form of pits and lands
(reflective and non-reflective areas) on a plastic disk. A laser reads the
data during access.
• Advantages:
– Durability: Less prone to mechanical damage compared to magnetic
disks.
– Portability: Optical disks are small and portable.
– Cost-effective for moderate storage: Cheaper than magnetic
disks for smaller storage sizes.
• Disadvantages:
– Slower read/write speeds: Slower compared to hard drives and
SSDs.
– Lower capacity: Optical disks typically store much less data com-
pared to HDDs or tapes.
• Usage: Used for multimedia storage, software distribution, and data back-
ups.
Paging:
Paging is a memory management scheme that eliminates the need for contigu-
ous allocation of physical memory. It divides the physical memory into fixed-size
6
blocks called pages and the logical memory (address space of a process) into
blocks of the same size, called page frames.
• How it Works: When a program is executed, it is divided into pages. The
operating system keeps a page table that maps virtual pages to physical
frames in memory. This allows programs to access non-contiguous memory
locations.
• Advantages:
– Efficient use of memory: Paging minimizes the problem of frag-
mentation, as it allows memory to be allocated in non-contiguous
chunks.
– Isolation between processes: Each process gets its own page table,
preventing unauthorized access to memory.
• Disadvantages:
– Overhead: Maintaining the page tables adds overhead to the sys-
tem.
– Slower access: If a page is not in physical memory, the system must
fetch it from disk (paging fault), causing a delay.
RAID Levels:
1. RAID 0 (Striping):
• Data is split into equal-sized blocks and written across multiple drives.
This increases speed but provides no redundancy (if one disk fails, all
data is lost).
2. RAID 1 (Mirroring):
• Data is duplicated (mirrored) across two drives. Provides redun-
dancy, but the storage capacity is halved (only the size of the smallest
drive can be used).
3. RAID 5 (Striping with Parity):
• Data and parity (error-checking) information are striped across three
or more disks. Offers redundancy with less overhead than RAID 1.
4. RAID 10 (1+0):
7
• Combines RAID 1 and RAID 0. Data is mirrored and then striped
across multiple disks, providing both redundancy and performance.
Advantages of RAID:
• Increased performance (in RAID 0 and RAID 10).
• Redundancy (in RAID 1, RAID 5, and RAID 10), ensuring data is not
lost in case of a disk failure.
• Scalability: RAID allows you to expand storage capacity by adding more
disks.
Disadvantages of RAID:
• Complexity: Setting up and maintaining RAID arrays can be complex.
• Cost: Requires multiple hard drives, which can increase hardware costs.
Summary:
Auxiliary
Memory Capacity Speed Use Case
Magnetic Disk High Moderate Main storage for
PCs and servers
Magnetic Tape Very High Slow Backup and
archival storage
Optical Disk Low-Moderate Slow Software
distribution,
multimedia
storage
Paging N/A N/A Memory
management in
OS
RAID High Fast/Moderate Data redundancy
and performance
enhancement
These auxiliary memory systems are crucial for storing large amounts of data,
with different technologies offering specific advantages depending on the require-
ments of speed, capacity, and redundancy.
User
Cache memories: concept and design issues and performance, address map-
ping and replacement.
8
ChatGPT
Cache Memories: Concept and Design Issues
Cache memory is a small, high-speed storage area placed between the CPU
and main memory (RAM) to store frequently accessed data and instructions.
The goal of cache memory is to reduce the time it takes to access data from the
main memory, as accessing cache memory is significantly faster than accessing
RAM.
9
Performance of Cache Memory:
The performance of cache memory is determined by several factors:
1. Hit Ratio:
• The hit ratio is the percentage of memory accesses that are satisfied
by the cache. A high hit ratio means the cache is performing well.
• Formula:
Number of Cache Hits
Hit Ratio =
Total Memory Accesses
2. Miss Ratio:
• The miss ratio is the opposite of the hit ratio, representing the
percentage of accesses that are not found in the cache and have to
be fetched from main memory. A low miss ratio is desirable.
3. Miss Penalty:
• Miss penalty refers to the time delay when a cache miss occurs and
data needs to be fetched from main memory. The performance is
impacted by how long this delay is.
4. Cache Access Time:
• The access time for cache should be small, as any delay would
reduce its effectiveness in speeding up memory access. It is typically
in the range of 1-5 cycles.
10
3. Set-Associative Cache:
• This is a compromise between direct-mapped and fully associative
caches. The cache is divided into sets, and each block can map to
any cache line within a specific set.
• Example: In a 2-way set-associative cache, each block can be stored
in one of two cache lines in a set.
• Advantages: Reduces conflicts while being more efficient than fully
associative mapping.
11
Summary of Key Terms:
Term Description
Hit Ratio Percentage of accesses satisfied by the
cache.
Miss Ratio Percentage of accesses not satisfied by
the cache.
Cache Access Time The time it takes to read or write
from the cache.
Direct-Mapped Cache Simple mapping of memory blocks to
cache lines.
Fully Associative Cache Any block can be placed in any cache
line.
Set-Associative Cache Memory blocks are divided into sets,
with multiple lines in each set.
Replacement Policy Strategy for selecting which block to
evict from the cache.
Summary:
Cache memory plays a critical role in improving system performance by re-
ducing the access time to frequently used data. It relies on address mapping
techniques (direct-mapped, set-associative, fully associative) and replacement
policies (LRU, FIFO, LFU) to manage how data is stored and retrieved effi-
ciently. Proper cache design, including size, access time, and hit ratio, directly
affects the overall performance of the system.
12