W3 A3 Detailed
W3 A3 Detailed
i
at
ah
1. Which one of the following is the most optimum way to reduce the cache miss penalty?
uw
A) Larger block size
(B) Multi-level caching
G
(C) Larger cache size
gy
(D) Higher Associativity
lo
A miss penalty refers to the extra time required to bring the data into the cache from the
main memory whenever there is a miss in the cache. Multilevel caches are one way to
no
improve cache performance by reducing the miss penalty.
ch
2. Compulsory misses in a cache can be reduced by _
Te
Cache misses at the first encounter of a block are called "compulsory misses." When we
have a larger block, the probability of a cache hit will increase, thereby reducing
In
compulsory misses.
an
3. A computer system has 16 MB byte addressable main memory and 64 KB 4-way set
di
associative cache memory with a block size of 256 bytes. Consider the following physical
addresses.
In
A1=0x42C84A, A2=0x5E485A
Which one of the following statements is FALSE?
(A) A1 and A2 are mapped to the same set.
(B) A1 and A2 have different tag values.
(C) A1 and A2 are mapped to a different set.
(D) A1 and A2 have different block offset
NPTEL Online Certification Course
NOC22-CS110: Multi-Core Computer Architecture -
Storage and Interconnects
Assignment-3: Detailed Solution
Indian Institute of Technology Guwahati
i
at
= 64 KB/ 256 B * 4
ah
= 2^6 * 2^10 / 2^8 * 2^2
uw
= 2^6
G
No. of bits representing Set Index = 6
gy
No. of bits representing Block Offset = 8 (since Block Size is 256 B)
lo
No. of bits representing Physical Address = 24 bits (since Main memory Size = 16MB)
no
No. of bits representing Tag = 24 - 6 - 8 = 10
ch
Te
Without changing the cache capacity and by reducing the block size only, compulsory misses
would be increased as only a small amount of data (small block) can be brought to the cache in
one cache miss. Since less data is brought and if the program shows spatial locality there will be
frequent cache misses. When block size reduces, it will accommodate more cache blocks in the
cache. This will spread the mapping more widely and reduce conflict misses.
5. Avoiding address translation from virtual to physical before cache indexing will __
NPTEL Online Certification Course
NOC22-CS110: Multi-Core Computer Architecture -
Storage and Interconnects
Assignment-3: Detailed Solution
Indian Institute of Technology Guwahati
(A) increase hit time
(B) decrease hit time
i
(C) increase miss rate
at
(D) increase miss penalty
ah
Address translation is the process of converting virtual addresses into physical addresses.
uw
To access the cache before indexing and tag comparison, it has to perform address
translation, which increases the hit time. Therefore, avoiding address translation will
G
reduce hit time.
gy
6. Which of the following is TRUE for inclusive cache?
lo
no
(A) L1 and L2 caches will not have any data in common
ch
(B) contents of L2 cache is a subset of contents L1 cache
If L1 cache is a subset of L2, it is called inclusive cache. Since L2 cache is larger than
itu
7. Assume an L1 cache with a hit rate of 70% and an L2 cache with a local miss rate of 6%.
In
If there are 1000 memory access initiated by CPU, then the number of access that will
find a hit in the L2 cache is ___________.
an
(A) 940
di
(B 700
In
(C) 18
(D) 282
Number of access that will miss in L1 cache = (Miss rate_L1 * # memory access to L1)
= 0.3*1000 = 300
NPTEL Online Certification Course
NOC22-CS110: Multi-Core Computer Architecture -
Storage and Interconnects
Assignment-3: Detailed Solution
Indian Institute of Technology Guwahati
Hence, there are 300 memory accesses to the L2 cache.
i
at
Number of misses in L2 cache = (Miss rate_L2 * # memory access to L2)
ah
= 0.06*300 = 18.
uw
Number of memory accesses that will hit in L2 = 300-18=282
G
gy
8. A cache has a hit time of 10 ns and hit rate of 60%. An optimization was made to
increase hit rate to 70% but the hit time was increased to 15 ns. The optimization resulted
lo
in a 10% reduction in average memory access time. Assume that the miss penalty is
no
unaffected by the optimization. The miss penalty of the cache (in ns) is _____.
ch
Te
(A) 115
(B 110
of
(C) 90
(D) 100
te
itu
Ans: 100
st
Hit time_old = 10 ns
In
AMAT_opt/AMAT_old = 0.9
i
at
9. Consider a memory system with L1 and L2 caches. From the CPU, there are 300 requests
ah
to the L1 cache. Among those requests, 260 are hit at L1. If there are 8 misses in the L2
cache, then the local miss rate at the L2 cache (rounded to one decimal place) is
uw
________.
G
gy
Correct answer: 0.2
lo
No of misses at L1 = No of requests at L2 = 300-260 = 40
No of misses at L2 = 8 no
Local miss rate at L2 = number of misses at L2 / total number of requests at L2
ch
= 8/40 = 0.2
Te
10. The average memory access time for a memory hierarchy system with one level of cache
of
and the main memory is 5 ns. The hit time and miss penalty of the cache are 2 ns and 100
ns, respectively. The hit rate of the cache (round off to two decimal places) is ______.
te
itu
Ans: 0.97
st