0% found this document useful (0 votes)
24 views37 pages

Memory

Uploaded by

nepal98088
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)
24 views37 pages

Memory

Uploaded by

nepal98088
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/ 37

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.

• In order to meet these two specific requirements, computers


use two types of storage locations—one, for storing the data
that are being currently handled by the CPU and the other, for
storing the results and the data for future use.
[email protected] 2
• The storage location where the data are held temporarily is referred to
as the primary memory while the storage location where the programs
and data are stored permanently for future use is referred to as the
secondary memory.

• The primary memory is generally known as “memory” and the


secondary memory as “storage”.

[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.

• These storage devices have much larger storage capacity than


the primary memory.

• Information stored on such devices remains permanent (until


we remove it).
[email protected] 8
INTERNAL PROCESS MEMORY

• Internal process memory usually includes cache memory and


registers both of which store data temporarily and are
accessible directly by the CPU.

• 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.

• Most computers use a group of eight bits, known as a byte, to


represent a character.

• How does the computer know what any particular sequence


of bits represents?
[email protected] 10
MEMORY • We can think of memory as a “bunch” of
REPRESENTATION bytes or cells into which we can place data.
• Each cell, known as a data item, is assigned
a unique number known as address (which is
like the index in an array).
• The CPU can identify each cell by its
address as shown in figure.

[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.

• As compared to the secondary storage, the data can be accessed at


a faster speed in RAM because it is the internal memory of the
computer
[email protected] 12
• RAM is made up of different ICs, which are mounted on a printed circuit
board.

• 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.

• RAM is also known as read/write memory because it can perform both


read as well as write operations.

• 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.

• SRAM uses a number of transistors to store a single bit of


digital information.

• SRAM is mostly used as a cache memory for the processor


(CPU).

• It is faster and costlier and consumes more power than DRAM.


[email protected] 15
STATIC RAM (SRAM)
• SRAM uses a matrix of 6 transistors.

• In this memory circuit, capacitors are not used.

• Thus, in SRAM, there is no data leakage, so SRAM need not be


refreshed regularly.

• However, SRAM is relatively expensive because it uses


comparatively more number of chips that increase its
manufacturing cost. [email protected] 16
DRAM
• DRAM stands for Dynamic Random Access Memory.

• Each memory cell of DRAM is made up of one transistor and one


capacitor.

• In DRAM, the data and information is stored in the form of an


electric charged on the capacitor.

• Since capacitor loses its data (charge), thus DRAM must be


continually refreshed several hundred times per second to
[email protected] 17
DRAM

• DRAM is a small sized and less expensive type of RAM. For


this reason, it is used as RAM in most computer systems.

• However, DRAM is relatively slower and has a short data


life than SRAM.

[email protected] 18
DIFFERENT RAM USED TODAY
• DDR1

• DDR2

• DDR3

• DDR4

• DDR5

• VRAM

[email protected] 19
DRAM DDR DDR2 DDR3 DDR4 DDR5

Prefetch 1 – Bit 2 - Bit 4 - Bit 8 - Bit Bit per Bank 16 - Bit

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.

• ROM is most commonly used in devices such as calculators,


laser printers, etc. [email protected] 22
• ROM does not allow the random access of data rather it
allows sequential access of data.

• It is less expensive as compared to RAM and other storage


devices, such as magnetic disk, etc.

• ROM is divided into four types, which are as follows:


• Programmable ROM (PROM)

• Erasable PROM (EPROM)

• Electrically Erasable PROM (EEPROM)

• Flash ROM [email protected] 23


PROGRAMMABLE ROM (PROM)
• Programmable ROM (PROM) is a memory chip on which the write
operation of data can be performed only once.
• The data is stored on this chip permanently, i.e., once a program is written
on the PROM, it cannot be erased or destroyed.
• To write the data on the PROM chip, a device known as PROM
programmer or PROM burner is required.
• The method of writing data on the chip is known as burning the PROM.
• PROM is reliable and stores the data permanently without making any
change in it.
• It is mostly used in video games and electronic dictionaries
[email protected] 24
ERASABLE PROM (EPROM)
• Erasable PROM (EPROM) is a type of ROM in which data
can be erased or destroyed using Ultraviolet Light (UL).
• Erasable ROM provides the facility of changing the contents
of the data, i.e., it can be reprogrammed.
• It contains the floating gate transistors, which have the
capability to hold an electric charge, even when the power of
the computer system is switched off.
• It also facilitates the storage of data for a longer period of
time.
[email protected] 25
ELECTRICALLY ERASABLE PROM
(EEPROM)
• Electrically Erasable PROM (EEPROM) is a type of ROM in
which data can be erased or destroyed by exposing it to an
electric charge.
• It has the ability to retain the data stored in it, even if the
power of the computer system is switched off.
• It stores the data permanently but allows us to make changes
in the data by erasing it with the help of electric charges.
• In this type of memory, the data can be written or erased only
one byte at a time because of which it works very slowly.
[email protected] 26
FLASH ROM
• Flash ROM is a type of EEPROM that stores the information
using floating-gate transistors, which can store electric charge
for a longer period of time as compared to the normal
transistors.
• This memory is mainly used in the memory cards of mobile
phones, digital cameras and iPod for storing data.
• The data stored in flash ROM memory can be easily
transferred using transmission mediums such as data cable,
Bluetooth and infrared technology.

[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]

[email protected] 37

You might also like