Question types seen repeatedly in past papers. More stars means more frequent.
★★★
Number of tag bits / tag-directory size
Given cache size, block size, associativity, address width. Compute offset, index, tag; multiply by lines and add valid/dirty bits.
★★★
Hit/miss trace for an address sequence
Simulate direct-mapped or k-way LRU for ~8–12 addresses; count misses or find final cache content. (Use the simulator below!)
★★★
AMAT / effective access time
Single or two-level; sometimes with write-through/back mix or different read/write ratio.
★★★
CPI / speedup with cache
Base CPI + stalls from instruction & data misses; compare two cache configs.
★★★
Which bits map to which field / conceptual
Which address bits select the set; effect of increasing block size or associativity on miss types; write-back vs through statements.
Ratings are approximate, based on recurring patterns in past GATE CSE papers.
Previous year questions
22 real questions from the official GATE CSE papers (2012 to 2025), newest first, each with the official answer key and a worked solution. Questions are the property of the GATE organising institutes; this copy is for your personal study.
22 questions · 0 correct of 0 attempted · marks 0 / 37
Year:
GATE 2025 CS1 · Q36MCQ2 marks
Consider a memory system with 1M bytes of main memory and 16K bytes of cache memory. Assume that the processor generates 20-bit memory addresses, 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 = 210, 1M = 220.]
GATE 2025 CS2 · Q39MCQ2 marks
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 is the CORRECT option for the sizes of the main memory and the cache memory in this system (byte addressable), respectively?
GATE 2025 CS1 · Q53NAT2 marks
A computer has a memory hierarchy of two-level cache (L1 and L2) and a main memory. The processor first looks into L1; if not found it goes to L2; if that fails it goes to main memory, where the data is definitely available. From the figure: L1 cache: hit rate 95%, access time 10 ns. L2 cache: hit rate 85%, access time (including L1 miss penalty) 20 ns. Main memory: access time (including L1 and L2 miss penalty) 200 ns. The average memory access time in ns is ______ (rounded off to two decimal places).
GATE 2025 CS2 · Q55NAT2 marks
A computing system has two levels of cache (L1 and L2) and a main memory. The L1 access time is 1 ns and its hit rate is 90%. For L2, the hit rate is 80% and the miss penalty for transferring data from L2 to L1 is 10 ns. The miss penalty for data to be transferred from main memory to L2 is 100 ns. The average memory access time in ns is ______ (rounded off to one decimal place).
GATE 2024 CS1 · Q53MSQ2 marks
Consider two set-associative cache memory architectures: WBC, which uses the write back policy, and WTC, which uses the write through policy. Both use the LRU block replacement policy. The cache memory is connected to the main memory. Which of the following statements is/are TRUE?
One or more options may be correct. Select all that apply, then submit.
GATE 2024 CS1 · Q56NAT2 marks
A given program has 25% load/store instructions. Suppose the ideal CPI without any memory stalls is 2. The program exhibits 2% miss rate on instruction cache and 8% miss rate on data cache. The miss penalty is 100 cycles. The speedup (rounded off to two decimal places) achieved with a perfect cache (i.e. with NO data or instruction cache misses) is ______.
GATE 2023 · Q64NAT2 marks
An 8-way set associative cache of size 64 KB (1 KB = 1024 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 ______.
GATE 2022 · Q24MSQ1 mark
Let WB and WT be two set associative cache organizations that use the 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?
One or more options may be correct. Select all that apply, then submit.
GATE 2022 · Q33NAT1 mark
A cache memory that has a hit rate of 0.8 has an access latency 10 ns and miss penalty 100 ns. An optimization is done on the cache to reduce the miss rate. However, the optimization results in an increase of cache access latency to 15 ns, whereas the miss penalty is not affected. The minimum hit rate (rounded off to two decimal places) needed after the optimization such that it should not increase the average memory access time is ______.
GATE 2022 · Q54MSQ2 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 (PQRSPQRS…). Hence there are 40 accesses to the data cache. The data cache is initially empty and no other data words are accessed. The addresses of the first bytes of P, Q, R and S are 0xA248, 0xC28A, 0xCA8A and 0xA262 respectively. Which of the following statements is/are TRUE?
One or more options may be correct. Select all that apply, then submit.
GATE 2021 Set 1 · Q22NAT1 mark
Consider a computer system with a byte-addressable primary memory of size 232 bytes. Assume the computer system has a direct-mapped cache of size 32 KB (1 KB = 210 bytes), and each cache block is of size 64 bytes. The size of the tag field is ______ bits.
GATE 2020 · Q21NAT1 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 ______.
GATE 2020 · Q30MCQ2 marks
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?
GATE 2019 Set 2 · Q1MCQ1 mark
A certain processor uses a fully associative cache of size 16 kB. The cache block size is 16 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?
GATE 2018 · Q34MCQ2 marks
The size of the physical address space of a processor is 2P bytes. The word length is 2W bytes. The capacity of cache memory is 2N bytes. The size of each cache block is 2M words. For a K-way set-associative cache memory, the length (in number of bits) of the tag field is
GATE 2017 Set 1 · Q25NAT1 mark
Consider a two-level cache hierarchy with L1 and L2 caches. An application incurs 1.4 memory accesses per instruction on average. For this application, the miss rate of L1 cache is 0.1; the L2 cache experiences, on average, 7 misses per 1000 instructions. The miss rate of L2 expressed correct to two decimal places is ______.
GATE 2017 Set 1 · Q51NAT2 marks
Consider a 2-way set associative cache with 256 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) is repeated 10 times. The number of conflict misses experienced by the cache is ______.
GATE 2017 Set 1 · Q54NAT2 marks
A cache memory unit with capacity of N words and block size of B words is to be designed. If it is designed as a direct mapped cache, the length of the TAG field is 10 bits. If the cache unit is now designed as a 16-way set-associative cache, the length of the TAG field is ______ bits.
GATE 2014 Set 1 · Q44MCQ2 marks
An access sequence of cache block addresses is of length N and contains n unique block addresses. The number of unique block addresses between two consecutive accesses to the same block address is bounded above by k. What is the miss ratio if the access sequence is passed through a cache of associativity A ≥ k exercising least-recently-used replacement policy?
GATE 2013 Code A · Q20MCQ1 mark
In a k-way set associative cache, the cache is divided into v sets, each of which consists of k lines. The lines of a set are placed in sequence one after another. The lines in set s are sequenced before the lines in set (s + 1). The main memory blocks are numbered 0 onwards. The main memory block numbered j must be mapped to any one of the cache lines from
GATE 2012 Code A · Q54MCQ2 marks
A computer has a 256 KByte, 4-way set associative, write back data cache with block size of 32 Bytes. The processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit. The number of bits in the tag field of an address is
GATE 2012 Code A · Q55MCQ2 marks
(Same cache as the previous question: 256 KB, 4-way, 32-byte blocks, 32-bit addresses; each tag directory entry has the address tag plus 2 valid bits, 1 modified bit and 1 replacement bit.) The size of the cache tag directory is
Extra practice (GATE-style)
More questions in the same formats, each with a full solution. These are original questions written to follow the patterns above, not past-paper questions.
6 questions · 0 correct of 0 attempted · marks 0 / 10
Q1NAT1 mark
A 32-bit byte-addressable machine has a 32 KB, 8-way set-associative cache with 64-byte blocks. The number of tag bits is ____.
Q2NAT2 marks
A direct-mapped, write-back cache is 16 KB with 32-byte lines on a 32-bit address. Each line has a valid and a dirty bit. The total size of the tag store (tag + valid + dirty) in bits is ____.
Q3NAT2 marks
A 2-way set-associative cache with 4 lines (2 sets), LRU replacement, one word per block, receives block addresses 0, 2, 4, 0, 2, 4, 1, 3, 1. The number of hits is ____.
Q4NAT2 marks
L1 hit time 1 ns, L1 miss rate 5%. L2 hit time 10 ns, L2 local miss rate 20%. Main memory access 100 ns. Accesses are hierarchical. The average memory access time in ns is ____.
Q5MCQ2 marks
Base CPI is 1.0. Every instruction makes one instruction fetch (miss rate 2%); 30% of instructions are loads/stores (data miss rate 4%). The miss penalty is 50 cycles. The effective CPI is
Q6MCQ1 mark
Which statement about write policies is TRUE?
Common traps
Block size is in bytes but addresses may be word-addressed, convert first.
Tag-directory size must include valid bit (and dirty bit if write-back).
In set-associative mapping, index uses #sets not #lines.
Larger blocks ↓ compulsory misses but ↑ miss penalty and may ↑ conflict misses.
Pick hierarchical vs simultaneous AMAT formula based on the wording.