Memory
Memory
AND
STORAGE SYSTEMS
INTRODUCTION
• Computers are used not only for processing of data for
immediate use, but also for storing of large volume of data
for future use.
[email protected] 3
• The data and instructions stored in the primary memory can
be directly accessed by the CPU using the data and address
buses.
• However, the information stored in the secondary memory is
not directly accessible to CPU.
• Firstly, the information has to be transferred to the primary
memory using I/O channels and then, to the CPU.
[email protected] 4
• Computers also use a third type of storage location known as
the internal process memory.
• This memory is placed either inside the CPU or near the CPU
(connected through special fast bus).
[email protected] 5
Categories Of Computer Memory
And
Their Relative Speed, Storage Capacity And Cost
[email protected] 6
PRIMARY MEMORY
• Primary memory (also known as main memory) includes two
types, namely, Random Access Memory (RAM) and Read Only
Memory (ROM).
• The data stored in RAM are lost when the power is switched off
and therefore, it is known as volatile memory.
• However, the data stored in ROM stay permanently even after the
power is switched off and therefore ROM is a non-volatile
memory.
[email protected] 7
SECONDARY MEMORY
• Secondary memory (also known as auxiliary memory)
includes primarily magnetic disks and magnetic tapes.
• This memory is placed inside or near the CPU for the fast
access of data.
[email protected] 9
MEMORY REPRESENTATION
• In the memory, values are represented by sequences of binary
digits, known as bits.
[email protected] 11
Random Access Memory (RAM)
• Random Access Memory (RAM) is a volatile memory and loses
all its data when the power is switched off.
• It is the main memory of the computer system that stores the data
temporarily and allows the data to be accessed in any order.
• RAM stores the application programs and the data on which the user is
currently working so that the processor can easily access the required
application program and data in a less amount of time.
• The speed of RAM is faster than the other memory devices, such as hard
disk, floppy disk, etc.
[email protected] 13
• The programs, which are being currently executed by the computer
system, are stored in RAM.
• RAM is volatile and, therefore, the programs and the data stored in the
RAM get lost when the power supply is switched off.
• The storage capacity of RAM is usually less than the secondary storage
devices.
• RAM can be categorized into two main types, namely, Static RAM
(SRAM) and Dynamic RAM (DRAM), which can be further divided into
various types for storing data.
[email protected] 14
STATIC RAM (SRAM)
• Static RAM (SRAM) is a type of RAM in which data is stored
till the power of the computer system is switched on.
[email protected] 18
DIFFERENT RAM USED TODAY
• DDR1
• DDR2
• DDR3
• DDR4
• DDR5
• VRAM
[email protected] 19
DRAM DDR DDR2 DDR3 DDR4 DDR5
Data Rate
100 - 166 266 - 400 533 - 800 1066 - 1600 2133 - 5100 3200 - 6400
(MT/s)
Transfer Rate
0.8 - 1.3 2.1 - 3.2 4.2 - 6.4 8.5 - 14.9 17 - 25.6 38.4 - 51.2
(GB/s)
Voltage (V) 3.3 2.5 - 2.6 1.8 1.35 - 1.5 1.2 1.1
[email protected] 20
[email protected] 21
READ ONLY MEMORY (ROM)
• ROM is the memory that stores the data permanently, i.e., it can
retain the data even when the power of the computer system is
switched off.
• The data can be easily read from this type of memory but cannot
be changed.
[email protected] 27
FLASH ROM
• For example, we can transfer the data stored in flash ROM
memory of mobile phone to the memory of a computer using data
cable.
• We can easily erase the data stored in flash ROM memory and
reprogram this type of memory.
• Flash ROM has faster speed of reading data, as compared to any
other type of ROM. It uses continuous memory cells for storing
data.
[email protected] 28
BUFFER
• Buffer memory is a type of computer memory that is used as
a temporary storage area for data that is being transferred
between two devices or between a computer and a peripheral
device.
• It is also known as buffer storage
• The purpose of buffer memory is to ensure that data is
transferred smoothly and efficiently between devices, even if
one device is faster or slower than the other.
[email protected] 29
BUFFER
• This helps to prevent data loss and improves overall
performance.
• Buffers are commonly used in various computing systems to
optimize data transfer and improve overall system
performance.
• They can be found in different components, such as
input/output (I/O) devices, network interfaces, and central
processing units (CPUs).
[email protected] 30
BUFFER MEMORY USED SCENARIOS
examples of computing processes where buffers are commonly
used:
• Streaming media:
• Printing
• Image and video processing
• Disk I/O operations
• Network communications
[email protected] 31
BUFFER MEMORY USED SCENARIOS
• Streaming media
• When you're watching a video or listening to audio over
the internet, buffering is used to store a portion of the
media content before it is played.
• This allows for a smooth playback experience by
compensating for variations in network speed or latency.
• The buffer ensures that a continuous stream of data is
available to the media player, reducing the chances of
interruptions or playback issues.
[email protected] 32
BUFFER MEMORY USED SCENARIOS
• Printing:
• When you send a document to a printer, it may take some
time for the printer to process the data and produce the
printed output.
• A buffer is used to store the print job temporarily,
allowing the computer to send the data at its own pace
while the printer processes it at its own speed.
• This buffer helps prevent delays and enables efficient
printing.
[email protected] 33
BUFFER MEMORY USED SCENARIOS
• Disk I/O operations:
• When data is read from or written to a hard disk or any
other storage device, a buffer is often used to improve
performance.
• Instead of accessing the disk for every small read or write
operation, the system utilizes a buffer to temporarily hold a
certain amount of data.
• This reduces the number of disk accesses, as multiple
small operations can be combined into larger, more
efficient transfers.
[email protected] 34
BUFFER MEMORY USED SCENARIOS
• Image and video processing:
• Buffers are frequently used in image and video processing
algorithms.
• For example, when applying filters or transformations to
an image or video, a buffer can store intermediate results
during the processing steps.
• This allows for efficient memory management and enables
real-time processing by separating the input and output
stages.
[email protected] 35
BUFFER MEMORY USED SCENARIOS
• Network communication:
• Buffers are used extensively in network communication protocols
to handle data packets.
• When data is sent over a network, it is divided into smaller
packets.
• These packets are temporarily stored in buffers at various stages of
the network, such as routers, switches, and network interface cards
(NICs), before being transmitted to their destination.
• Buffers help manage the flow of data and prevent congestion or
loss of packets.
[email protected] 36
FAQs
1. Differentiate between primary and secondary memory. [8]
2. Differentiate between RAM and ROM. [8]
3. Define cache memory. Explain its types [8]
4. What is cache memory? Why is it useful in computer system? What
do you mean by data sequencing? Differentiate between random
access and sequential access. [5]
5. Differentiate between SRAM and DRAM. [5]