Principles of Cache Memory

It is also known as Locality of Reference .



Analysis of a large number of typical programs has shown that data and instructions which has been used recently or which are located near to each other are more often used.



NOTE :---
The Phenomenon in which the references to memory at any given interval of time tend to be confined within a few localised areas in memory is known as the property of locality of reference.

There are two type locality reference:

1. Temporal Locality Reference :----
                                 Temporal locality states that recently accessed data and instructions are likely to be accessed in the near future. For example, look at the case of loop, when a program loop is executed, the same set of instructions are referenced and fetched repeatedly.

2. Spatial Locality Reference:---
                        Spatial locality reference sates that data and instructions which are close to each other are likely to be accessed in near future. For example, in a program the instructions are stored in consecutive memory locations. Also, when in a program arrays are uses, the values are stored in consecutive locations.

Hence, it can be said that a processor spend 90% of its time in 10% of memory. Now if we can place this 10% of memory in cache memory , the memory access time would be greatly reduced. 

No comments:

 

For Advertisment

Featured post

Question Exam ......

Hello Dear Friends visit our Website, ..... IAS,IPS, PSC, SSC, Rly, Group D एंव Bank  हेतु उपयोगी संकलन , question exam, Question Exam,...

Most Reading