| Locality Of Reference |
Article Index for Locality |
Website Links For Locality |
Information AboutLocality Of Reference |
| CATEGORIES ABOUT LOCALITY OF REFERENCE | |
| computer memory | |
| software engineering | |
|
In Computer Science , locality of reference, sometimes also called the '''principle of locality''', is a concept which deals with the process of accessing a single resource multiple times. There are three basic types of locality of reference: temporal, spatial and sequential: ;Temporal locality :The concept that a resource that is referenced at one point in time will be referenced again sometime in the near future. ;Spatial locality :The concept that the likelihood of referencing a resource is higher if a resource near it has been referenced. ;Sequential locality :The concept that memory is accessed sequentially. Locality can also be defined as the property of a program in execution causing it to reference pages that it has recently referenced. Locality is caused by loops in code that tend to reference arrays or other data structures by indices. The reason these concepts are true is due to the manner in which Computer Program s are created. Generally, data that are related are stored in consecutive locations in Memory . One common pattern in Computing is that processing is performed on a single item and then the next. This means that if a lot of processing is done, the single item will be accessed more than once, thus leading to temporal locality of reference. Furthermore, moving to the next item implies that the next item will be read, hence spatial locality of reference, since memory locations are typically read in batches. Increasing and exploiting locality of reference are common techniques for . Programming languages such as C allow the programmer to suggest that certain variables are kept in registers. REFERENCES SEE ALSO BIBLIOGRAPHY
|
|
|