More than one word are put in one cache block toa)exploit the temporal...
exploit the spatial locality of reference in a program as, if the next locality is addressed immediately, it will already be in the cache.
Consider the scenario similar to cooking, where when an ingredient is taken from cupboard, you also take the near by ingredients along with it- hoping that they will be needed in near future.
View all questions of this test
More than one word are put in one cache block toa)exploit the temporal...
Explanation:
Cache Blocks:
Cache memory is organized into blocks or lines, where each block can store multiple words or bytes of data. When a memory location is accessed, the entire block containing that location is brought into the cache. This is known as a cache block or cache line.
Spatial Locality of Reference:
Spatial locality of reference refers to the phenomenon where if a program accesses a memory location, it is likely to access nearby memory locations in the near future. This principle is based on the observation that programs tend to access data in contiguous memory locations or in close proximity to each other.
Temporal Locality of Reference:
Temporal locality of reference refers to the phenomenon where if a program accesses a memory location, it is likely to access the same memory location again in the near future. This principle is based on the observation that programs often exhibit repetitive behavior and frequently access the same data.
Explanation of Options:
a) Exploiting Temporal Locality of Reference: This option suggests that more than one word is put in one cache block to exploit the temporal locality of reference in a program. However, this is incorrect because temporal locality is related to accessing the same memory location again, not storing multiple words in a cache block.
b) Exploiting Spatial Locality of Reference:
This option suggests that more than one word is put in one cache block to exploit the spatial locality of reference in a program. This is the correct option because spatial locality is related to accessing nearby memory locations, and storing multiple words in a cache block allows for exploiting this principle. By bringing in a block of data, the cache can satisfy future memory accesses that are likely to be in close proximity.
c) Reducing Miss Penalty: This option is incorrect because storing multiple words in a cache block does not directly reduce the miss penalty. The miss penalty is the time required to fetch data from the main memory when a cache miss occurs.
d) None of the Above: This option is incorrect because option b) is the correct answer.
Conclusion:
The correct answer is option b) - More than one word is put in one cache block to exploit the spatial locality of reference in a program. By storing multiple words in a cache block, the cache can satisfy future memory accesses that are likely to be in nearby memory locations, thereby exploiting spatial locality.
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).