If the same 1 kilo Byte cache had been organized as a two-way set associative cache (other specifications remaining the same), then what would have been the average data access time for the loop?
Question
If the same 1 kilo Byte cache had been organized as a two-way set associative cache (other specifications remaining the same), then what would have been the average data access time for the loop?
Solution
To calculate the average data access time for a two-way set associative cache, we need to consider the cache hit time, cache miss penalty, and the cache hit rate.
-
Cache hit time: This is the time taken to access data when it is found in the cache. Let's assume the cache hit time is 1 ns.
-
Cache miss penalty: This is the time taken to access data when it is not found in the cache and needs to be fetched from the main memory. Let's assume the cache miss penalty is 10 ns.
-
Cache hit rate: This is the percentage of data accesses that result in a cache hit. Let's assume the cache hit rate is 90%.
Now, let's calculate the average data access time using the following formula:
Average access time = (Cache hit rate * Cache hit time) + ((1 - Cache hit rate) * Cache miss penalty)
Substituting the given values:
Average access time = (0.9 * 1 ns) + ((1 - 0.9) * 10 ns) = 0.9 ns + 0.1 * 10 ns = 0.9 ns + 1 ns = 1.9 ns
Therefore, the average data access time for the loop in a two-way set associative cache would be 1.9 ns.
Similar Questions
A small computer has a direct-mapped data cache of size 1 kilo Bytes. lts block size is 32 bytes, hit time is 2 processor clock cycles, and, the miss penalty is 20 processor clock cyclesWhile running a loop, in each iteration data (of size 1 byte) is accessed from memory addresses 6, 522, 768, 1028. If the loop iterates 10 times, compute the average data access time for the loop.
A computer with cache access time of 100 ns and hit ratio of 0·9 produces an average access time ofans.c)190nsb)200nsa)250nsd)none of these.This Question Is Marked For Review Previous Remove From Review Next
36)i) A computer with cache access time of 100 ns and hit ratio of 0·9 produces an average access time of ans. a)250ns c)190ns d)none of these. b)200ns
The effectiveness of the cache memory is based on the property of ________
What is the cache hit ratio. if memory access takes 20 ns with cache and 110 ns without it (cache uses a 10 ns memory)?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.