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

Lecture 4 Characteristics of Memory Systems

The document provides an overview of computer memory systems, detailing characteristics, methods of accessing data, and various forms of memory such as semiconductor, magnetic, and optical. It discusses memory hierarchy, organization, and the roles of main memory, cache memory, and virtual memory in computer architecture. Additionally, it covers mapping techniques for cache memory and the distinction between volatile and nonvolatile memory.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Lecture 4 Characteristics of Memory Systems

The document provides an overview of computer memory systems, detailing characteristics, methods of accessing data, and various forms of memory such as semiconductor, magnetic, and optical. It discusses memory hierarchy, organization, and the roles of main memory, cache memory, and virtual memory in computer architecture. Additionally, it covers mapping techniques for cache memory and the distinction between volatile and nonvolatile memory.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

Computer Systems

Architecture
Module Code ITU 07104

Lecture 4: Computer Memory


Systems

Facilitator: Mr. Yona Sangula


Learning objectives

Method of Accessing Units of Data


The most common forms of memory
Memory Hierarchy
Several physical characteristics of data storage
Characteristics of Memory Systems
Location
Capacity
Unit of transfer
Characteristics of Memory Systems
Location
Refers to whether memory is internal and external
to the computer
Internal memory is often equated with main
memory
Processor requires its own local memory, in the
form of registers
Cache is another form of internal memory
External memory consists of peripheral storage
devices that are accessible to the processor via I/O
controllers
Characteristics of Memory Systems
cont..
Capacity
Memory is typically expressed in terms of bytes
Unit of transfer
For internal memory the unit of transfer is equal to
the number of electrical lines into and out of the
memory module
Methods of Accessing Units of Data
Capacity and Performance
Memory forms
The most common forms are:
Semiconductor memory
A device for storing digital
information fabricated
by using integrated circuit.
Example RAM and ROM
Memory forms Cont..
Magnetic surface memory
Stores data in magnetic form.
Affected by magnetic fields.
Has high storage capacity.
Doesn't use a laser to read/write data.
Examples are; Hard disk , Floppy disk, Magnetic tape
etc
Memory forms Cont.…
Optical
Stores data optically, uses laser to read/write.
Not affected by magnetic fields.
Has less storage than a hard disk.
Data accessing is high, compared to a floppy disc.
Optical storage devices are; CD-ROM,CD-R, CD-RW,
DVD etc.
Magneto-optical
Used in rewritable optical disk drives, that combines
magnetic and optical recording techniques.
Physical characteristics of data storage
Several physical characteristics of data storage are
important:
Volatile memory
Information decays naturally or is lost when electrical
power is switched off
Nonvolatile memory
Once recorded, information remains without
deterioration until deliberately changed
No electrical power is needed to retain information
Physical characteristics Cont..
Magnetic-surface memories
Are nonvolatile
Semiconductor memory
May be either volatile or nonvolatile
Nonerasable memory
Cannot be altered, except by destroying the storage
unit
Semiconductor memory of this type is known as
read-only memory (ROM)
Memory Organization
Organization refers to the physical arrangement of bits
to form words
Memory unit is essential component of digital
computer since it is needed for storing programs and
data.
Memory unit that communicates directly with CPU is
called Main memory
Devices that provide backup storage is called auxiliary
memory.
Only programs and data currently needed by
processor reside in the main memory.
Memory Hierarchy
Design constraints on a computer’s memory can be
summed up by three questions:
How much, how fast, how expensive
There is a trade-off among capacity, access time, and cost
Faster access time, greater cost per bit
Greater capacity, smaller cost per bit
Greater capacity, slower access time
Memory hierarchy system consist of all storage devices
from auxiliary memory to main memory to cache memory
Memory Hierarchy Cont..
Memory Hierarchy cont.…
As one goes down the hierarchy :
• Cost per bit decreases.
• Capacity increases.
• Access time increases.
• Frequency of access by the processor
decreases
Main Memory
It is the memory used to store programs and
data during the computer operation.
The principal technology is based on
semiconductor integrated circuits.
It consists of RAM and ROM chips.
RAM chips are available in two form Static and
Dynamic.
Static and Dynamic RAM
ROM
ROM is uses random access method.
It is used for storing programs that are
permanent and the tables of constants that do
not change.
ROM store program called bootstrap loader
whose function is to start the computer
software when the power is turned on.
When the power is turned on, the hardware of
the computer sets the program counter to the
first address of the bootstrap loader.
Associative Memory
To search particular data in memory, data is
read from certain address and compared if the
match is not found content of the next address
is accessed and compared.
This goes on until required data is found.
The number of access depend on the location
of data and efficiency of searching algorithm.
The searching time can be reduced if data is
searched on the basis of content
Associative Memory cont.…
A memory unit accessed by content is called
Associative Memory or Content Addressable
Memory(CAM)
This type of memory is accessed
simultaneously and in parallel on the basis of
data content.
Memory is capable of finding empty unused
location to store the word.
These are used in the application where search
time is very critical and must be very short
Cache Memory
Cache memory, also called CPU memory, is
random access memory (RAM) that a computer
microprocessor can access more quickly than
it can access regular RAM.
This memory is typically integrated directly
with the CPU chip or placed on a separate chip
that has a separate bus interconnect with the
CPU.
It is placed in between the main memory and
the CPU.
Cache Memory cont..
The basic purpose of cache memory is to
store program instructions that are
frequently re-referenced by software during
operation.
Fast access to these instructions increases the
overall speed of the software program.
Cache memory levels
Level 1 (L1) cache is extremely fast but relatively
small, and is usually embedded in the processor chip
(CPU).
Level 2 (L2) cache is often more capacious than L1; it
may be located on the CPU or on a separate chip or
coprocessor with a high-speed alternative system bus
interconnecting the cache to the CPU, so as not to be
slowed by traffic on the main system bus.
Level 3 (L3) cache is typically specialized memory
that works to improve the performance of L1 and L2.
It can be significantly slower than L1 or L2, but is
usually double the speed of RAM.
Cache memory levels cont..
In the case of multicore processors each core
may have its own dedicated L1 and L2 cache,
but share a common L3 cache.
When an instruction is referenced in the L3
cache, it is typically elevated to a higher tier
cache.
Cache memory
Mapping Techniques

The transformation of data from main memory


to cache is known as mapping process.
Three types of mapping procedures are:
Associative Mapping
Direct Mapping
Set-Associative Mapping
Associative Mapping

Fastest and most flexible cache organization


uses associative memory.
It stores both address and content of memory
word.
Address is placed in argument register and
memory is searched for matching address.
If address is found corresponding data is read.
If address is not found, it is read from main
memory and transferred to cache.
Associative Mapping cont…
If the cache is full, an address- word pair must
be displaced.
Various algorithm are used to determine which
pair to displace.
Some of them are FIFO(First In First Out),
LRU(Least Recently Used) etc.
Direct Memory
CPU address is divided into two fields tag and
index.
Index field is required to access cache memory
and total address is used to access main
memory.
If there are 2^k words in cache and 2^n words
in main memory, then n bit memory address is
divided into two parts.
k bits for index field and n-k bits for tag field.
Direct Memory cont..
When CPU generates memory request, index
field is used to access the cache.
Tag field of the CPU address is compared with
the tag in the word read. If the tag match, there
is hit.
If the tag does not match, word is read from
main memory and updated in cache.
Set-Associative Mapping
In direct mapping two words with same index in
their address but different tag values can’t
reside simultaneously in memory.
In this mapping, each data word is stored
together with its tag and number of tag-data
items in one word of the cache is said to form
set.
In general, a set associative cache of set size k
will accommodate k words of main memory in
In Summary
Writing into Cache
Writing into cache can be done in two ways:
Write through
Write Back
In write through, whenever write operation is
performed in cache memory, main memory is also
updated in parallel with the cache.
In write back, only cache is updated and marked by
the flag.
When the word is removed from cache, flag is checked
if it is set the corresponding address in main memory
Virtual Memory
Virtual memory is a concept used in computer
that permit the user to construct a program as
though large memory space is available equal
to auxiliary memory.
It give the illusion that computer has large
memory even though computer has relatively
small main memory.
It has mechanism that convert generated
address into correct main memory address.
Address Space and Memory Space
An address used by the programmer is called
virtual address and set of such address is called
address space.
An address in main memory is called physical
address.
The set of such location is called memory space

You might also like