Sie sind auf Seite 1von 18

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 : Advantages & mapping
process of Cache Memory
Teaching aids : PPT,drawings
CM303.47 1
Do you Know

• What is the use of cache memory?

• What is locality of reference property?

CM303.47 2
Recap of previous lesson

• Cache memory is a small and fast memory


• Used to compensate the speed differences between
CPU and main memory
• Located in between CPU and Main memory
• Based on the property of locality of reference only active
portions of programs and data are kept in cache
• Performance is measured in terms of hit ratio
• Hit ratio = no. of hits / no. of hits + no. of misses
CM303.47 3
Objectives

On completion of this period you would be able to


know

• The advantages of cache memory

• Various mapping methods of cache memory

CM303.47 4
Cache memory
• A small and very high speed cache memory is
used to compensate the speed differences

• 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

CM303.47 5
Cache memory
• Advantages
• Fast Access
• Processing speed of computer can be increased
• No time is wasted in searching for words in cache
• System performance can be improved
• Access time is reduced , indirectly reduces total
execution time
• With the presence of cache memory, access speed
approaches the speed of CPU

CM303.47 6
Mapping process of Cache memory

• An algorithm is needed
• For determining which main memory block currently
occupies on to cache
• To search for a word in the cache memory
• Mapping process
• The transformation of data from main memory to
cache memory

CM303.47 7
Mapping process of Cache memory
Contd.,

• Different mapping procedures are

• Associative mapping
• Direct mapping
• Set-associative mapping

CM303.47 8
Mapping process of Cache memory
Contd.,
• Associative mapping

• Fastest and most flexible mapping process

• Stores both the address and data of the memory word in


cache

• The associative mapping process is shown in the fig.1

CM303.47 9
Block diagram showing associative mapping
CPU

Address
word
0 1 0 1 0 0 0 1 1 0 0 0
0 1 1 1 0 0 1 1
Address word
100100111001 00001111
Address
matched 010100001100 01010001 Word
010100011000 01110011 fetched

111001010010 10110111
Cache memory
CM303.47 Fig.1 10
Mapping process of Cache memory
Contd.,
• Associative mapping

• The address sent by CPU is used to search cache

• If any address is matched, the corresponding word


is read and then sent to CPU

• If no match is found, the word is read from main


memory

• The word along with its address it then copied in to


cache
CM303.47 11
Mapping process of Cache memory
• Associative mapping
• If cache is full, then an existing word along with its
address must be removed to make room for new
word

• Advantage is very fast access method

• Disadvantage is very expensive

CM303.47 12
Summary
• In this class you have studied
• Advantages of Cache memory
• a small and fast memory
• short Access time
• Improved system performance
• Various mapping techniques
• Associative mapping
• Direct mapping
• Set-associative mapping

CM303.47 13
QUIZ

CM303.47 14
1. A mapping process of cache memory is

a) Paging
b) Set-associative mapping
c) Locality of reference
d) Segmentation

CM303.47 15
1. A mapping process of cache memory is

• Paging
• Set-associative mapping
• Locality of reference
• Segmentation

CM303.47 16
Frequently asked Questions

1. Explain the associative mapping of cache


memory organization with the help of a
diagram

CM303.47 17
Short Answer Questions

1. Write the advantages of cache memory

2. List the various mapping methods of cache


memory

CM303.47 18

Das könnte Ihnen auch gefallen