Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Cache (2)

Cache (2)

Ratings: (0)|Views: 1|Likes:
Published by Shobhit Singh

More info:

Published by: Shobhit Singh on Nov 04, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less





 Indian Institute Of Information Technology, Allahabad Page
Memory access is generally slow when compared with the speed of thecentral
 processing unit, and so the memory poses a significant bottleneck 
in computer performance. A small but fast cache memory, in which thecontents of the most commonly accessed locations are maintained, can beplaced between the main memory and the CPU. A cache memory hasfewer locations than a main memory, and as a result it reduces the accesstime.When a program executes, the cache memory is searched
rst, and thereferenced word is accessed in the cache if the word is present. If thereferenced word is not in the cache, then a free location is created in thecache and the referenced word is brought into the cache from the mainmemory. The word is then accessed in the cache.Although this process takes longer than accessing main memory directly,the overall performance can be improved if a high proportion of memory
accesses are satisfied by the cache.
 A cache memory is faster than main memory for many reasons.Faster electronics can be used, which also results in a greater expense interms of money, size, and power requirements. Since the cache is small,this increase in cost is relatively small.
 Indian Institute Of Information Technology, Allahabad Page
Principle of Latency
This is also known as Latency Period. It is the total time associated withthe processing of a particular data unit.The cache is placed both physically closer and logically closer to the CPUthan the main memory, and this placement avoids communication delaysover a shared bus. Thus improves Latency.Main purpose of cache is to reduce the latency of reference to memory.Ideally total Latency should be 1 processor clock cycle for instructionread or data read or write. If the data or instruction required by theprocessor is stored only in the lower speed memory, then latency will behigh.Cache-less computer contains a CPU that has a clock speed of 400 MHz,but communicates over a 66 MHz bus to a main memory that supports alower clock speed of 10 MHz .A cache memory can be positioned closer to the CPU as shown in theright side of Figure 1, so that the CPU sees fast accesses over a 400 MHzdirect path to the cache.
Basics of Cache
 Indian Institute Of Information Technology, Allahabad Page
Fig 1.1 word transfer in different systems
Locality of Reference
Large number of programs has shown that reference to memory in giventime is tend to confined within some specific area of memory. Thisphenomenon is known as Locality of Reference.When a program loop is executed ,the CPU repeatedly refers to the set of instructions in memory that constitute the loop. Every time a givensubroutine is called , its set of instructions are fetched from memory.Thus loop and memory tend to localize the reference to memory forfetching instructions. If the active portion of program and data are placedin a fast small memory, the average memory access time can be reduced,thus reducing the total execution time of the program. Such a small fastmemory is known as cache memory.The principal of locality helped to speed up main memory access byintroducing small fast memory known as Cache memory.Different Types of Locality:1)
Temporal Locality: Also known as Look Backward locality. If theInformation recently referenced by a program is likely to be used againsoon

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->