0% found this document useful (0 votes)
8 views32 pages

04 - 02 Memory Organization

The document covers the organization of memory in computer architecture, detailing various types of memory including main memory (RAM and ROM), auxiliary memory, associative memory, and cache memory. It explains the characteristics, functions, and operations of these memory types, including their access methods and the importance of cache memory in improving performance. Additionally, it discusses memory addressing and the significance of memory hierarchy in computer systems.
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)
8 views32 pages

04 - 02 Memory Organization

The document covers the organization of memory in computer architecture, detailing various types of memory including main memory (RAM and ROM), auxiliary memory, associative memory, and cache memory. It explains the characteristics, functions, and operations of these memory types, including their access methods and the importance of cache memory in improving performance. Additionally, it discusses memory addressing and the significance of memory hierarchy in computer systems.
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/ 32

Computer Organization and Architecture

UNIT – IV
Memory Organization
Prof. Murali Nath R S, Ms. Kavitha P & Ms. Nagamani G
Department of Computer Science & Engineering

BVRIT HYDERABAD College of Engineering for Women


Why Should I Study thistocourse?
Topics be Covered

 Memory
Examples Hierarchy

 Main Memory

 Auxiliary memory

 Associate Memory

 Cache Memory
BVRIT HYDERABAD College of Engineering for Women
Why Should I Study this course?
Memory Hierarchy

Examples

BVRIT HYDERABAD College of Engineering for Women


BVRIT HYDERABAD College of Engineering for Women
Why Should I Study Main
this course?
Memory
The main memory is the central storage unit, relatively large and fast, to store
Examplesand data in a computer system.
programs
Most of the main memory in a general-purpose computer is made up of RAM
Integrated Circuit (IC) chips.
IC RAM chips are available in two possible operating modes:
- Static
- Dynamic

The Static RAM:


- Consists of internal flip-flops to store the binary information
- Information stored remains valid as long as power is applied to the unit
- Easier to use and has shorter read and write cycles
BVRIT HYDERABAD College of Engineering for Women
The Dynamic RAM:
- Stores the binary information in the form of electric charges that
are applied to capacitors, provided by MOS transistors
- Charge on the capacitors discharges with time and must be
periodically recharged by refreshing
- Offers reduced power consumption and larger storage capacity

A portion of the memory may be constructed with Read-Only Memory


(ROM) chips are:
- Also random access
- Used for storing programs and table of constants that are
permanently resident in the computer
- Needed for storing startup and bootstrap loader
BVRIT HYDERABAD College of Engineering for Women
Why Should I Study
RAMthis
andcourse?
ROM Chips
A RAM chip has:
Examples
- One or more control inputs to select the chip
- Read and Write inputs to specify the memory operation
- A bidirectional data bus, made up of three-state buffers, used to transfer of data
from memory to CPU during a read operation, or from CPU to memory during a
write operation

BVRIT HYDERABAD College of Engineering for Women


BVRIT HYDERABAD College of Engineering for Women
Why Should I Study this course?
Memory Address Map
The designer of a computer system must:
Examples
- Calculate the amount of memory required for the particular application
- Assign it to either RAM or ROM.
The addressing of memory is established using a memory address map, specifies
addresses assigned to each chip.

BVRIT HYDERABAD College of Engineering for Women


Memory
Connection
to
CPU

BVRIT HYDERABAD College of Engineering for Women


Why Should I Study this course?
Auxiliary Memory

Examples
Access Mode
Access Time
- Seek Time
- Transfer Time
Transfer Rate
Capacity
Cost

BVRIT HYDERABAD College of Engineering for Women


BVRIT HYDERABAD College of Engineering for Women
BVRIT HYDERABAD College of Engineering for Women
Why Should I Study this course?
Associate Memory
Many data-processing applications require the search of items in a table stored in
Examples
memory.
The search procedure is a strategy:
- Chooses a sequence of addresses
- Reads the content of memory at each address
- Compares the information read with the item being searched until a match
occurs.

The number of accesses to memory depends on the location of the item and the
efficiency of the search algorithm.

The time for search can be reduced considerably if stored data can be identified for
access by the content of the data rather than by an address.
BVRIT HYDERABAD College of Engineering for Women
A memory unit accessed by content is called an Associative Memory or
Content Addressable Memory (CAM).
This can be accessed simultaneously and in parallel on the basis of data
content. not by specific address or location.

To write a word, this memory is capable of finding an empty location, with no


address is given.
To read a word, the content of the word, or part of the word, is specified.

The memory locates all words matching the specified content and marks them
for reading.
This memory is uniquely suited to do parallel searches by data association.
CAM is more expensive than RAM, as each cell must have storage capability
as well as logic circuits for matching its content with an external argument.
BVRIT HYDERABAD College of Engineering for Women
Why Should I Study this course?
Hardware Organization

Examples

BVRIT HYDERABAD College of Engineering for Women


BVRIT HYDERABAD College of Engineering for Women
Why Should I Study this course?
Match Logic
The match logic for each word can be derived from the comparison
Examples for two binary numbers.
algorithm

First, neglect the key bits and compare the argument in A with the bits
stored in the cells of the words.
Word i is equal to the argument in A if Aj = Fij for j = 1, 2, …, n.

The equality of two bits can be expressed logically by the Boolean function:
xj = AjFij + AjFij

A word i to be equal to the argument in A, when all xj variables equal to 1.


BVRIT HYDERABAD College of Engineering for Women
The Boolean function for this condition is:
M = x1x2x3…xn
One cell of the Associative Memory is:

BVRIT HYDERABAD College of Engineering for Women


Let us now include the key bit Kj in the comparison logic.
The requirement is that:
- If Kj = 0, the corresponding bits of Aj and Fij need no comparison.
- If Kj = 1 must they be compared.
xj + Kj = xj if Kj = 1
= 1 if Kj = 0

The match logic for word i in an associative memory can now be expressed by the
following Boolean function:
Mi = (x1 + Kl )(x2 + K2)(x3 + K3) · · · (xn + Kn)
𝑛

𝑀𝑖 = 𝐴𝑗 𝐹𝑖𝑗 + 𝐴𝑗 𝐹𝑖𝑗  + 𝐾𝑗 
𝑗=1

BVRIT HYDERABAD College of Engineering for Women


BVRIT HYDERABAD College of Engineering for Women
Why Should I StudyCache
this course?
Memory
Analysis of a large number of typical programs shown that the references
toExamples
memory at any given interval of time are confined to a few localized
areas in memory, locality of reference.

Loops and subroutines tend to localize the references to memory for


fetching instructions.
To a lesser degree, memory references to data also tend to be localized.

The execution time can be reduced by placing the active portions of the
program and data in a fast small memory, cache memory.

BVRIT HYDERABAD College of Engineering for Women


The Cache Memory is placed between the CPU and main memory as:

The basic operation of the cache is as follows:


- The cache is examined by the CPU to access memory.
- If the word is found in the cache, hit, it is read from the fast memory.
- If the word addressed by the CPU is not found in the cache, miss, the main
memory is accessed to read the word.
- A block of words containing the one just accessed is then transferred from main
memory to cache memory.
The performance of cache memory is frequently measured in terms of a quantity
called hit ratio.
BVRIT HYDERABAD College of Engineering for Women
The basic characteristic of cache memory is its fast access time.
So, very little or no time must be wasted when searching for words
in the cache.

The transformation of data from main memory to cache memory is


referred to as a mapping process.

Three popular types of mapping procedures are:


1. Associative mapping
2. Direct mapping
3. Set-associative mapping

BVRIT HYDERABAD College of Engineering for Women


Why Should I Study this course?
Associative Mapping

Examples

BVRIT HYDERABAD College of Engineering for Women


Why Should I StudyDirect
this course?
Mapping

Examples

BVRIT HYDERABAD College of Engineering for Women


BVRIT HYDERABAD College of Engineering for Women
BVRIT HYDERABAD College of Engineering for Women
Why Should I Study this course?
Set-associative Mapping

Examples

BVRIT HYDERABAD College of Engineering for Women


Why Should I Study this course?
Writing into Cache
The write operation on the word in the cache will be handled by the system in one
ofExamples
the two ways:
- Write-through
- Write-back

The Write-through is the simplest and most commonly used procedure.


The memory will be updated in parallel with the cache memory for every memory
write operation.
The advantage with this method is that the main memory always contains the same
data as the cache.
This characteristic is important in systems with direct memory access transfers, as it
ensures the validity of the data residing in the main memory.

BVRIT HYDERABAD College of Engineering for Women


In write-back method, the cache location only is updated during a
write operation.
This location is marked by a flag to indicate that it has to be copied into
main memory, when the word is removed from the cache.
The reason to have write-back method is that during the time a word
resides in the cache, it may be updated several times.
As long as the word remains in the cache, it does not matter even though
the copy in main memory is out of date, since requests for the word are
filled from the cache.
So, when the word is displaced from the cache, an accurate copy will be
rewritten into main memory.

BVRIT HYDERABAD College of Engineering for Women


Thank You

BVRIT HYDERABAD College of Engineering for Women

You might also like