Page 52 - Computer_Science_F5
P. 52
Exercise 1.9 3. How does the principle of
locality of reference influence the
1. Explain how cache memory effectiveness of cache memory? Chapter One: Computer architecture
improves the performance of a Provide examples of spatial and
computer system. Provide an temporal locality.
FOR ONLINE READING ONLY
example to illustrate its role in
speeding up data access. 4. Discuss the concept of cache hit
2. Describe the difference between and cache miss. Why are cache
cache memory and main memory hits desirable, and how do cache
(RAM). Why is cache memory misses impact system performance?
faster but smaller compared to Provide real-world analogies to
RAM? explain these concepts
Memory mapping
Memory mapping refers to a technique used to bring data from lower level of memory
to a higher level of memory. As seen in Figure 1.41, cache memory mapping is the
technique used to bring data from main memory into the cache memory, determining
where in the cache the data should be placed. On the other hand, virtual memory
mapping is the technique used to bring data from secondary storage to the main
memory.
Virtual memory maping
Cache maping
Secondary
storage
Words Blocks Pages
Processor Cache
Main memory
Figure 1.41: Computer memory mapping
Cache memory mapping
In cache memory mapping, a block from main memory is directly copied to the
cache, facilitating faster data access. This process uses three techniques: direct
mapping, set associative mapping, and fully associative mapping.
43
Student’s Book Form Five
Computer Science Form 5.indd 43 23/07/2024 12:32