Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 23

DEPARTMENT OF TECHNICAL EDUCATION

ANDHRA PRADESH
Name : U.Rajya Lakshmi
Designation : Lecturer
Branch : Computer Engg.,
Institute : Govt.Polytechnic for Women,
PALAMANER.
Year/Semester : III Semester
Subject : Computer Architecture
Subject Code : CM-303
Topic : Memory Organization
Duration : 50 Min
Sub Topic : Cache Memory
Teaching aids : PPT,drawings
CM303.46 1
Do you Know

• What is the function of cache memory?

• What is the need for cache memory in a computer


system?

CM303.46 2
Objectives

On completion of this period you would be able to


explain

• The use of cache memory and its operating


principle

CM303.46 3
Cache memory

CM303.46 4
Introduction

• CPU logic is faster than main memory logic

• Processing speed of CPU is limited by the speed


of main memory

• A small and very high speed cache memory is


used to compensate the speed differences

CM303.46 5
Cache memory
Contd.,

• Much faster than main memory

• Access time is about 10 ns

• Much costlier than main memory

• Used to increase the processing speed

CM303.46 6
Cache memory Contd.,

• Capacity is less than that of main memory

• Communicates directly with CPU

• Holds frequently used instructions and data

• located in between the CPU and main memory as


shown in fig.1

CM303.46 7
Cache Memory
Contd.,

Cache Main
CPU
memory memory

Use of cache memory in between CPU and main memory

Fig.1
CM303.46 8
Cache memory Contd.,

• Cache organization is based on Locality of


reference phenomenon

• Locality of reference
• References to memory at any given interval of time
tend to be confined with in a few localized areas in
memory

CM303.46 9
Cache memory
Contd.,

• Fundamental idea of cache memory

• To keep the currently needed portions of program


and data in a fast small cache memory

• Thus average memory access time can be reduced

• Total execution time can also be reduced

CM303.46 10
Operation of Cache memory
Contd.,
• When CPU needs to read an instruction or data
from memory, the cache is examined first

• If the required word is found in cache, it is read


from cache

• If the word is not found in cache,


• The main memory is accessed to read the word

• The block containing the required word is then


transferred from main memory to cache

CM303.46 11
Performance of Cache memory
Contd.,
• Performance of cache is measured in terms of
hit ratio
• If the required word is found in cache, it is called
hit
• If the required word is not found in cache, it is
called miss
• Hit ratio = no. of hits / total no. of references to
memory

CM303.46 12
Summary

• In this class you have studied that


• Cache memory
• A small and fast memory
• Located in between CPU and main memory
• Organization is based on locality of reference
property
• Performance is measured in terms of hit ratio
• Hit ratio=no. of hits / total no. of references to
memory

CM303.46 13
QUIZ

CM303.46 14
1. Fundamental idea of Cache memory organization
is
a) Paging scheme
b) Segmentation scheme
c) Locality of reference

CM303.46 15
1. Fundamental idea of Cache memory organization
is
• Paging scheme
• Segmentation scheme
• Locality of reference

CM303.46 16
2. The performance of cache is measured in terms of

a) KBps
b) Block numbers
c) Kbps
d) Hit ratio

CM303.46 17
2. The performance of cache is measured in terms of

a) KBps
b) Block numbers
c) Kbps
d) Hit ratio

CM303.46 18
3. Hit ratio is defined as

a) No. of hits/no. of misses


b) No. of misses/no. of hits
c) No. of hits/ total no. of references
d) None of the above

CM303.46 19
3. Hit ratio is defined as

• No. of hits/no. of misses


• No. of misses/no. of hits
• No. of hits/ total no. of references
d) None of the above

CM303.46 20
Essay type Questions

1. Explain the organization of cache memory

CM303.46 21
Short answer Questions

1. Write short notes on cache memory

CM303.46 22
Assignment Questions

1. Draw the flow chart for cache read operation

2. What is the significance of locality of


reference?

CM303.46 23

You might also like