Back to Practice Computer Architecture

Memory Systems - Practice MCQs for CCAT

50 Questions Section C: Hardware Computer Architecture

Memory Systems Question Bank for C-CAT

Topic-wise Memory Systems MCQs for CDAC C-CAT preparation with answers and explanations.

Q1.
Which memory is fastest?
ARAM
BRegister
CHard Disk
DCache
Show Answer & Explanation

Correct Answer: B - Register

Hierarchy: Registers > Cache > RAM > SSD/HDD.

Q2.
Cache memory is placed:
AOutside computer
BAfter RAM
COn hard disk
DBetween CPU and RAM
Show Answer & Explanation

Correct Answer: D - Between CPU and RAM

Cache is between CPU and main memory for faster access.

Q3.
Cache hit means:
AData found in cache
BData not found
CCache is full
DCache error
Show Answer & Explanation

Correct Answer: A - Data found in cache

Cache hit: requested data is found in cache.

Q4.
Principle behind cache is:
AData is random
BMemory is unlimited
CData is sequential
DLocality of reference
Show Answer & Explanation

Correct Answer: D - Locality of reference

Cache exploits temporal and spatial locality of reference.

Q5.
Associative mapping in cache:
ABlock has fixed location
BBlock can go anywhere
CUses sets
DNo mapping
Show Answer & Explanation

Correct Answer: B - Block can go anywhere

Fully associative: any block can be in any cache line.

Q6.
Direct mapping:
ABlock has one fixed location
BBlock can go anywhere
CUses sets
DIs most flexible
Show Answer & Explanation

Correct Answer: A - Block has one fixed location

Direct mapped: each block has exactly one possible cache location.

Q7.
Write-through cache policy:
AWrites to cache and memory simultaneously
BWrites only to cache
CWrites only to memory
DNever writes
Show Answer & Explanation

Correct Answer: A - Writes to cache and memory simultaneously

Write-through updates both cache and main memory on every write.

Q8.
Write-back cache policy:
AWrites to memory immediately
BWrites to cache, updates memory later
CNever caches writes
DDiscards writes
Show Answer & Explanation

Correct Answer: B - Writes to cache, updates memory later

Write-back: writes to cache, updates memory only when evicted.

Q9.
SRAM vs DRAM:
ASRAM needs refresh
BDRAM is faster
CSame speed
DSRAM is faster, no refresh needed
Show Answer & Explanation

Correct Answer: D - SRAM is faster, no refresh needed

SRAM is faster and doesn't need refresh; used for cache. DRAM needs refresh.

Q10.
ROM is:
AVolatile
BTemporary storage
CWritable
DNon-volatile
Show Answer & Explanation

Correct Answer: D - Non-volatile

ROM (Read Only Memory) is non-volatile - retains data without power.

Q11.
Which memory is closest to the CPU and has the fastest access time?
AMain Memory (RAM)
BCache Memory
CRegisters
DVirtual Memory
Show Answer & Explanation

Correct Answer: C - Registers

Registers are located within the CPU and have the fastest access time, typically less than 1 nanosecond.

Q12.
What is the principle of locality that cache memory exploits?
APrograms access random memory locations
BPrograms always access memory sequentially
CPrograms tend to access the same or nearby memory locations repeatedly
DPrograms access memory in fixed patterns
Show Answer & Explanation

Correct Answer: C - Programs tend to access the same or nearby memory locations repeatedly

Locality principle states that programs tend to access the same data (temporal locality) or nearby data (spatial locality) repeatedly.

Q13.
What type of RAM needs to be refreshed periodically?
ASRAM
BDRAM
CROM
DFlash Memory
Show Answer & Explanation

Correct Answer: B - DRAM

DRAM (Dynamic RAM) stores data in capacitors that leak charge, requiring periodic refresh to maintain data.

Q14.
What is the purpose of the Memory Management Unit (MMU)?
AIncrease memory speed
BTranslate virtual addresses to physical addresses
CCompress data in memory
DEncrypt memory contents
Show Answer & Explanation

Correct Answer: B - Translate virtual addresses to physical addresses

The MMU translates virtual addresses used by programs to physical addresses in actual memory.

Q15.
In a direct-mapped cache, where can a memory block be placed?
AIn any cache line
BRandomly in any line
CIn one of two possible lines
DIn one specific cache line only
Show Answer & Explanation

Correct Answer: D - In one specific cache line only

In direct-mapped cache, each memory block can only go to one specific cache line determined by its address.

Q16.
What is the cache replacement policy LRU?
ALeast Recently Used
BLast Recently Used
CLongest Running Update
DLatest Read Update
Show Answer & Explanation

Correct Answer: A - Least Recently Used

LRU (Least Recently Used) replaces the cache block that has not been accessed for the longest time.

Q17.
What is virtual memory?
AMemory in the cloud
BMemory inside the CPU
CUsing hard disk space as an extension of RAM
DEncrypted memory
Show Answer & Explanation

Correct Answer: C - Using hard disk space as an extension of RAM

Virtual memory uses secondary storage (hard disk) to extend the apparent size of physical RAM.

Q18.
What is a page fault?
ARequired page is not in physical memory
BError in memory chip
CMemory is full
DPage size mismatch
Show Answer & Explanation

Correct Answer: A - Required page is not in physical memory

A page fault occurs when a program accesses a page that is not currently in physical memory, requiring it to be loaded from disk.

Q19.
What is the typical hierarchy of memory from fastest to slowest?
ARAM > Cache > Registers > Hard Disk
BRegisters > Cache > RAM > Hard Disk
CCache > Registers > RAM > Hard Disk
DHard Disk > RAM > Cache > Registers
Show Answer & Explanation

Correct Answer: B - Registers > Cache > RAM > Hard Disk

The memory hierarchy from fastest to slowest is: Registers > Cache > RAM > Hard Disk/SSD.

Q20.
What is the purpose of the dirty bit in cache?
AIndicates the cache line has been modified and differs from main memory
BIndicates the cache line is corrupted
CIndicates the cache line is empty
DIndicates the cache line is locked
Show Answer & Explanation

Correct Answer: A - Indicates the cache line has been modified and differs from main memory

The dirty bit indicates that the cache line has been modified (written to) and needs to be written back to main memory before replacement.

Q21.
What is set-associative cache mapping?
ASame as direct mapping
BSame as fully associative
CCombination of direct and associative - cache divided into sets
DRandom mapping
Show Answer & Explanation

Correct Answer: C - Combination of direct and associative - cache divided into sets

Set-associative cache divides cache into sets, where a block maps to a specific set but can go in any line within that set.

Q22.
What is cache miss penalty?
ACost of cache hardware
BNumber of cache misses
CTime taken to load data from main memory on a miss
DCache line size
Show Answer & Explanation

Correct Answer: C - Time taken to load data from main memory on a miss

Cache miss penalty is the additional time required to fetch data from main memory when data is not found in cache.

Q23.
EEPROM stands for:
AElectronic Erasable Program ROM
BElectrically Erasable Programmable ROM
CExtended Enhanced Program ROM
DExternal Erasable Program ROM
Show Answer & Explanation

Correct Answer: B - Electrically Erasable Programmable ROM

EEPROM is Electrically Erasable Programmable ROM - can be erased and reprogrammed using electrical signals.

Q24.
What is temporal locality?
AAccessing nearby memory locations
BRandom memory access
CSequential memory access
DRecently accessed data is likely to be accessed again soon
Show Answer & Explanation

Correct Answer: D - Recently accessed data is likely to be accessed again soon

Temporal locality means that data that has been recently accessed is likely to be accessed again in the near future.

Q25.
What is spatial locality?
ARecently accessed data will be accessed again
BCPU location in memory
CTime-based memory access
DData near recently accessed locations is likely to be accessed soon
Show Answer & Explanation

Correct Answer: D - Data near recently accessed locations is likely to be accessed soon

Spatial locality means that if a memory location is accessed, nearby memory locations are likely to be accessed soon.

Q26.
Which level of cache memory is typically the fastest but smallest in size?
AL1 cache
BL2 cache
CL3 cache
DMain memory
Show Answer & Explanation

Correct Answer: A - L1 cache

L1 cache is the fastest and smallest cache, located closest to the CPU core. It typically has a size of 32KB-64KB and access time of 1-2 clock cycles.

Q27.
What is a cache hit?
AWhen requested data is found in cache
BWhen requested data is not found in cache
CWhen cache memory is full
DWhen cache is being flushed
Show Answer & Explanation

Correct Answer: A - When requested data is found in cache

A cache hit occurs when the CPU requests data and that data is found in the cache memory, allowing for faster access compared to fetching from main memory.

Q28.
In the memory hierarchy, which has the largest storage capacity?
ARegisters
BCache
CMain memory (RAM)
DSecondary storage (Hard disk)
Show Answer & Explanation

Correct Answer: D - Secondary storage (Hard disk)

The memory hierarchy from smallest to largest capacity is: Registers → Cache → Main Memory (RAM) → Secondary Storage. Secondary storage (hard disks, SSDs) has the largest capacity but slowest access time.

Q29.
SRAM (Static RAM) is primarily used for:
AMain memory
BVirtual memory
CSecondary storage
DCache memory
Show Answer & Explanation

Correct Answer: D - Cache memory

SRAM is used for cache memory because it is faster than DRAM (no refresh needed), though it is more expensive and has lower density. Each SRAM cell uses 6 transistors.

Q30.
What is the main difference between SRAM and DRAM?
ASRAM is volatile while DRAM is non-volatile
BDRAM needs periodic refresh while SRAM does not
CSRAM needs periodic refresh while DRAM does not
DSRAM is cheaper than DRAM
Show Answer & Explanation

Correct Answer: B - DRAM needs periodic refresh while SRAM does not

DRAM stores data as charge in capacitors which leak over time, requiring periodic refresh. SRAM uses flip-flops to store data and does not need refresh, making it faster but more expensive.

Q31.
In a direct-mapped cache, each memory block maps to:
AAny cache line
BExactly one specific cache line
CTwo possible cache lines
DA set of cache lines
Show Answer & Explanation

Correct Answer: B - Exactly one specific cache line

In a direct-mapped cache, each memory block can only be placed in one specific cache line, determined by (block address) mod (number of cache lines). This is simple but can cause conflicts.

Q32.
Which cache mapping technique allows a memory block to be placed in any cache line?
ADirect mapping
BFully associative mapping
CSet-associative mapping
DSector mapping
Show Answer & Explanation

Correct Answer: B - Fully associative mapping

In fully associative mapping, a memory block can be placed in any cache line. This provides the most flexibility and lowest conflict miss rate but requires comparing the tag with all cache entries.

Q33.
What is the hit ratio if 90 out of 100 memory accesses are found in cache?
A0.10
B90
C9.0
D0.90
Show Answer & Explanation

Correct Answer: D - 0.90

Hit ratio = Number of cache hits / Total memory accesses = 90/100 = 0.90 or 90%. This means 90% of memory accesses are satisfied by the cache.

Q34.
DDR4 SDRAM offers which improvement over DDR3?
ALower data transfer rates
BHigher operating voltage
CHigher data transfer rates and lower voltage
DFewer memory banks
Show Answer & Explanation

Correct Answer: C - Higher data transfer rates and lower voltage

DDR4 offers higher data transfer rates (up to 3200 MT/s vs 2133 MT/s for DDR3), lower voltage (1.2V vs 1.5V for DDR3), and higher density modules compared to DDR3.

Q35.
Virtual memory allows:
APrograms to execute faster than physical memory allows
BPrograms larger than physical memory to execute
CCache to be used as main memory
DROM to be used as RAM
Show Answer & Explanation

Correct Answer: B - Programs larger than physical memory to execute

Virtual memory uses secondary storage (disk) as an extension of main memory, allowing programs larger than the available physical RAM to execute by swapping pages between RAM and disk.

Q36.
What is a page fault?
AAn error in the page table
BWhen the page size is too large
CWhen a requested page is not in physical memory
DWhen the page table overflows
Show Answer & Explanation

Correct Answer: C - When a requested page is not in physical memory

A page fault occurs when a program accesses a virtual page that is not currently loaded in physical memory (RAM). The OS must then load the required page from secondary storage.

Q37.
Which cache replacement policy replaces the block that has not been used for the longest time?
AFIFO
BLRU (Least Recently Used)
CRandom
DLFU (Least Frequently Used)
Show Answer & Explanation

Correct Answer: B - LRU (Least Recently Used)

LRU (Least Recently Used) replacement policy evicts the cache block that has not been accessed for the longest period of time, based on the principle of temporal locality.

Q38.
The effective (average) memory access time depends on:
AHit ratio, cache access time, and main memory access time
BOnly main memory access time
COnly cache access time
DOnly the hit ratio
Show Answer & Explanation

Correct Answer: A - Hit ratio, cache access time, and main memory access time

Effective access time = (Hit ratio × Cache access time) + (Miss ratio × Main memory access time). All three factors determine the average time to access data.

Q39.
ROM (Read-Only Memory) is:
AVolatile memory
BFaster than SRAM
CNon-volatile memory
DUsed for cache
Show Answer & Explanation

Correct Answer: C - Non-volatile memory

ROM is non-volatile memory that retains its contents even when power is turned off. It is used to store firmware, BIOS, and other permanent data.

Q40.
In a 2-way set-associative cache, each set contains:
A2 cache lines
B1 cache line
C4 cache lines
DAll cache lines
Show Answer & Explanation

Correct Answer: A - 2 cache lines

In a 2-way set-associative cache, each set contains 2 cache lines. A memory block maps to a specific set but can be placed in either of the 2 lines within that set.

Q41.
What is the purpose of the TLB (Translation Lookaside Buffer)?
ATo store frequently accessed data
BTo manage cache coherence
CTo cache page table entries for faster virtual-to-physical address translation
DTo buffer I/O operations
Show Answer & Explanation

Correct Answer: C - To cache page table entries for faster virtual-to-physical address translation

The TLB is a specialized cache that stores recent virtual-to-physical page address translations. It speeds up memory access by avoiding repeated page table lookups in main memory.

Q42.
Which type of memory is used for BIOS storage in modern computers?
ASRAM
BDRAM
CFlash memory (EEPROM)
DMagnetic disk
Show Answer & Explanation

Correct Answer: C - Flash memory (EEPROM)

Modern computers use Flash memory (a type of EEPROM) to store BIOS/UEFI firmware, as it is non-volatile and can be electrically erased and reprogrammed for firmware updates.

Q43.
Spatial locality in memory access refers to:
AAccessing the same memory location repeatedly
BSequential instruction execution only
CRandom memory access pattern
DAccessing memory locations near recently accessed locations
Show Answer & Explanation

Correct Answer: D - Accessing memory locations near recently accessed locations

Spatial locality means that if a memory location is accessed, nearby memory locations are likely to be accessed soon. This principle is exploited by fetching entire cache blocks/lines.

Q44.
What is the write-back policy in cache?
AData is written only to cache and updated to main memory when the cache line is replaced
BData is written to both cache and main memory simultaneously
CData is written only to main memory
DData is never written to cache
Show Answer & Explanation

Correct Answer: A - Data is written only to cache and updated to main memory when the cache line is replaced

In write-back policy, data is written only to the cache. The modified cache line (dirty block) is written to main memory only when it is evicted/replaced, reducing memory bus traffic.

Q45.
The write-through cache policy means:
AData is written only to cache
BData is written to both cache and main memory simultaneously
CData bypasses the cache entirely
DData is written to main memory first, then cache
Show Answer & Explanation

Correct Answer: B - Data is written to both cache and main memory simultaneously

In write-through policy, every write to cache is simultaneously written to main memory. This ensures consistency between cache and memory but generates more memory bus traffic.

Q46.
What does ECC memory provide?
AFaster access times
BLower power consumption
CHigher memory density
DError detection and correction capability
Show Answer & Explanation

Correct Answer: D - Error detection and correction capability

ECC (Error-Correcting Code) memory can detect and correct single-bit errors, and detect (but not correct) multi-bit errors. It is used in servers and critical systems for data integrity.

Q47.
Temporal locality in memory access means:
ARecently accessed locations are likely to be accessed again soon
BAccessing nearby memory locations
CAccessing memory in a fixed pattern
DAccessing memory at specific time intervals
Show Answer & Explanation

Correct Answer: A - Recently accessed locations are likely to be accessed again soon

Temporal locality means that if a memory location is accessed at one point in time, it is likely to be accessed again in the near future. This is exploited by keeping recently used data in cache.

Q48.
What is the typical access time order from fastest to slowest?
ARegister → Cache → RAM → Disk
BCache → Register → RAM → Disk
CRAM → Cache → Register → Disk
DRegister → RAM → Cache → Disk
Show Answer & Explanation

Correct Answer: A - Register → Cache → RAM → Disk

The access time order from fastest to slowest is: Registers (< 1ns) → Cache (1-10ns) → RAM (50-100ns) → Disk (5-10ms). This matches the memory hierarchy.

Q49.
Interleaved memory improves performance by:
AUsing faster memory chips
BIncreasing the word size
CDividing memory into modules that can be accessed in parallel
DUsing ECC codes
Show Answer & Explanation

Correct Answer: C - Dividing memory into modules that can be accessed in parallel

Memory interleaving divides memory into multiple modules (banks) and distributes consecutive addresses across them. This allows overlapping of access times, improving effective bandwidth.

Q50.
What is a cache miss penalty?
AThe cost of finding data in cache
BThe time to write data to cache
CThe additional time taken to fetch data from main memory when it is not in cache
DThe time to flush the cache
Show Answer & Explanation

Correct Answer: C - The additional time taken to fetch data from main memory when it is not in cache

Cache miss penalty is the extra time required to fetch the requested data from main memory (or a lower level cache) when it is not found in the cache, compared to a cache hit.

Showing 1-10 of 50 questions