01 - Unit 4 Memory Hierarchy and Types and Concepts
01 - Unit 4 Memory Hierarchy and Types and Concepts
1. Registers
Registers are small, high-speed memory units located in the CPU. They are used to store the most frequently
used data and instructions. Registers have the fastest access time and the smallest storage capacity, typically
ranging from 16 to 64 bits.
2. Cache Memory
Cache memory is a small, fast memory unit located close to the CPU. It stores frequently used data and
instructions that have been recently accessed from the main memory. Cache memory is designed to
minimize the time it takes to access data by providing the CPU with quick access to frequently used data.
3. Main Memory
Main memory, also known as RAM (Random Access Memory), is the primary memory of a computer
system. It has a larger storage capacity than cache memory, but it is slower. Main memory is used to store
data and instructions that are currently in use by the CPU.
Types of Main Memory
• Static RAM: Static RAM stores the binary information in flip flops and information remains
valid until power is supplied. It has a faster access time and is used in implementing cache
memory.
• Dynamic RAM: It stores the binary information as a charge on the capacitor. It requires
refreshing circuitry to maintain the charge on the capacitors after a few milliseconds. It contains
more memory cells per unit area as compared to SRAM.
4. Secondary Storage
Secondary storage, such as hard disk drives (HDD) and solid-state drives (SSD), is a non-volatile memory
unit that has a larger storage capacity than main memory. It is used to store data and instructions that are not
currently in use by the CPU. Secondary storage has the slowest access time and is typically the least
expensive type of memory in the memory hierarchy.
5. Magnetic Disk
Magnetic Disks are simply circular plates that are fabricated with either a metal or a plastic or a magnetized
material. The Magnetic disks work at a high speed inside the computer and these are frequently used.
6. Magnetic Tape
Magnetic Tape is simply a magnetic recording device that is covered with a plastic film. It is generally used
for the backup of data. In the case of a magnetic tape, the access time for a computer is a little slower and
therefore, it requires some amount of time for accessing the strip.
Characteristics of Memory Hierarchy
• Capacity: It is the global volume of information the memory can store. As we move from top to
bottom in the Hierarchy, the capacity increases.
• Access Time: It is the time interval between the read/write request and the availability of the
data. As we move from top to bottom in the Hierarchy, the access time increases.
• Performance: Earlier when the computer system was designed without a Memory Hierarchy
design, the speed gap increased between the CPU registers and Main Memory due to a large
difference in access time. This results in lower performance of the system and thus, enhancement
was required. This enhancement was made in the form of Memory Hierarchy Design because of
which the performance of the system increases. One of the most significant ways to increase
system performance is minimizing how far down the memory hierarchy one has to go to
manipulate data.
• Cost Per Bit: As we move from bottom to top in the Hierarchy, the cost per bit increases i.e.
Internal Memory is costlier than External Memory.
Advantages of Memory Hierarchy
• It helps in removing some destruction, and managing the memory in a better way.
• It helps in spreading the data all over the computer system.
• It saves the consumer’s price and time.
System-Supported Memory Standards
According to the memory Hierarchy, the system-supported memory standards are defined below:
Level 1 2 3 4
Secondary
Name Register Cache Main Memory
Memory
DRAM (capacitor
Implementation Multi-ports On-chip/SRAM Magnetic
memory)
20000 to 1 lakh
Bandwidth 5000 to 15000 1000 to 5000 20 to 150
MB
Operating
Managed by Compiler Hardware Operating System
System
What is RAM?
The full form of RAM is Random Access Memory. The information stored in this type of memory is lost
when the power supply to the PC or laptop is switched off. The information stored in RAM can be checked
with the help of BIOS. It is generally known as the main memory or temporary memory or cache memory or
volatile memory of the computer system.
Types of RAM
Types of RAM
Two main types of RAM are:
• Static RAM
• Dynamic RAM
Static RAM
Static RAM is the full form of SRAM. In this type of RAM, data is stored using the state of a six transistor
memory cell. Static RAM is mostly used as a cache memory for the processor (CPU).
Dynamic RAM
DRAM stands for Dynamic Random Access Memory. It is a type of RAM which allows you to stores each
bit of data in a separate capacitor within a specific integrated circuit. Dynamic RAM is a standard computer
memory of the many modern desktop computers.
This type of RAM is a volatile memory that needs to be refreshed with voltage regularly. Else it loses the
information stored on it.
Types of DRAM :
There are mainly 5 types of DRAM:
1. Asynchronous DRAM (ADRAM) –
The DRAM described above is the asynchronous type DRAM. The timing of the memory device is
controlled asynchronously. A specialized memory controller circuit generates the necessary control
signals to control the timing. The CPU must take into account the delay in the response of the memory.
6. SRAM does not require refresh time. 6. DRAM require periodic refresh time.
What is ROM?
ROM, which stands for read only memory, is a memory device or storage medium that stores information
permanently. It is also the primary memory unit of a computer along with the random-access memory
(RAM). It is called read only memory as we can only read the programs and data stored on it but cannot
write on it. It is restricted to reading words that are permanently stored within the unit.
The manufacturer of ROM fills the programs into the ROM at the time of manufacturing the ROM. After
this, the content of the ROM can't be altered, which means you can't reprogram, rewrite, or erase its content
For example, when you start your computer, the screen does not appear instantly. It takes time to appear as
there are startup instructions stored in ROM which are required to start the computer during the booting
process. The work of the booting process is to start the computer. It loads the operating system into the main
memory (RAM) installed on your computer. The BIOS program, which is also present in the computer
memory (ROM) is used by the microprocessor of the computer to start the computer during the booting
process. It allows you to open the computer and connects the computer with the operating system.
Features of ROM:
ROM (Read-Only Memory) possesses several distinct features that make it suitable for various applications.
Let's explore some key features of ROM in simple language.
o Non-Volatile Memory: ROM is a non-volatile memory type; thus, it keeps its data even when the
power is switched off. This makes it suitable for storing permanent instructions and data since it
guarantees that the recorded information will remain intact and may be accessed whenever
necessary.
o Read-Only Nature: Reading-only memory, or ROM, as its name implies, prevents data from being
readily modified or wiped. This characteristic provides stability and prevents accidental alterations,
ensuring the integrity and reliability of the stored information.
o Permanent Storage: ROM offers permanent storage of data and instructions. Once the data is
programmed into ROM during manufacturing, it remains fixed and cannot be changed without
physically replacing the ROM chip. This permanence guarantees the consistency and stability of the
stored information.
o Firmware Storage: ROM is commonly used for storing firmware containing essential instructions
for operating electronic devices. ROM's non-volatile and read-only nature ensures that the firmware
remains unchanged, providing reliable and consistent functionality to the device.
o Booting and Initialization: ROM plays a crucial role in electronic systems' booting and
initialization processes. The firmware stored in ROM contains the initial instructions required to start
the system, load the operating system, and initiate the hardware components. This ensures a smooth
and controlled startup sequence for the device.
o Data Security: ROM offers inherent data security. Since the data stored in ROM cannot be modified
or erased, it protects against unauthorized alterations or tampering. This feature enhances the security
and authenticity of the stored information, making ROM suitable for critical instructions and
sensitive data.
o Instant Read Access: ROM provides instant read access to the stored instructions and data. The
information can be accessed directly without time-consuming loading, enabling quick retrieval and
execution of essential instructions.
o Compatibility: ROM is compatible with various systems and architectures, allowing seamless
integration into different electronic devices and systems. This compatibility ensures that ROM can be
utilized in various applications.
o Reliability: Due to its read-only nature, ROM offers high reliability. The data stored in ROM is not
susceptible to accidental modifications or loss, ensuring consistent and predictable performance over
time. Such dependability is crucial for important systems where stability and data integrity are of the
utmost importance.
o Cost-Effectiveness: ROM is generally more cost-effective than other memory types, making it an
economical choice for many applications. Production costs are cheaper since the manufacturing
procedures used to produce ROMs are well-established.
Types of ROM:
It is the oldest type of read only memory (ROM). It has become obsolete so it is not used anywhere in
today's world. It is a hardware memory device in which programs and instructions are stored at the time of
manufacturing by the manufacturer. So it is programmed during the manufacturing process and can't be
modified, reprogrammed, or erased later.
2) Programmable Read Only Memory (PROM):
PROM is a blank version of ROM. It is manufactured as blank memory and programmed after
manufacturing. We can say that it is kept blank at the time of manufacturing. You can purchase and then
program it once using a special tool called a programmer.AD
Uses: It is used in cell phones, video game consoles, medical devices, RFID tags, and more.
EPROM is a type of ROM that can be reprogramed and erased many times. The method to erase the data is
very different; it comes with a quartz window through which a specific frequency of ultraviolet light is
passed for around 40 minutes to erase the data. So, it retains its content until it is exposed to the ultraviolet
light. You need a special device called a PROM programmer or PROM burner to reprogram the EPROM.
Uses: It is used in some micro-controllers to store program, e.g., some versions of Intel 8048 and the
Freescale 68HC11.
ROM is a type of read only memory that can be erased and reprogrammed repeatedly, up to 10000 times. It
is also known as Flash EEPROM as it is similar to flash memory. It is erased and reprogrammed electrically
without using ultraviolet light. Access time is between 45 and 200 nanoseconds.AD
5) FLASH ROM:
Uses: It is used for storage and transferring data between a personal computer and digital devices. It is used
in USB flash drives, MP3 players, digital cameras, modems and solid-state drives (SSDs). The BIOS of
many modern computers are stored on a flash memory chip, called flash BIOS.
Auxiliary Memory
Magnetic Disks
A magnetic disk is a type of memory constructed using a circular plate of metal or plastic coated with
magnetized materials. Usually, both sides of the disks are used to carry out read/write operations. However,
several disks may be stacked on one spindle with read/write head available on each surface.
The following image shows the structural representation for a magnetic disk.
o The memory bits are stored in the magnetized surface in spots along the concentric circles called
tracks.
o The concentric circles (tracks) are commonly divided into sections called sectors.
Magnetic Tape
Magnetic tape is a storage medium that allows data archiving, collection, and backup for different kinds of
data. The magnetic tape is constructed using a plastic strip coated with a magnetic recording medium.
The bits are recorded as magnetic spots on the tape along several tracks. Usually, seven or nine bits are
recorded simultaneously to form a character together with a parity bit.
Magnetic tape units can be halted, started to move forward or in reverse, or can be rewound. However, they
cannot be started or stopped fast enough between individual characters. For this reason, information is
recorded in blocks referred to as records.
Optical Disc
An optical disc is an electronic data storage medium that is also referred to as an optical disk, optical
storage, optical media, Optical disc drive, disc drive, which reads and writes data by using optical storage
techniques and technology. An optical disc, which may be used as a portable and secondary storage device,
was first developed in the late 1960s. James T. Russell invented the first optical disc, which could store data
as micron-sized light and dark dots.
An optical disc can store more data and has a longer lifespan than the preceding generation of magnetic
storage medium. To read and write to CDs and DVDs, computers use a CD writer or DVD writer drive, and
to read and write to Blu-ray discs, they require a Blu-ray drive. MO drives, such as CD-R and DVD-R
drives, are used to read and write information to discs (magneto-optic). The CDs, Blu-ray, and DVDs are the
most common types of optical media, which are usually used to:
With the introduction of an all-new generation of optical media, the storage capacity to store data has
increased. CDs have the potential to store 700 MB of data, whereas DVDs allow you to store up to 8.4 GB
of data. Blu-ray discs, the newest type of optical media, can hold up to 50 GB of data. This storage capacity
is the most convenient benefit as compared to the floppy disk storage media, which can store up to 1.44 MB
of data.
The basic sandwich of materials structure is used by all recent optical disc formats. The base is formed by
using a hard-plastic substrate, and a reflective layer of metallic foil is used for encoding the digital data.
Next, a clear polycarbonate layer secures the foil and enables the laser beam to move via the reflective foil
layer.
Optical discs include different materials in the sandwich, which are dependent on the type of disc, whether it
is rewritable or write-once. In write-once CD-ROM, an organic dye layer is located between the
polycarbonate and unwritten reflective foil. Because they replace the aluminium foil with an alloy that is a
phase-change material, rewritable optical discs may be erased and rewritten several times.
Blu-ray discs, which are the newest type of optical media, have the potential to store the most, up to 50 GB
of data. BD-R (Blu-ray recordable) is available in the market with a storage capacity of 25 GB or 50 GB.
Optical drives are disk-based drives that were introduced to the market in the 1980s to allow for increased
storage capacity and faster read and write times. There are multiple kinds of optical media, which are
discussed below:
CD-ROM
CD-ROM, short for compact disk read-only memory, was the first disk on the basis of drives for the latest
PCs. CD-ROM devices populate Compact Disk Filing System discs with data encoded in ISO 9660. To
reduce noise and increase stability, most CD-ROM drives in computers run at a slower speed, and if the
drive experiences read errors, it will only speed up for larger data files. However, the newest CD-ROM
drives have the potential to achieve read speeds of 60 revolutions in a second (60x).
DVD-ROM
DVD-ROM drives, which stand for Digital Versatile Disk Read Only Memory and are a direct evolution
from CD-ROM drives, have significantly more performance and capacity than their CD counterparts while
maintaining the same physical dimensions. The DVD Forum is a non-profit organization that establishes
several standards for DVD functionality and construction, as well as overseeing DVD development.
Blu-ray
In the commercial market, Blu-ray drives are the newest drives available as of 2011. During the early 2000s,
Sony developed the Blu-ray technology that was one of the founding proponents
RW Drives
The rewritable drive types are Blu-ray drives, DVD-ROMs, and CD-ROMs. All the functionalities of read-
only counterparts are available in RW drives. Write processes are particularly sensitive to shock and can
ruin the disc beyond repair if forcibly interrupted; write speeds are slower to preserve stability than read
speeds. Writable disks come in multiple-time write and one-time write variations; however, RW drives can
write multiple times.