Cache Mapping questions — page 1 of 2

Q38

GATE CS 2026 CS-1Memory HierarchyMCQ2 marks−2/3 if wrong
The size of the physical address space of a processor is 2322^{32} bytes. The capacity of a cache memory unit is 2232^{23} bytes. The cache block size is 128 bytes. The cache memory unit can be built as a direct mapped cache or as a KK-way set-associative cache, where K=2LK = 2^L and L∈{1,2,3}L \in \{1, 2, 3\}. Let the length of the TAG field be MM bits for the direct mapped cache, and NN bits for the set-associative cache.

Which one of the following options is true?
Show answer without attempting

Answer: A

Q52

GATE CS 2026 CS-2Memory HierarchyMSQ2 marks
Consider a system with a processor and a 4 KB direct mapped cache with block size of 16 bytes. The system has a 16 MB physical memory. Four words P, Q, R, and S are accessed by the processor in the same order 10 times. That is, there are a total of 40 memory references in the sequence P, Q, R, S, P, Q, R, S,…

Assume that the cache memory is initially empty. The physical addresses of the words are given below (1 word = 1 byte).

P: 0x845B32, Q: 0x845B26, R: 0x845B36, S: 0x846B32

Which of the following statements is/are true?

Note: 1K=2101\text{K}=2^{10} and 1M=2201\text{M}=2^{20}
More than one option can be correct.
Show answer without attempting

Answer: A, B

Q56

GATE CS 2026 CS-2Memory HierarchyNAT2 marks
Consider a system with 1 MB physical memory and a word length of 1 byte. The system uses a direct mapped cache, with block numbers starting from 0. The word with physical address 0xA2C28 is mapped to the cache block number 17610176_{10}. The maximum possible size of the cache (in KB) for this configuration is ___________. (answer in integer)

Note: 1K=2101\text{K}=2^{10} and 1M=2201\text{M}=2^{20}
Show answer without attempting

Answer: 128

Q36

GATE CS 2025 CS-1Memory HierarchyMCQ2 marks−2/3 if wrong
Consider a memory system with 1M bytes of main memory and 16K bytes of cache memory. Assume that the processor generates 20-bit memory address, and the cache block size is 16 bytes. If the cache uses direct mapping, how many bits will be required to store all the tag values? [Assume memory is byte addressable, 1K=2101\text{K}=2^{10}, 1M=2201\text{M}=2^{20}.]
Show answer without attempting

Answer: A

Q53

GATE CS 2025 CS-1Memory HierarchyNAT2 marks
A computer has a memory hierarchy consisting of two-level cache (L1 and L2) and a main memory. If the processor needs to access data from memory, it first looks into L1 cache. If the data is not found in L1 cache, it goes to L2 cache. If it fails to get the data from L2 cache, it goes to main memory, where the data is definitely available. Hit rates and access times of various memory units are shown in the figure. The average memory access time in nanoseconds (ns) is ________. (rounded off to two decimal places)
Question figure
Show answer without attempting

Answer: 11.83 to 11.87

Q39

GATE CS 2025 CS-2Memory HierarchyMCQ2 marks−2/3 if wrong
For a direct-mapped cache, 4 bits are used for the tag field and 12 bits are used to index into a cache block. The size of each cache block is one byte. Assume that there is no other information stored for each cache block.

Which ONE of the following is the CORRECT option for the sizes of the main memory and the cache memory in this system (byte addressable), respectively?
Show answer without attempting

Answer: A

Q55

GATE CS 2025 CS-2Memory HierarchyNAT2 marks
Given a computing system with two levels of cache (L1 and L2) and a main memory. The first level (L1) cache access time is 1 nanosecond (ns) and the “hit rate” for L1 cache is 90% while the processor is accessing the data from L1 cache. Whereas, for the second level (L2) cache, the “hit rate” is 80% and the “miss penalty” for transferring data from L2 cache to L1 cache is 10 ns. The “miss penalty” for the data to be transferred from main memory to L2 cache is 100 ns.

Then the average memory access time in this system in nanoseconds is ___________ . (rounded off to one decimal place)
Show answer without attempting

Answer: 4.0

Q53

GATE CS 2024 CS-1Memory HierarchyMSQ2 marks
Consider two set-associative cache memory architectures: WBC, which uses the write back policy, and WTC, which uses the write through policy. Both of them use the LRU (Least Recently Used) block replacement policy. The cache memory is connected to the main memory. Which of the following statements is/are TRUE?
More than one option can be correct.
Show answer without attempting

Answer: B, C

Q64

GATE CS 2023 CSMemory HierarchyNAT2 marks
An 8-way set associative cache of size 64 KB (1 KB=1024 bytes1 \text{ KB} = 1024 \text{ bytes}) is used in a system with 32-bit address. The address is sub-divided into TAG, INDEX, and BLOCK OFFSET.

The number of bits in the TAG is ____________.
Show answer without attempting

Answer: 19

Q24

GATE CS 2022 CSMemory HierarchyMSQ1 mark
Let WB and WT be two set associative cache organizations that use LRU algorithm for cache block replacement. WB is a write back cache and WT is a write through cache. Which of the following statements is/are FALSE?
More than one option can be correct.
Show answer without attempting

Answer: A, B, D

Q54

GATE CS 2022 CSMemory HierarchyMSQ2 marks
Consider a system with 2 KB direct mapped data cache with a block size of 64 bytes. The system has a physical address space of 64 KB and a word length of 16 bits. During the execution of a program, four data words P, Q, R, and S are accessed in that order 10 times (i.e., PQRSPQRS...). Hence, there are 40 accesses to data cache altogether. Assume that the data cache is initially empty and no other data words are accessed by the program. The addresses of the first bytes of P, Q, R, and S are 0xA248, 0xC28A, 0xCA8A, and 0xA262, respectively. For the execution of the above program, which of the following statements is/are TRUE with respect to the data cache?
More than one option can be correct.
Show answer without attempting

Answer: A, B, D

Q22

GATE CS 2021 CS-1Memory HierarchyNAT1 mark
Consider a computer system with a byte-addressable primary memory of size 2322^{32} bytes. Assume the computer system has a direct-mapped cache of size 32 KB (1 KB = 2102^{10} bytes), and each cache block is of size 64 bytes.
The size of the tag field is ______ bits.
Show answer without attempting

Answer: 17

Q19

GATE CS 2021 CS-2Memory HierarchyNAT1 mark
Consider a set-associative cache of size 2KB (1KB=2101\text{KB} = 2^{10} bytes) with cache block size of 64 bytes. Assume that the cache is byte-addressable and a 32-bit address is used for accessing the cache. If the width of the tag field is 22 bits, the associativity of the cache is ____________.
Show answer without attempting

Answer: 2

Q27

GATE CS 2021 CS-2Memory HierarchyMCQ2 marks−2/3 if wrong
Assume a two-level inclusive cache hierarchy, L1 and L2, where L2 is the larger of the two. Consider the following statements.

S1S_1: Read misses in a write through L1 cache do not result in writebacks of dirty lines to the L2.
S2S_2: Write allocate policy must be used in conjunction with write through caches and no-write allocate policy is used with writeback caches.

Which of the following statements is correct?
Show answer without attempting

Answer: A

Q21

GATE CS 2020 CSMemory HierarchyNAT1 mark
A direct mapped cache memory of 1 MB has a block size of 256 bytes. The cache has an access time of 3 ns and a hit rate of 94%. During a cache miss, it takes 20 ns to bring the first word of a block from the main memory, while each subsequent word takes 5 ns. The word size is 64 bits. The average memory access time in ns (round off to 1 decimal place) is __________.
Show answer without attempting

Answer: 13.3 OR 13.5

Q30

GATE CS 2020 CSMemory HierarchyMCQ2 marks−2/3 if wrong
A computer system with a word length of 32 bits has a 16 MB byte-addressable main memory and a 64 KB, 4-way set associative cache memory with a block size of 256 bytes. Consider the following four physical addresses represented in hexadecimal notation.

A1 = 0x42C8A4, A2 = 0x546888, A3 = 0x6A289C, A4 = 0x5E4880

Which one of the following is TRUE?
Show answer without attempting

Answer: B

Q1

GATE CS 2019 CSMemory HierarchyMCQ1 mark−1/3 if wrong
A certain processor uses a fully associative cache of size 16 kB16\text{ kB}. The cache block size is 1616 bytes. Assume that the main memory is byte addressable and uses a 32-bit address. How many bits are required for the Tag and the Index fields respectively in the addresses generated by the processor?
Show answer without attempting

Answer: D

Q34

GATE CS 2018 CSMemory HierarchyMCQ2 marks−2/3 if wrong
The size of the physical address space of a processor is 2P2^P bytes. The word length is 2W2^W bytes. The capacity of cache memory is 2N2^N bytes. The size of each cache block is 2M2^M words. For a KK-way set-associative cache memory, the length (in number of bits) of the tag field is
Show answer without attempting

Answer: B

Q25

GATE CS 2017 CS-1Memory HierarchyNAT1 mark
Consider a two-level cache hierarchy with L1 and L2 caches. An application incurs 1.41.4 memory accesses per instruction on average. For this application, the miss rate of L1 cache is 0.10.1; the L2 cache experiences, on average, 77 misses per 10001000 instructions. The miss rate of L2 expressed correct to two decimal places is ____________.
Show answer without attempting

Answer: 0.05

Q51

GATE CS 2017 CS-1Memory HierarchyNAT2 marks
Consider a 2-way set associative cache with 256256 blocks and uses LRU replacement. Initially the cache is empty. Conflict misses are those misses which occur due to contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks

(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129)(0, 128, 256, 128, 0, 128, 256, 128, 1, 129, 257, 129, 1, 129, 257, 129)

is repeated 1010 times. The number of conflict misses experienced by the cache is ____________.
Show answer without attempting

Answer: 76.0

0/200 correct0 marks

Related topics in Memory Hierarchy