Computer Architecture
Introduction
Explore how computer hardware and instruction-set designs affect execution speed, scalability and efficiency.
Topic-Wise Overview
Digital Hardware
Logic, transistors and hardware description languages
Instruction Sets
Instruction formats, addressing and RISC versus CISC
Pipelines
Scalar pipelines, dependencies and instruction scheduling
Advanced Execution
VLIW, dynamic pipelines, register renaming and speculative execution
Parallel Architecture
Multithreading, cache coherence and data-level parallelism
Study Guidance
Study the complete collection of 200 Computer Architecture MCQs below, organized into four sets of 50. Each question includes four answer choices, the correct answer, and a brief explanation. Topics include digital logic, ISA design, performance, memory and cache hierarchies, pipelining, out-of-order execution, register renaming, multithreading, coherence, multicore systems, GPUs, interconnects, energy efficiency, and reliability.
Explore Other Subjects
Browse Computer Science subjects
Computer Architecture MCQs — Set 1 (Questions 1–50)
Choose an answer and reveal the explanation.
Question 1. When does a two-input AND gate produce an output of 1?
- Both binary inputs are one
- Either input is zero
- Inputs differ
- Both are zero
Show correct answer and explanation
Correct answer: A. Both binary inputs are one
An AND gate outputs 1 only when both inputs are 1. Its truth table gives 0 for the input pairs 00, 01, and 10.
Question 2. When does a two-input OR gate produce an output of 0?
- Either input is one
- Both inputs are zero
- Inputs differ
- Both are one
Show correct answer and explanation
Correct answer: B. Both inputs are zero
An OR gate outputs 0 only if both inputs are 0. Any input of 1 makes the two-input OR output 1.
Question 3. What is the XOR output for binary inputs 1 and 0?
- 0
- 2
- 1
- Undefined
Show correct answer and explanation
Correct answer: C. 1
XOR outputs 1 when its two inputs differ. Since 1 and 0 are different, 1 XOR 0 = 1.
Question 4. What is the result of applying NOT to binary 1?
- 1
- 2
- Undefined
- 0
Show correct answer and explanation
Correct answer: D. 0
NOT reverses a single binary input: NOT 1 = 0, while NOT 0 = 1.
Question 5. Why is a NAND gate called a universal gate?
- It can implement every Boolean function with suitable connections
- It requires no power
- It always has one input
- It performs only addition
Show correct answer and explanation
Correct answer: A. It can implement every Boolean function with suitable connections
NAND is functionally complete: NOT can be formed by joining its inputs, and combinations of NAND gates can implement AND, OR and any Boolean function.
Question 6. What determines the output of a combinational circuit?
- Past inputs only
- Present inputs
- Disk space
- Clock history exclusively
Show correct answer and explanation
Correct answer: B. Present inputs
A combinational circuit has no stored internal state, so its output is a function of its current inputs. A two-input adder is a common example.
Question 7. What factors can determine the output of a sequential circuit?
- Only present inputs always
- Only room temperature
- Stored state and current inputs
- Only memory capacity
Show correct answer and explanation
Correct answer: C. Stored state and current inputs
A sequential circuit can depend on the current inputs and stored state from previous clock events. Flip-flops provide the memory.
Question 8. How much information can one binary flip-flop store?
- One byte exactly
- A disk sector
- An entire program
- One bit
Show correct answer and explanation
Correct answer: D. One bit
A flip-flop has two stable states and therefore stores one bit, either 0 or 1. Several flip-flops can form a multibit register.
Question 9. What is the primary function of a multiplexer?
- One of several data inputs
- All outputs simultaneously
- Only a cache set
- A CPU core
Show correct answer and explanation
Correct answer: A. One of several data inputs
A multiplexer uses select inputs to route one of several data inputs to a common output. For example, a 4-to-1 multiplexer typically has two select bits.
Question 10. What does a digital decoder normally do?
- Machine code to C source
- A coded input to selected outputs
- An instruction to a disk
- Only binary addition
Show correct answer and explanation
Correct answer: B. A coded input to selected outputs
A decoder activates a selected output corresponding to a binary input code. A typical n-to-2^n decoder has 2^n possible outputs.
Question 11. What inputs does a half adder process?
- Three input bits with carry-in
- Only one bit
- Two input bits without carry-in
- A 32-bit register always
Show correct answer and explanation
Correct answer: C. Two input bits without carry-in
A half adder adds two one-bit operands but has no carry-in input. It produces a sum bit and a carry-out bit.
Question 12. Which inputs are used by a full adder?
- One data bit
- Four input words
- Only a clock
- Two data bits and a carry-in
Show correct answer and explanation
Correct answer: D. Two data bits and a carry-in
A full adder combines two operand bits and an incoming carry. Its outputs are a sum and carry-out, so full adders can be chained.
Question 13. Why does a ripple-carry adder have carry-propagation delay?
- Carry propagation through stages
- Disk access only
- Network packet loss
- Clock initialization
Show correct answer and explanation
Correct answer: A. Carry propagation through stages
In a ripple-carry adder each higher bit may have to wait for the carry from a lower stage. Delay increases with the length of the carry chain.
Question 14. What performance issue does carry-lookahead logic address?
- Disk formatting
- Carry computation speed
- Cache capacity
- Instruction length
Show correct answer and explanation
Correct answer: B. Carry computation speed
Carry-lookahead uses generate and propagate information to determine carries without waiting for each stage in sequence. This reduces carry delay.
Question 15. Which components normally belong to the CPU datapath?
- Only a compiler
- Only firmware passwords
- ALUs registers and data routes
- Only network links
Show correct answer and explanation
Correct answer: C. ALUs registers and data routes
The datapath includes registers, arithmetic and logic units, and interconnections used to move and transform data. Control signals decide which operations occur.
Question 16. What signals does the control unit generate?
- Only database queries
- Only network addresses
- Printer commands
- Signals governing datapath operation
Show correct answer and explanation
Correct answer: D. Signals governing datapath operation
A control unit issues signals such as register enables, ALU operation selects, and memory read/write controls. These coordinate the datapath.
Question 17. What is a register file?
- A collection of fast registers with access ports
- A disk directory
- A source-code library
- A memory card
Show correct answer and explanation
Correct answer: A. A collection of fast registers with access ports
A register file is a collection of relatively fast, directly addressable registers with read and write ports. It holds operands used by CPU instructions.
Question 18. How does a finite-state-machine controller organize its operation?
- Only SQL tables
- Defined states and transitions
- Only random inputs
- Only cache tags
Show correct answer and explanation
Correct answer: B. Defined states and transitions
A finite-state controller uses states and transition conditions to sequence machine operations. Each state can specify control outputs for that step.
Question 19. What information drives a microprogrammed control unit?
- Only external interrupts
- Disk folders
- Stored microinstructions
- Only assembly comments
Show correct answer and explanation
Correct answer: C. Stored microinstructions
Microprogrammed control stores microinstructions in a control store. A sequencer selects microinstructions whose fields drive lower-level processor operations.
Question 20. What does an instruction set architecture specify?
- Exact transistor placement
- Only clock wiring
- Only circuit fabrication
- Programmer-visible instructions and state
Show correct answer and explanation
Correct answer: D. Programmer-visible instructions and state
An ISA defines the programmer-visible machine behavior: instructions, register state, data types and addressing semantics. Different microarchitectures may implement the same ISA.
Question 21. What is the purpose of an instruction opcode?
- The instruction operation
- A file extension
- A memory chip
- A password
Show correct answer and explanation
Correct answer: A. The instruction operation
The opcode specifies which operation an instruction performs, such as ADD, LOAD, or BRANCH. Other fields specify operands or modes.
Question 22. What is an operand of a machine instruction?
- An operating system
- A value or location used by an instruction
- A clock signal only
- A physical bus
Show correct answer and explanation
Correct answer: B. A value or location used by an instruction
An operand is a value, register, memory location, or immediate argument used by an instruction. For addition, operands are the values being added.
Question 23. What does the program counter usually contain?
- Disk size
- Number of cores
- A next instruction address
- A network port
Show correct answer and explanation
Correct answer: C. A next instruction address
The program counter usually identifies the address of the next instruction to fetch or execute, depending on architecture and pipeline conventions.
Question 24. What is kept in an instruction register?
- Only a cache line
- Only RAM refresh state
- Only a branch history entry
- A fetched instruction representation
Show correct answer and explanation
Correct answer: D. A fetched instruction representation
The instruction register holds bits of an instruction fetched from memory. Decoding interprets these fields to determine the required operation.
Question 25. What is an immediate operand?
- A literal encoded in the instruction
- Always a memory pointer
- A physical storage device
- Only a register name
Show correct answer and explanation
Correct answer: A. A literal encoded in the instruction
An immediate operand is a literal value embedded in the instruction encoding. It does not require fetching the operand from a separate data-memory location.
Question 26. What is register-indirect addressing?
- A constant is always the result
- A register holds an operand’s memory address
- Only code addresses are permitted
- The stack is never used
Show correct answer and explanation
Correct answer: B. A register holds an operand’s memory address
In register-indirect addressing, a register contains the address of the memory operand rather than the operand value itself. The processor dereferences that address.
Question 27. How does PC-relative addressing compute a target?
- Only a hard disk address
- Only network routing
- Program counter reference plus displacement
- Only the ALU result
Show correct answer and explanation
Correct answer: C. Program counter reference plus displacement
PC-relative addressing calculates a target using a displacement relative to a defined program-counter value. It is commonly used for branches.
Question 28. Where does a load-store ISA generally perform arithmetic?
- Only disk sectors
- Only I/O ports
- Only memory-to-memory values
- Register operands
Show correct answer and explanation
Correct answer: D. Register operands
In a load-store ISA, arithmetic generally operates on register operands. Dedicated load and store instructions access memory.
Question 29. What is specified by an instruction format?
- Bit fields for opcode and operands
- The motherboard form factor
- Only clock frequency
- Only storage allocation
Show correct answer and explanation
Correct answer: A. Bit fields for opcode and operands
An instruction format specifies fields such as opcode, register identifiers, addressing mode and immediate values, together with their bit positions.
Question 30. What is a traditional design characteristic of RISC?
- No registers
- Regular relatively simple operations
- Only disk instructions
- No jumps
Show correct answer and explanation
Correct answer: B. Regular relatively simple operations
Traditional RISC design emphasizes relatively regular, simple instructions and load/store memory access. Such regularity can simplify instruction decoding and pipelines.
Question 31. What is a historical design characteristic of CISC?
- No memory operands
- Only one instruction
- Many operations and addressing modes
- No arithmetic
Show correct answer and explanation
Correct answer: C. Many operations and addressing modes
Historically, CISC ISAs provide varied instruction operations and addressing modes, sometimes combining memory access and computation. Modern implementations may decode them into simpler micro-operations.
Question 32. What does microarchitecture describe?
- Only a high-level language
- Only the ISA manual
- A SQL schema
- A hardware design implementing an ISA
Show correct answer and explanation
Correct answer: D. A hardware design implementing an ISA
Microarchitecture describes how the processor hardware executes a given ISA, including pipelines, caches, execution units and internal control.
Question 33. What does an application binary interface (ABI) define?
- Binary conventions for calls and data layout
- Only transistor sizing
- Only cache replacement
- Only hardware voltage
Show correct answer and explanation
Correct answer: A. Binary conventions for calls and data layout
An ABI defines binary-level conventions such as calling sequences, data layout, register preservation and object-file interfaces to support interoperability.
Question 34. What is specified by a calling convention?
- Disk partition count
- Arguments register preservation and return values
- Only opcode widths
- Only cache associativity
Show correct answer and explanation
Correct answer: B. Arguments register preservation and return values
A calling convention defines how arguments and return values are passed and which registers each caller or callee must preserve across function calls.
Question 35. Which byte is stored at the lowest address in little-endian order?
- Its most significant byte
- Only sign bit
- Its least significant byte
- Only a zero
Show correct answer and explanation
Correct answer: C. Its least significant byte
Little-endian order stores the least significant byte at the lowest address. For example, 0x1234 is stored as bytes 0x34 then 0x12.
Question 36. Which byte is stored at the lowest address in big-endian order?
- Its least significant byte
- Only a zero
- Only the exponent
- Its most significant byte
Show correct answer and explanation
Correct answer: D. Its most significant byte
Big-endian order stores the most significant byte at the lowest address. For example, 0x1234 is stored as bytes 0x12 then 0x34.
Question 37. What is the representable range of an 8-bit signed two’s-complement integer?
- Negative 128 through 127
- Zero through 255
- Negative 127 through 128
- Zero through 127
Show correct answer and explanation
Correct answer: A. Negative 128 through 127
With 8 bits, two’s complement represents integers from −2^7 to 2^7 − 1, giving −128 through 127.
Question 38. What does sign extension preserve when increasing integer width?
- Every original bit position exactly
- Signed value when increasing width
- Clock speed
- Only the lowest bit
Show correct answer and explanation
Correct answer: B. Signed value when increasing width
Sign extension replicates the most significant sign bit when widening a signed two’s-complement integer, preserving its numeric value.
Question 39. What does IEEE 754 standardize?
- Only instruction formats
- Cache coherence rules
- Floating-point representations and operations
- Ethernet frames
Show correct answer and explanation
Correct answer: C. Floating-point representations and operations
IEEE 754 specifies widely used floating-point formats, rounding behavior, special values and arithmetic requirements, enabling more consistent numerical computation.
Question 40. What does the significand represent in a floating-point value?
- Only memory addresses
- Only the CPU clock
- Only error flags
- Significant precision digits
Show correct answer and explanation
Correct answer: D. Significant precision digits
The significand contains the significant precision bits or digits of a floating-point number. The exponent determines the scale.
Question 41. What does processor clock frequency measure?
- Cycles per second
- Instructions per cycle always
- Cache hit percentage
- Disk capacity
Show correct answer and explanation
Correct answer: A. Cycles per second
Clock frequency counts cycles per second, measured in hertz. A 2 GHz clock provides two billion cycles per second, not necessarily two billion completed instructions.
Question 42. What does CPI mean in CPU performance analysis?
- Cores per interrupt
- Cycles per instruction on average
- Characters per index
- Cache pages per input
Show correct answer and explanation
Correct answer: B. Cycles per instruction on average
CPI is the average number of clock cycles per completed instruction for a measured instruction stream. Workload and architecture can influence CPI.
Question 43. What does IPC mean in CPU performance analysis?
- Interrupts per cache
- Instructions per compiler
- Instructions per clock cycle
- Input ports per computer
Show correct answer and explanation
Correct answer: C. Instructions per clock cycle
IPC is the average number of instructions completed per clock cycle. For the same measurement interval, IPC is approximately the reciprocal of CPI.
Question 44. Which quantities determine the basic CPU execution-time equation?
- Only frequency
- Only RAM size
- Only source file length
- Instruction count CPI and clock period
Show correct answer and explanation
Correct answer: D. Instruction count CPI and clock period
CPU time equals instruction count multiplied by average CPI and clock-cycle time. Equivalently, time equals instruction count × CPI divided by frequency.
Question 45. What performance limitation is described by Amdahl’s law?
- Speedup limited by unaffected work
- Only RAM refresh
- Only binary addition
- Only register naming
Show correct answer and explanation
Correct answer: A. Speedup limited by unaffected work
Amdahl’s law states that speedup of an accelerated portion is limited by the portion that remains unchanged or serial. Even unlimited cores cannot remove serial work.
Question 46. At 2 GHz with an average CPI of 2, approximately how many instructions execute per second?
- Two billion
- One billion instructions per second
- Four billion
- One million
Show correct answer and explanation
Correct answer: B. One billion instructions per second
2 GHz means 2 × 10^9 cycles/s. At 2 cycles/instruction, the rate is (2 × 10^9)/2 = 10^9 instructions/s.
Question 47. What is the ideal upper speedup if 20% of a program is strictly serial?
- 10
- 20
- 5
- Unlimited
Show correct answer and explanation
Correct answer: C. 5
A strictly serial fraction of 0.20 limits speedup to 1/0.20 = 5 as parallel resources approach infinity, assuming Amdahl’s fixed-workload model.
Question 48. What information is encoded in a typical machine instruction?
- Only a source comment
- Only a user interface
- Only a file name
- Encoded operation and any associated operand fields
Show correct answer and explanation
Correct answer: D. Encoded operation and any associated operand fields
A machine instruction encodes an operation and, when required, fields identifying registers, constants, memory addresses or addressing modes. Formats vary by ISA.
Question 49. What does a memory address identify?
- A location in an address space
- Only a CPU brand
- Only a register count
- Only an algorithm name
Show correct answer and explanation
Correct answer: A. A location in an address space
A memory address names a location in an address space. Hardware and memory-management mechanisms translate or interpret it to access storage.
Question 50. What information may travel over a system bus?
- Only source code lines
- Data address or control information between components
- Only mathematical proofs
- Only program comments
Show correct answer and explanation
Correct answer: B. Data address or control information between components
A system bus carries data, address and control information between hardware components. Different buses may separate or multiplex these signals.
Computer Architecture MCQs — Set 2 (Questions 51–100)
Choose an answer then reveal its explanation.
Question 51. What is temporal locality in memory access?
- Only distant addresses matter
- Every memory request is unique
- Recent data may be used again soon
- Only disks have addresses
Show correct answer and explanation
Correct answer: C. Recent data may be used again soon
Temporal locality means a recently accessed item is likely to be accessed again soon. Keeping such data in a cache can reduce future access time.
Question 52. What does spatial locality mean?
- Only one bit is needed
- Every access is random
- Caches cannot use blocks
- Nearby addresses are likely to be accessed
Show correct answer and explanation
Correct answer: D. Nearby addresses are likely to be accessed
Spatial locality means accesses often occur at nearby addresses. Caches exploit this by fetching whole blocks or lines rather than single bytes.
Question 53. What is a cache hit?
- The requested block is in cache
- The CPU fails
- The disk is full
- Only a page fault
Show correct answer and explanation
Correct answer: A. The requested block is in cache
A hit occurs when a requested memory block is already present in the relevant cache. The processor can use the faster cache access instead of fetching from the next level.
Question 54. What is a cache miss?
- All operations finish
- The requested block is absent from cache
- The clock stops
- An opcode is missing
Show correct answer and explanation
Correct answer: B. The requested block is absent from cache
A miss occurs when a requested block is not present in the cache. The memory hierarchy must retrieve it from a lower level, adding a miss penalty.
Question 55. What is a cache line?
- A processor thread
- A compiler pass
- A fixed-size cached memory block
- Only a branch
Show correct answer and explanation
Correct answer: C. A fixed-size cached memory block
A cache line is the unit of data transferred and stored in a cache, commonly a fixed-size block. Adjacent bytes share a line and can exploit spatial locality.
Question 56. How is a direct-mapped cache organized?
- Any possible line
- No tags
- Every block has two lines
- One possible line per memory block
Show correct answer and explanation
Correct answer: D. One possible line per memory block
Each memory block maps to one predetermined cache line in a direct-mapped cache. This simple organization can suffer conflict misses when blocks compete for that slot.
Question 57. What placement freedom does a fully associative cache provide?
- Any eligible line can hold a block
- Only one fixed location
- No replacement
- No comparison required
Show correct answer and explanation
Correct answer: A. Any eligible line can hold a block
A fully associative cache allows a memory block to occupy any cache line. Tag comparisons and replacement logic are more flexible but often more expensive.
Question 58. What does two-way set associativity mean?
- Only two lines overall
- Two lines per set
- Every line is a different set
- Only one-way storage
Show correct answer and explanation
Correct answer: B. Two lines per set
In a two-way set-associative cache, each set has two line slots or ways. A block maps to one set but may occupy either way within it.
Question 59. What is the purpose of a cache tag?
- Records the CPU model
- Only stores addresses of users
- Identifies which memory block is stored
- Only records clock cycles
Show correct answer and explanation
Correct answer: C. Identifies which memory block is stored
The tag distinguishes which of the memory blocks mapping to a set currently occupies a particular cache line. A cache hit requires a matching valid tag.
Question 60. How many block-offset bits are needed for a 64-byte cache line?
- 4 bits
- 8 bits
- 16 bits
- 6 bits
Show correct answer and explanation
Correct answer: D. 6 bits
With byte addressing, 64 bytes require log2(64) = 6 offset bits. These select an individual byte position within the cache line.
Question 61. How many set-index bits are needed for 32 cache sets?
- 5 index bits
- 4 index bits
- 6 index bits
- 32 index bits
Show correct answer and explanation
Correct answer: A. 5 index bits
Thirty-two sets require log2(32) = 5 index bits. The index chooses the set to search in a set-associative or direct-mapped cache.
Question 62. What is a compulsory cache miss?
- Only conflict
- First-time access to an uncached block
- Only RAM voltage
- Only branch misprediction
Show correct answer and explanation
Correct answer: B. First-time access to an uncached block
A compulsory or cold miss occurs on a block’s first access before the block has been brought into the cache. It is not due to eviction of a previously cached block.
Question 63. What causes a conflict cache miss?
- Only the first access
- Only a kernel exception
- Mapped blocks compete for limited slots
- Only disk failure
Show correct answer and explanation
Correct answer: C. Mapped blocks compete for limited slots
A conflict miss happens when blocks compete for the same constrained cache placement, even though other cache locations might have been available.
Question 64. When does a capacity cache miss occur?
- Only initial access
- Only a wrong opcode
- Only data encryption
- Useful data exceed cache size
Show correct answer and explanation
Correct answer: D. Useful data exceed cache size
A capacity miss occurs because the working data exceeds the cache’s ability to retain all needed blocks. Evictions can cause later reaccesses to miss.
Question 65. Which line does an LRU replacement policy choose?
- Least recently accessed line
- Most recently accessed line
- All clean lines
- Highest address always
Show correct answer and explanation
Correct answer: A. Least recently accessed line
Least Recently Used (LRU) replaces the line that has not been accessed for the longest time among candidates. Hardware often approximates true LRU for larger sets.
Question 66. How does write-through caching handle writes?
- Never writes lower memory
- Propagates stores to lower memory as part of the write
- Only stores instructions
- Does not support dirty bits
Show correct answer and explanation
Correct answer: B. Propagates stores to lower memory as part of the write
A write-through policy forwards each cache write to the next storage level as part of the write operation, often using a buffer. This keeps the lower level more up to date.
Question 67. How does write-back caching handle writes?
- Forces immediate write of every store to all levels
- Forbids modifications
- Allows delayed lower-level writes
- Only supports read-only data
Show correct answer and explanation
Correct answer: C. Allows delayed lower-level writes
A write-back cache marks modified lines dirty and defers lower-level updates until eviction or another required event. It reduces repeated memory traffic for frequently written data.
Question 68. What does a dirty bit indicate?
- Marks only invalid lines
- Is a branch flag
- Marks a zero page
- Marks data modified relative to backing storage
Show correct answer and explanation
Correct answer: D. Marks data modified relative to backing storage
A dirty bit shows that a cached line differs from the corresponding lower-level copy. Such a line normally needs writing back before it can be discarded.
Question 69. What is a write-allocate cache policy?
- Allocates a line on a store miss
- Deletes missed stores
- Always bypasses cache
- Disables memory
Show correct answer and explanation
Correct answer: A. Allocates a line on a store miss
Under write allocate, a store miss causes the missing block to be loaded or allocated in the cache before or as the store is handled. No-write-allocate is an alternative.
Question 70. How is average memory access time (AMAT) commonly calculated?
- Only hit ratio
- Hit time plus miss rate times miss penalty
- Only memory size
- Only CPU frequency
Show correct answer and explanation
Correct answer: B. Hit time plus miss rate times miss penalty
The basic formula is AMAT = hit time + miss rate × miss penalty. It assumes a simple cache model with one relevant miss-penalty term.
Question 71. If cache hit time is 2 ns, miss rate is 10%, and miss penalty is 40 ns, what is AMAT?
- 4 ns
- 42 ns
- 6 ns
- 2.4 ns
Show correct answer and explanation
Correct answer: C. 6 ns
AMAT = 2 ns + 0.10 × 40 ns = 6 ns. The miss contribution is 4 ns on average, added to the hit-access time.
Question 72. What is a common effect of raising cache hit rate?
- Always increases stalls
- Eliminates all faults
- Changes ISA format
- Often reduces accesses to slower levels
Show correct answer and explanation
Correct answer: D. Often reduces accesses to slower levels
A higher hit rate usually reduces accesses to slower memory levels. Actual performance also depends on cache hit time and the cost of remaining misses.
Question 73. Which CPU storage level commonly uses SRAM?
- Processor caches
- Rotating disks
- Only network cables
- Only tape archives
Show correct answer and explanation
Correct answer: A. Processor caches
Static RAM is widely used for processor caches because it offers fast access without periodic refresh. Its lower density makes it more expensive per bit than DRAM.
Question 74. Which system storage level commonly uses DRAM?
- Only control units
- Main system memory
- Only instruction encoders
- Only hard drive surfaces
Show correct answer and explanation
Correct answer: B. Main system memory
Dynamic RAM is commonly used for main memory because it provides high storage density at a lower cost per bit. It is slower than on-chip SRAM caches.
Question 75. Why must DRAM cells be refreshed?
- Rebuilds indexes
- Resets every register
- Restores leaking charge in cells
- Changes opcodes
Show correct answer and explanation
Correct answer: C. Restores leaking charge in cells
DRAM stores information as charge that leaks over time. Refresh operations restore the charge before stored bits become unreliable.
Question 76. What does virtual memory provide?
- Gives unlimited physical RAM
- Eliminates TLBs
- Never faults
- Provides address-space protection and abstraction
Show correct answer and explanation
Correct answer: D. Provides address-space protection and abstraction
Virtual memory gives programs virtual address spaces and supports translation, isolation and protection. It can also allow pages to be backed by storage when needed.
Question 77. What does a page table record?
- Records mappings and permissions
- Only cache tags
- Only process names
- Only file formats
Show correct answer and explanation
Correct answer: A. Records mappings and permissions
Page tables associate virtual pages with physical frames and track control information such as permissions and validity. They are consulted during address translation.
Question 78. What information does a translation lookaside buffer (TLB) cache?
- Only source code
- Recent address translations
- Only arithmetic flags
- Only disk sectors
Show correct answer and explanation
Correct answer: B. Recent address translations
A TLB caches recent virtual-to-physical translations, often including access permissions. This avoids a page-table walk on many memory accesses.
Question 79. What happens on a TLB miss?
- Always resets CPU
- Always signals division by zero
- Requires finding a translation elsewhere
- Only deletes a file
Show correct answer and explanation
Correct answer: C. Requires finding a translation elsewhere
A TLB miss requires obtaining the translation from another source, commonly by walking page tables. A TLB miss does not necessarily imply the requested page is absent from RAM.
Question 80. What can a page fault trigger?
- Every cache hit
- Every successful load
- Only arithmetic carry
- Causes memory-management fault handling
Show correct answer and explanation
Correct answer: D. Causes memory-management fault handling
A page fault invokes the operating system’s fault handler for a missing, protected or otherwise invalid mapping. It may load a page or terminate an invalid access.
Question 81. What happens to the page offset during ordinary virtual-to-physical address translation?
- Stays unchanged in ordinary page translation
- Always becomes zero
- Always flips bits
- Always equals page number
Show correct answer and explanation
Correct answer: A. Stays unchanged in ordinary page translation
The offset within the page stays unchanged because virtual pages map to physical frames of the same size. Translation replaces the page number, not the in-page position.
Question 82. How many page-offset bits are required for a 4 KiB page?
- 10 bits
- 12 bits
- 16 bits
- 4 bits
Show correct answer and explanation
Correct answer: B. 12 bits
Four kibibytes equal 4096 = 2^12 bytes. With byte addressing, 12 bits specify the offset within one page.
Question 83. What is one benefit of larger virtual-memory pages?
- Always eliminate fragmentation
- Remove RAM limits
- Increase TLB reach per entry
- Prevent every cache miss
Show correct answer and explanation
Correct answer: C. Increase TLB reach per entry
A larger page maps more bytes per TLB entry, increasing TLB reach. The tradeoffs include possible internal fragmentation and less flexible fine-grained protection.
Question 84. What does a page-replacement algorithm select?
- Formats a disk
- Chooses an opcode
- Encrypts a cache line
- Chooses a victim resident page
Show correct answer and explanation
Correct answer: D. Chooses a victim resident page
Page replacement chooses a resident page to evict when a frame is needed. The policy aims to limit future faults while respecting dirty-page write costs.
Question 85. What is a process’s working set?
- Recently accessed pages
- Every possible page
- Only unused pages
- Only executable instructions
Show correct answer and explanation
Correct answer: A. Recently accessed pages
The working set is the set of pages referenced over a recent window of execution. Its size approximates the memory the process currently needs for efficient progress.
Question 86. What is memory thrashing?
- Only cache hits
- Excessive paging reduces useful work
- Only SIMD execution
- Only clock changes
Show correct answer and explanation
Correct answer: B. Excessive paging reduces useful work
Thrashing occurs when the system spends excessive time handling page faults and moving pages instead of doing useful computation. Insufficient physical memory is a common cause.
Question 87. What is processor pipelining?
- Eliminates every dependency
- Always makes single instruction latency zero
- Overlaps instruction processing stages
- Changes the ISA
Show correct answer and explanation
Correct answer: C. Overlaps instruction processing stages
Pipelining divides instruction execution into stages and overlaps different instructions across stages. It improves potential throughput even if individual latency is not reduced.
Question 88. In an ideal five-stage pipeline, how many cycles are needed for ten instructions?
- 10 cycles
- 50 cycles
- 5 cycles
- 14 cycles
Show correct answer and explanation
Correct answer: D. 14 cycles
With five stages, the first instruction completes after five cycles. Nine additional instructions each complete one cycle later: 5 + 10 − 1 = 14 cycles, assuming no stalls.
Question 89. What is a pipeline data hazard?
- An instruction depends on another’s result
- Only a disk fault
- Only a syntax error
- Only network routing
Show correct answer and explanation
Correct answer: A. An instruction depends on another’s result
A data hazard occurs when instruction operands depend on values not yet available from earlier operations. Forwarding or stalling can resolve the timing conflict.
Question 90. What is a pipeline control hazard?
- Only a dirty cache line
- Unknown next fetch path after a branch
- Only a disk sector
- Only memory allocation
Show correct answer and explanation
Correct answer: B. Unknown next fetch path after a branch
A control hazard occurs when the next instruction address depends on an unresolved branch or other control transfer. Prediction reduces the resulting fetch delay.
Question 91. What causes a structural hazard in a pipeline?
- Only equal register values
- Only bad filenames
- Multiple instructions contend for unavailable hardware
- Only disk errors
Show correct answer and explanation
Correct answer: C. Multiple instructions contend for unavailable hardware
A structural hazard occurs when concurrent instructions need the same hardware resource and there are insufficient units or ports to serve them together.
Question 92. What is result forwarding or bypassing?
- Prevents every branch miss
- Enlarges cache
- Always avoids memory loads
- Feeds a result to its consumer before register writeback
Show correct answer and explanation
Correct answer: D. Feeds a result to its consumer before register writeback
Forwarding passes a produced result directly from an execution stage to a dependent stage before it is written into the architectural register file.
Question 93. What is a pipeline bubble?
- A stage slot without useful progressing instruction
- A new CPU
- A larger page
- Only a cache tag
Show correct answer and explanation
Correct answer: A. A stage slot without useful progressing instruction
A bubble is an unoccupied or nonproductive pipeline slot, often introduced by a stall. Bubbles lower the achieved instruction throughput.
Question 94. What is the purpose of branch prediction?
- Guarantees correctness
- Estimates branch outcome or target early
- Removes branching
- Replaces RAM
Show correct answer and explanation
Correct answer: B. Estimates branch outcome or target early
Branch prediction estimates branch direction and possibly target early, allowing instruction fetching to continue while the branch outcome is unresolved.
Question 95. What causes a load-use hazard?
- Only a network packet fails
- Every load has zero latency
- A dependent operation needs load data before it is ready
- Only CPU overheating
Show correct answer and explanation
Correct answer: C. A dependent operation needs load data before it is ready
A load-use hazard happens when the result of a load has not arrived by the time a dependent instruction needs it. Some pipelines must insert stalls.
Question 96. What happens after a branch misprediction?
- Always powers off the CPU
- Increases disk sectors
- Changes user permissions
- Discards wrong-path speculative work
Show correct answer and explanation
Correct answer: D. Discards wrong-path speculative work
A misprediction causes wrong-path speculative instructions to be discarded or squashed and fetching to restart at the correct target, wasting pipeline work.
Question 97. What does instruction-pipeline throughput measure?
- Completed instructions per unit time
- Only first instruction latency
- Only DRAM size
- Only clock voltage
Show correct answer and explanation
Correct answer: A. Completed instructions per unit time
Throughput is the number of instructions completed per unit time, such as instructions per cycle or per second. It differs from latency of one instruction.
Question 98. What is the ideal steady-state rate of a single-issue pipeline?
- Exactly five per cycle
- Up to one instruction per cycle after filling
- Only one per five cycles always
- Zero instructions
Show correct answer and explanation
Correct answer: B. Up to one instruction per cycle after filling
An ideal single-issue pipeline completes at most one instruction per cycle after filling, assuming sufficient instruction supply and no stalls.
Question 99. Why can adding pipeline stages stop improving clock speed?
- Always vanishes
- Changes byte order
- Can limit clock improvement from additional stages
- Is only a software warning
Show correct answer and explanation
Correct answer: C. Can limit clock improvement from additional stages
Each additional pipeline boundary requires registers and control overhead. Very short stages may no longer overcome these costs or other circuit delays.
Question 100. Why is balancing pipeline stage delays useful?
- Requires identical opcode values
- Eliminates all branch instructions
- Removes cache tags
- Makes stage delays more similar to reduce bottleneck effects
Show correct answer and explanation
Correct answer: D. Makes stage delays more similar to reduce bottleneck effects
The cycle period is usually constrained by the slowest stage plus register overhead. Making stage delays more equal can improve achievable clock frequency.
Computer Architecture MCQs — Set 3 (Questions 101–150)
Reveal the correct answer and explanation.
Question 101. What capability distinguishes a superscalar processor?
- Can issue multiple instructions per cycle when dependencies and resources permit
- Has no pipeline
- Always executes one instruction per second
- Only uses multiple disks
Show correct answer and explanation
Correct answer: A. Can issue multiple instructions per cycle when dependencies and resources permit
A superscalar CPU can issue more than one instruction per cycle when dependencies and execution resources permit. Multiple pipelines exploit instruction-level parallelism.
Question 102. What is instruction-level parallelism (ILP)?
- All instructions are mutually dependent
- Independent instructions can execute concurrently
- Only multiple processes execute
- The CPU must have multiple sockets
Show correct answer and explanation
Correct answer: B. Independent instructions can execute concurrently
ILP is the opportunity to execute independent instructions from one instruction stream at the same time. Data and control dependencies limit available ILP.
Question 103. What does dynamic instruction scheduling do?
- Orders instructions only at source-compilation time
- Disables caches
- Chooses ready operations at runtime using hardware scheduling
- Requires no registers
Show correct answer and explanation
Correct answer: C. Chooses ready operations at runtime using hardware scheduling
Dynamic scheduling selects operations that are ready during execution instead of relying entirely on static program order. Hardware can react to cache misses and variable latency.
Question 104. What is out-of-order execution?
- Ignores all true dependencies
- Always makes results incorrect
- Uses no instruction window
- Executes ready younger instructions before some older stalled operations
Show correct answer and explanation
Correct answer: D. Executes ready younger instructions before some older stalled operations
Out-of-order processors can execute a younger ready instruction while an older instruction waits for an operand. They usually preserve required architectural behavior at retirement.
Question 105. Why do many CPUs retire instructions in program order?
- Makes architectural results visible in program order
- Requires all execution to be in order
- Disables interrupts
- Only controls disks
Show correct answer and explanation
Correct answer: A. Makes architectural results visible in program order
In-order retirement commits results in program order, helping preserve precise architectural state and exception behavior even when execution was speculative or out of order.
Question 106. What is a read-after-write (RAW) dependency?
- Two instructions only read data
- Later instruction reads a value produced by an earlier instruction
- Two writes are unrelated
- No operands shared
Show correct answer and explanation
Correct answer: B. Later instruction reads a value produced by an earlier instruction
RAW is a true data dependency: a later instruction needs a value written by an earlier instruction. It cannot be removed simply by assigning different register names.
Question 107. What is a write-after-read (WAR) dependency?
- A younger read depends on older write
- Two reads conflict
- A younger write must not precede an older read of the same logical location
- Only branches involved
Show correct answer and explanation
Correct answer: C. A younger write must not precede an older read of the same logical location
WAR is an anti-dependency: a later write must not overwrite a name before an earlier instruction has read its value. Register renaming can remove this naming hazard.
Question 108. What is a write-after-write (WAW) dependency?
- Two independent reads
- Only network errors
- Only memory allocation
- Writes to the same destination must preserve required ordering
Show correct answer and explanation
Correct answer: D. Writes to the same destination must preserve required ordering
WAW is an output dependency: two writes use the same architectural destination, so their visible order matters. Renaming can give the versions separate physical locations.
Question 109. Which dependencies can register renaming eliminate?
- False register-name dependencies
- All RAW dependencies
- All data-cache misses
- All branches
Show correct answer and explanation
Correct answer: A. False register-name dependencies
Renaming removes many false name dependencies, especially WAR and WAW, by assigning different physical registers to successive logical register versions.
Question 110. What role do physical registers play in register renaming?
- Replace all caches
- Store separately versioned values mapped from architectural registers
- Contain only user passwords
- Are never freed
Show correct answer and explanation
Correct answer: B. Store separately versioned values mapped from architectural registers
Physical registers hold actual value versions while a rename map associates architectural registers with their current physical locations. This enables overlap of independent operations.
Question 111. What is the function of a reservation station?
- Only store disk blocks
- Always hold committed rows
- Hold instructions waiting for operands or execution resources
- Only implement firmware
Show correct answer and explanation
Correct answer: C. Hold instructions waiting for operands or execution resources
A reservation station holds an issued instruction until its operands and a suitable execution unit are ready. It supports scheduling based on operand availability.
Question 112. What is the purpose of a reorder buffer?
- Only caches text files
- Replaces every register
- Tracks keyboard input
- Tracks speculative instructions to support ordered commit
Show correct answer and explanation
Correct answer: D. Tracks speculative instructions to support ordered commit
A reorder buffer tracks in-flight instructions and their completion status so results can retire in order. It supports precise exceptions and recovery from speculation.
Question 113. What is speculative execution?
- Performs work before some control outcomes are confirmed
- Only runs formally proven programs
- Requires no branch prediction
- Never discards results
Show correct answer and explanation
Correct answer: A. Performs work before some control outcomes are confirmed
Speculative execution performs work before a branch or other dependency is resolved. Incorrectly speculated results must be squashed rather than committed.
Question 114. What information is stored in a branch target buffer?
- Stores user-visible stack frames only
- Caches likely branch destination addresses
- Sorts disk tracks
- Only refreshes DRAM
Show correct answer and explanation
Correct answer: B. Caches likely branch destination addresses
A BTB caches predicted target addresses of branches or jumps. It helps the fetch unit begin reading the likely destination without waiting for target computation.
Question 115. How does a two-bit saturating branch predictor behave?
- Uses exactly two branches
- Cannot adapt
- Uses four prediction states with hysteresis
- Always predicts taken
Show correct answer and explanation
Correct answer: C. Uses four prediction states with hysteresis
A two-bit counter has four states and typically requires two contradictory outcomes to switch a strong prediction. This hysteresis avoids overreacting to one unusual branch.
Question 116. What does a branch misprediction require?
- All data becoming nonvolatile
- Guaranteed CPU reset
- Permanent cache corruption
- Flushing or squashing incorrect speculative instructions
Show correct answer and explanation
Correct answer: D. Flushing or squashing incorrect speculative instructions
After a wrong prediction, the CPU must discard wrong-path instructions and restart fetching from the actual destination. The lost work is a misprediction penalty.
Question 117. What is a precise exception?
- Reports a fault with coherent architectural state at a clear instruction boundary
- Prevents all exceptions
- Requires no pipeline
- Eliminates software errors
Show correct answer and explanation
Correct answer: A. Reports a fault with coherent architectural state at a clear instruction boundary
A precise exception presents architectural state as if all earlier instructions completed and later instructions had no visible effects. It eases restart and debugging.
Question 118. What is a store buffer used for?
- Only tracks source-code files
- Temporarily holds pending stores
- Contains only user passwords
- Only executes jumps
Show correct answer and explanation
Correct answer: B. Temporarily holds pending stores
A store buffer holds pending writes until the memory subsystem can accept them. It permits a processor to continue without blocking on every individual store.
Question 119. What does a load-store queue track?
- Only stores the assembler output
- Only manages network traffic
- Tracks memory instructions and their ordering dependencies
- Replaces the page table
Show correct answer and explanation
Correct answer: C. Tracks memory instructions and their ordering dependencies
A load-store queue tracks memory operations, addresses and ordering constraints. It can detect conflicting speculative loads and stores that require replay.
Question 120. What is memory-dependence speculation?
- Always forbids parallel memory operations
- Guarantees no rollbacks
- Only increases cache size
- Predicts whether a load may safely proceed before older stores are fully resolved
Show correct answer and explanation
Correct answer: D. Predicts whether a load may safely proceed before older stores are fully resolved
Memory-dependence speculation predicts whether a load can execute before older stores are fully resolved. An unexpected address overlap may require the load to replay.
Question 121. What characterizes a VLIW processor?
- Uses long instruction words encoding multiple operations scheduled largely by software
- Uses no compiler
- Always implements dynamic superscalar scheduling
- Only stores scalar values
Show correct answer and explanation
Correct answer: A. Uses long instruction words encoding multiple operations scheduled largely by software
VLIW encodes multiple operations within one long instruction word, with operation scheduling largely determined by the compiler. Hardware may be simpler but timing assumptions matter.
Question 122. What is especially important for VLIW instruction scheduling?
- Only cache tags
- Compiler knowledge of operation dependencies
- Physical disk layout
- Operating-system usernames
Show correct answer and explanation
Correct answer: B. Compiler knowledge of operation dependencies
VLIW compilers need knowledge of instruction dependencies, operation latencies and functional-unit availability to fill parallel issue slots safely.
Question 123. What is a limitation of statically scheduled VLIW execution?
- No instructions can contain branches
- Compilers cannot find parallelism
- Runtime latency variations can invalidate static timing assumptions
- Every instruction always has one operation
Show correct answer and explanation
Correct answer: C. Runtime latency variations can invalidate static timing assumptions
Static VLIW schedules may perform poorly when runtime delays vary, for example due to unpredictable cache misses. The hardware often has less freedom to reschedule dynamically.
Question 124. What is software pipelining of a loop?
- Disables loop execution
- Only sorts instructions
- Runs each iteration completely before the next
- Overlaps operations from different loop iterations
Show correct answer and explanation
Correct answer: D. Overlaps operations from different loop iterations
Software pipelining overlaps operations from different loop iterations. It constructs a repeating schedule that keeps hardware units busy after startup.
Question 125. What is the main purpose of loop unrolling?
- Replicates loop body work to reduce overhead or expose parallelism
- Always lowers code size
- Prohibits vectorization
- Removes all hazards
Show correct answer and explanation
Correct answer: A. Replicates loop body work to reduce overhead or expose parallelism
Loop unrolling duplicates the body of several iterations. This reduces branch overhead and can expose more independent instructions, at the cost of code size.
Question 126. How does SIMD execute instructions?
- One element receives multiple separate programs
- One instruction operates on multiple data elements
- Only one thread runs at a time
- No arithmetic is supported
Show correct answer and explanation
Correct answer: B. One instruction operates on multiple data elements
SIMD performs one instruction on several data elements simultaneously. It is most effective when many lanes can execute the same operation.
Question 127. What does vector length indicate?
- Only the number of CPU cores
- Only cache line count
- Number of elements processed by a vector operation or register under its model
- Only the disk sectors
Show correct answer and explanation
Correct answer: C. Number of elements processed by a vector operation or register under its model
Vector length is the number of elements handled by a vector instruction or register under the relevant ISA. Some architectures support variable vector lengths.
Question 128. What is a SIMD lane?
- A RAM page
- An ISA privilege mode
- A hard disk partition
- A parallel element-processing portion of vector hardware
Show correct answer and explanation
Correct answer: D. A parallel element-processing portion of vector hardware
A SIMD lane is a hardware path that processes one or more elements of a vector operation. Many lanes increase throughput for independent data.
Question 129. Which workload is well suited to vectorization?
- Independent repetitive operations over data arrays
- Strictly serial pointer dependencies in every case
- Only file opening
- Only source-code parsing
Show correct answer and explanation
Correct answer: A. Independent repetitive operations over data arrays
Independent element-wise operations on arrays are ideal candidates for vectorization. Loop-carried dependencies and irregular branching can limit benefits.
Question 130. What does a vector execution mask control?
- Always changes page size
- Conditionally activates selected vector elements
- Disables SIMD
- Requires no predicates
Show correct answer and explanation
Correct answer: B. Conditionally activates selected vector elements
An execution mask activates only selected vector elements for a particular operation. Masking handles conditional work without necessarily branching all lanes.
Question 131. What defines a multicore CPU?
- Only has many registers
- Uses only one pipeline without cores
- Contains multiple independent processing cores
- Cannot run threads
Show correct answer and explanation
Correct answer: C. Contains multiple independent processing cores
A multicore CPU integrates multiple processing cores that can run different instruction streams. The cores may share some caches and memory interfaces.
Question 132. What is simultaneous multithreading (SMT)?
- Guarantees twice performance
- Requires separate chips per thread
- Disables caches
- Presents several hardware thread contexts on a core
Show correct answer and explanation
Correct answer: D. Presents several hardware thread contexts on a core
SMT lets more than one hardware thread context share a physical core’s execution resources. It can make use of otherwise idle functional units.
Question 133. What is fine-grained hardware multithreading?
- Can switch active hardware thread between short intervals such as cycles
- Only changes threads when program exits
- Always needs no hardware state
- Only executes vector code
Show correct answer and explanation
Correct answer: A. Can switch active hardware thread between short intervals such as cycles
Fine-grained multithreading switches among hardware thread contexts at short intervals, sometimes each cycle. It can hide latency by interleaving work.
Question 134. What is coarse-grained hardware multithreading?
- Always switches on every cycle
- Switches threads on larger latency events under a defined design
- Uses no register contexts
- Only operates on GPUs
Show correct answer and explanation
Correct answer: B. Switches threads on larger latency events under a defined design
Coarse-grained multithreading switches contexts less frequently, such as when an extended stall occurs. This reduces switching frequency but may leave some short stalls exposed.
Question 135. What is thread-level parallelism?
- Only vector lanes of one instruction
- Only pipelining within one thread
- Concurrent execution of distinct instruction streams
- No multiple contexts
Show correct answer and explanation
Correct answer: C. Concurrent execution of distinct instruction streams
Thread-level parallelism arises when separate threads execute independent or coordinated streams concurrently, potentially on different cores.
Question 136. How do processors communicate in a shared-memory multiprocessor?
- Only through printed documents
- Without any memory access
- Only through tape drives
- Cores communicate through a shared address space
Show correct answer and explanation
Correct answer: D. Cores communicate through a shared address space
Shared-memory processors communicate through loads and stores to a common address space. Synchronization and coherence mechanisms coordinate access.
Question 137. What is the purpose of cache coherence?
- Coordinates copies of shared locations across caches
- Only encrypts addresses
- Determines disk geometry
- Only changes clock speed
Show correct answer and explanation
Correct answer: A. Coordinates copies of shared locations across caches
Coherence keeps cached copies of a memory location appropriately coordinated when processors read and write it. It is distinct from ordering guarantees for different locations.
Question 138. What are the four MESI cache-line states?
- Multiple Enabled Suspended Idle
- Modified Exclusive Shared Invalid
- Memory Encoded Stored Indexed
- Master Empty Slave Internal
Show correct answer and explanation
Correct answer: B. Modified Exclusive Shared Invalid
MESI consists of Modified, Exclusive, Shared and Invalid states. These indicate a cache line’s ownership, sharing and freshness status.
Question 139. What does the Modified state signify in MESI?
- All copies are identical clean
- The line is invalid
- A cache has the only up-to-date dirty copy
- Memory has no address
Show correct answer and explanation
Correct answer: C. A cache has the only up-to-date dirty copy
Modified means the cache holds a dirty, typically exclusive up-to-date copy. The altered data must eventually be propagated to the memory hierarchy.
Question 140. What does the Invalid state mean in MESI?
- The line is dirty and exclusive
- The line is shared clean
- The line is newest always
- The line cannot supply valid data
Show correct answer and explanation
Correct answer: D. The line cannot supply valid data
An Invalid line cannot be used to satisfy a read because its data are not valid for the current coherence state. It must be refetched or reacquired.
Question 141. How does write-invalidate cache coherence support a write?
- Invalidates other cached copies before exclusive write permission
- Copies every store as a disk file
- Never communicates between cores
- Changes opcodes
Show correct answer and explanation
Correct answer: A. Invalidates other cached copies before exclusive write permission
Write-invalidate protocols obtain exclusive write permission and invalidate competing copies before modifying the cache line. Other caches must refetch to observe later updates.
Question 142. What is false sharing?
- Two threads deliberately modify the same variable
- Separate variables sharing a coherence line create unnecessary traffic
- A hash collision
- A page-table fault
Show correct answer and explanation
Correct answer: B. Separate variables sharing a coherence line create unnecessary traffic
False sharing happens when threads modify separate variables that occupy the same coherence line. Repeated invalidations can harm performance even without logical data sharing.
Question 143. What does a memory consistency model define?
- Specifies the CPU package size
- Only lists instruction opcodes
- Defines permitted observation order of memory operations
- Only defines disk partitions
Show correct answer and explanation
Correct answer: C. Defines permitted observation order of memory operations
A memory consistency model specifies which orders of memory operations may be observed by different processors or threads. Programs must use synchronization accordingly.
Question 144. What does a memory fence constrain?
- Deletes cache lines always
- Only refreshes DRAM
- Encrypts registers
- Constrains reordering or visibility of memory operations as specified
Show correct answer and explanation
Correct answer: D. Constrains reordering or visibility of memory operations as specified
A fence restricts reordering or visibility of memory operations under the architecture’s memory model. It is useful for establishing specific synchronization order.
Question 145. What is an atomic read-modify-write instruction?
- Combines reading and updating a location indivisibly under its atomic semantics
- Always accesses disk
- Cannot affect other threads
- Only performs integer division
Show correct answer and explanation
Correct answer: A. Combines reading and updating a location indivisibly under its atomic semantics
An atomic read-modify-write operation reads a value and updates it indivisibly under its atomic semantics. It supports counters, locks and other coordination primitives.
Question 146. What is compare-and-swap (CAS)?
- Always sorts a table
- Atomically compares a memory value and conditionally replaces it
- Only performs a branch
- Only reloads cache
Show correct answer and explanation
Correct answer: B. Atomically compares a memory value and conditionally replaces it
CAS compares a location with an expected value and writes a replacement only if the comparison succeeds, atomically. This supports many nonblocking algorithms.
Question 147. What is a mutex used for?
- Guarantees no cache misses
- Always increases clock
- Grants exclusive access to a critical section
- Changes ISA
Show correct answer and explanation
Correct answer: C. Grants exclusive access to a critical section
A mutex permits only one holder to enter a protected critical section at a time. Programs must use it consistently around shared mutable state.
Question 148. What is a race condition?
- Always involves two physical disks
- Only occurs with floating point
- Is a valid instruction
- Results depend on uncontrolled ordering of concurrent actions
Show correct answer and explanation
Correct answer: D. Results depend on uncontrolled ordering of concurrent actions
A race condition occurs when the outcome of an operation depends on uncontrolled timing of concurrent actions. Synchronization can remove unwanted races.
Question 149. How can resource waiting cause deadlock?
- Circular waits for resources held by others
- Only independent arithmetic
- All locks being instantly released
- Only cache hits
Show correct answer and explanation
Correct answer: A. Circular waits for resources held by others
Deadlock can arise when participants each hold resources needed by others and wait indefinitely in a cycle. Resource-ordering disciplines can help prevent it.
Question 150. What does a hardware performance counter measure?
- Always stores passwords
- Records selected microarchitectural events
- Only controls keyboard lighting
- Only stores instructions
Show correct answer and explanation
Correct answer: B. Records selected microarchitectural events
Hardware performance counters record events such as CPU cycles, cache misses or branch mispredictions. Profiling tools use these values to locate bottlenecks.
Computer Architecture MCQs — Set 4 (Questions 151–200)
Choose an answer and reveal the correct option and explanation.
Question 151. What does NUMA mean in a multiprocessor memory system?
- Every memory location has identical latency
- There is no physical RAM
- Memory access latency depends on which node holds the data
- Only GPU devices share memory
Show correct answer and explanation
Correct answer: C. Memory access latency depends on which node holds the data
Nonuniform Memory Access means that access time varies with memory location relative to the requesting processor. Local memory is usually faster than memory attached to another NUMA node.
Question 152. Why is memory affinity useful on NUMA hardware?
- Only increasing clock voltage
- Deleting remote memory
- Changing data types
- Placing threads near the memory they frequently use
Show correct answer and explanation
Correct answer: D. Placing threads near the memory they frequently use
Keeping frequently accessed data near the cores that use it reduces remote memory traffic. Thread placement and memory allocation policies therefore affect NUMA performance.
Question 153. What makes a NUMA system cache coherent?
- Maintains shared-memory coherence across its nodes
- Disables every private cache
- Allows only one core
- Uses no memory controller
Show correct answer and explanation
Correct answer: A. Maintains shared-memory coherence across its nodes
Cache-coherent NUMA provides a shared address space while coordinating cached copies across nodes. Access times can still differ according to physical location.
Question 154. What is the purpose of directory-based cache coherence?
- Requires only one broadcast wire for all chips
- Tracks sharers or ownership information to coordinate cache-line access
- Never records any state
- Only stores file paths
Show correct answer and explanation
Correct answer: B. Tracks sharers or ownership information to coordinate cache-line access
A coherence directory records which caches hold or own a line. Directory messages coordinate invalidation and data transfer without broadcasting every request system-wide.
Question 155. How does snooping cache coherence operate?
- Only executes SQL requests
- Compresses all cache lines
- Observes relevant shared interconnect transactions for coherence events
- Only changes instruction names
Show correct answer and explanation
Correct answer: C. Observes relevant shared interconnect transactions for coherence events
Snooping caches monitor a shared interconnect or suitable broadcast mechanism for transactions relevant to their cache lines. They change states to maintain coherence.
Question 156. What is the main responsibility of a cache-coherence protocol?
- Every program is data-race free
- All distributed databases are linearizable
- All threads execute in order
- Appropriate consistency for writes to individual shared memory locations
Show correct answer and explanation
Correct answer: D. Appropriate consistency for writes to individual shared memory locations
Coherence coordinates the values observed for a given shared memory location, including writes and invalidation of stale copies. It does not alone define all ordering between different locations.
Question 157. Why may synchronization require a memory fence?
- Processors may reorder memory effects within permitted consistency rules
- All writes are always visible immediately
- Only compilers reorder text
- Cache is always disabled
Show correct answer and explanation
Correct answer: A. Processors may reorder memory effects within permitted consistency rules
Modern processors may reorder or delay memory effects within the architecture’s consistency rules. A fence establishes specified ordering needed by synchronization algorithms.
Question 158. Why can false sharing degrade multicore performance?
- Always improves performance
- Comes from independent writes sharing one coherence granule
- Requires equal variable names
- Only occurs on disk
Show correct answer and explanation
Correct answer: B. Comes from independent writes sharing one coherence granule
Two independent variables may occupy one cache line. Writes by different cores then repeatedly invalidate that same line, causing unnecessary coherence traffic.
Question 159. What is thread pinning or processor affinity?
- Always increases the number of cores
- Changes source language
- Binds threads to specified processors or processor sets
- Eliminates all synchronization
Show correct answer and explanation
Correct answer: C. Binds threads to specified processors or processor sets
Thread pinning restricts a worker to selected CPUs or cores. It can improve cache reuse and memory locality but may reduce scheduling flexibility.
Question 160. How does work stealing help task scheduling?
- Every worker stays idle when its queue empties
- Only uses one worker
- Requires no task dependencies
- Idle workers take tasks from other workers’ queues
Show correct answer and explanation
Correct answer: D. Idle workers take tasks from other workers’ queues
An idle worker can steal queued work from a busy worker. This distributes irregular tasks more evenly and reduces idle processor time.
Question 161. What is SIMT execution on a GPU?
- Groups threads executing a common instruction stream with masks for divergence
- Requires one GPU core per OS process
- Uses only scalar CPU instructions
- Never branches
Show correct answer and explanation
Correct answer: A. Groups threads executing a common instruction stream with masks for divergence
SIMT groups hardware threads that execute a shared instruction stream while individual lanes may be masked. Divergent control flow can require separate masked paths.
Question 162. What is a GPU warp or wavefront?
- Only a graphics file
- A hardware-scheduled group of execution lanes or threads
- A disk partition
- A cache tag
Show correct answer and explanation
Correct answer: B. A hardware-scheduled group of execution lanes or threads
A warp or wavefront is a hardware-scheduled group of GPU lanes or threads. Its exact width and execution rules depend on the GPU architecture.
Question 163. What is GPU warp divergence?
- Every lane reads the same value
- All lanes are disabled
- Different threads in a group follow different control paths
- Only a CPU exception
Show correct answer and explanation
Correct answer: C. Different threads in a group follow different control paths
Divergence occurs when threads in the same execution group follow different branches. Executing the different paths can reduce effective lane utilization.
Question 164. What does GPU memory coalescing optimize?
- Only sorts threads by name
- Always turns global memory into registers
- Requires no addresses
- Combines nearby lane accesses into efficient memory transactions
Show correct answer and explanation
Correct answer: D. Combines nearby lane accesses into efficient memory transactions
Coalescing combines compatible memory requests from neighboring lanes into efficient memory transactions. Nearby aligned accesses often use bandwidth better.
Question 165. What does GPU occupancy measure?
- The fraction or number of resident warps or threads relative to architectural limits
- Only disk capacity
- Only display resolution
- The count of installed GPUs
Show correct answer and explanation
Correct answer: A. The fraction or number of resident warps or threads relative to architectural limits
Occupancy describes active or resident warps or threads relative to a GPU’s capacity. It helps hide latency, but the highest occupancy does not always maximize speed.
Question 166. What characterizes heterogeneous computing?
- Only one CPU core
- Uses different kinds of processors or accelerators
- Only identical memory chips
- Only one programming language
Show correct answer and explanation
Correct answer: B. Uses different kinds of processors or accelerators
Heterogeneous systems combine devices with differing strengths, such as CPUs, GPUs and specialized accelerators. Work is assigned according to device capabilities.
Question 167. Which kind of computation suits a tensor accelerator?
- Only packet routing
- Only hard disk seek
- Matrix-like multiply-accumulate workloads
- Only branch prediction
Show correct answer and explanation
Correct answer: C. Matrix-like multiply-accumulate workloads
Tensor accelerators are optimized for matrix-like multiply-accumulate calculations common in machine learning and numerical linear algebra. Supported precision formats affect results.
Question 168. What does arithmetic intensity measure?
- Only CPU clock frequency
- Only number of cache sets
- The instruction word width
- Operations performed per byte of data movement
Show correct answer and explanation
Correct answer: D. Operations performed per byte of data movement
Arithmetic intensity compares arithmetic work with transferred data, often operations per byte. Higher intensity can make a workload limited by computation rather than memory bandwidth.
Question 169. What quantities define the roofline performance model?
- Compute peak memory bandwidth and arithmetic intensity
- Only CPU instruction length
- Only storage capacity
- Only voltage
Show correct answer and explanation
Correct answer: A. Compute peak memory bandwidth and arithmetic intensity
The roofline model relates arithmetic intensity, peak arithmetic throughput and memory bandwidth. Its upper performance bound is the lower of compute peak and bandwidth times intensity.
Question 170. When is a workload considered memory bound?
- Always has zero arithmetic
- Is limited mainly by data movement or memory service capacity
- Cannot use a GPU
- Only uses instructions with no operands
Show correct answer and explanation
Correct answer: B. Is limited mainly by data movement or memory service capacity
A memory-bound workload is limited primarily by moving or accessing data. Reducing memory traffic or improving locality can help more than increasing arithmetic units.
Question 171. When is a workload compute bound?
- Never reads RAM
- Must be sequential
- Is limited mainly by arithmetic execution capability
- Always has no cache misses
Show correct answer and explanation
Correct answer: C. Is limited mainly by arithmetic execution capability
A compute-bound workload is limited mainly by arithmetic execution throughput. Improvements to vectorization or compute-unit utilization may raise performance.
Question 172. What does operation latency measure?
- Only operations per second
- Only number of registers
- Only cache capacity
- Time for an individual operation to complete
Show correct answer and explanation
Correct answer: D. Time for an individual operation to complete
Latency measures elapsed time from an operation’s initiation to completion. A system can have high throughput even when individual operations have relatively high latency.
Question 173. What does computational throughput measure?
- Completed work per unit time
- Only first response delay
- Only power voltage
- The number of instruction formats
Show correct answer and explanation
Correct answer: A. Completed work per unit time
Throughput measures completed work per unit time, such as instructions per second or bytes per second. It describes capacity rather than the delay of one request.
Question 174. How is speedup of a new design calculated?
- New time divided by old time
- Old execution time divided by new execution time
- Only clock speed ratio
- New instruction count plus old count
Show correct answer and explanation
Correct answer: B. Old execution time divided by new execution time
Speedup is old execution time divided by new execution time for the same workload. For example, reducing runtime from 12 s to 4 s gives speedup 3.
Question 175. How can energy efficiency of a processor be measured?
- Only clock cycles per second
- Only cache capacity
- Useful work per joule
- Only number of cores
Show correct answer and explanation
Correct answer: C. Useful work per joule
One energy-efficiency metric is useful completed work per joule. Energy efficiency must consider both power use and the amount of useful work performed.
Question 176. Which factors approximately determine dynamic switching power in CMOS?
- Only disk rotation speed
- Only compiler line count
- Only process ID
- Switching activity capacitance voltage squared and frequency
Show correct answer and explanation
Correct answer: D. Switching activity capacitance voltage squared and frequency
Dynamic CMOS power is approximately proportional to switching activity × effective capacitance × voltage squared × clock frequency: P ≈ αCV²f.
Question 177. Why does reducing supply voltage lower switching energy?
- Dynamic switching energy
- All leakage by exactly zero
- Every instruction count
- Only cache associativity
Show correct answer and explanation
Correct answer: A. Dynamic switching energy
Charging and discharging capacitance consumes energy proportional to voltage squared. Lower voltage therefore reduces dynamic energy, though frequency and reliability constraints matter.
Question 178. What does clock gating reduce?
- All leakage current automatically
- Dynamic power in inactive clocked regions
- Disk access time only
- Program instruction count
Show correct answer and explanation
Correct answer: B. Dynamic power in inactive clocked regions
Clock gating stops unnecessary clock transitions in inactive sequential circuits. Because clock networks can switch frequently, gating can reduce dynamic power.
Question 179. What does power gating primarily reduce?
- Only branch hazards
- All RAM refresh cost necessarily
- Leakage power in inactive blocks
- Only logical fan-in
Show correct answer and explanation
Correct answer: C. Leakage power in inactive blocks
Power gating disconnects inactive circuitry from its supply to reduce leakage power. Waking a gated block can require time and energy.
Question 180. Why does thermal throttling reduce operating speed?
- Caches become larger
- All cores shut down permanently
- Compiler changes opcodes
- Hardware reduces operating rate to manage temperature or power limits
Show correct answer and explanation
Correct answer: D. Hardware reduces operating rate to manage temperature or power limits
Thermal management may lower clock frequency or voltage when temperature or power limits are reached. This protects hardware at the cost of temporary performance.
Question 181. What is a hardware bus?
- A shared communication pathway among hardware components
- Only an assembly mnemonic
- Only a cache replacement rule
- Only a file system
Show correct answer and explanation
Correct answer: A. A shared communication pathway among hardware components
A bus is a communication channel shared by system components for data, address or control information. Arbitration may be needed if several devices request access.
Question 182. What is a crossbar interconnect?
- Always has just one shared wire
- Provides multiple switchable paths between sources and destinations
- Only serves one CPU instruction
- Stores only network files
Show correct answer and explanation
Correct answer: B. Provides multiple switchable paths between sources and destinations
A crossbar provides switchable routes between inputs and outputs. It can support concurrent transfers to different destinations, subject to its ports and switching resources.
Question 183. What is a network-on-chip (NoC)?
- Only means internet access for a desktop
- Only performs encryption
- Connects on-chip cores and components using packet or routed links
- Always eliminates latency
Show correct answer and explanation
Correct answer: C. Connects on-chip cores and components using packet or routed links
A network-on-chip uses routed interconnects to connect cores, caches and other on-chip blocks. Packet or flit-based transfers can scale better than one shared bus.
Question 184. What does bisection bandwidth measure?
- Only memory address bits
- Only cache hit rate
- Only CPU voltage
- Measures transfer capacity across a division of the interconnect
Show correct answer and explanation
Correct answer: D. Measures transfer capacity across a division of the interconnect
Bisection bandwidth measures the communication capacity across a partition dividing the interconnect into two parts. It helps characterize network throughput under distributed traffic.
Question 185. How are components connected in a ring interconnect?
- Connects components in a cycle of links
- Only in a star
- Never uses routers
- Has no communication latency
Show correct answer and explanation
Correct answer: A. Connects components in a cycle of links
A ring topology joins components in a cycle. Messages follow one or more ring directions and may need multiple hops to reach their destination.
Question 186. What is PCI Express commonly used for?
- Register renaming
- High-speed peripheral interconnection
- Only floating-point arithmetic
- Only CPU clock distribution
Show correct answer and explanation
Correct answer: B. High-speed peripheral interconnection
PCI Express is a high-speed serial expansion interconnect used for devices such as network cards, storage controllers and GPU accelerators.
Question 187. What does direct memory access (DMA) allow?
- Every transfer to execute on ALU only
- No memory access
- Devices or controllers to transfer memory data with reduced per-byte CPU intervention
- Only compiler control
Show correct answer and explanation
Correct answer: C. Devices or controllers to transfer memory data with reduced per-byte CPU intervention
DMA allows a device or DMA engine to transfer blocks of data between device buffers and memory without requiring the CPU to copy every byte.
Question 188. What is the purpose of an IOMMU?
- Only instruction decoding
- Only CPU branch prediction
- A disk file compressor
- Address translation and isolation for device memory access
Show correct answer and explanation
Correct answer: D. Address translation and isolation for device memory access
An IOMMU translates and controls device-accessible addresses. It provides isolation against unauthorized DMA access and supports virtualized I/O.
Question 189. What does a hardware interrupt signal?
- An event requesting processor attention and handler execution
- Only a compiler error
- Only a cache hit
- Only an instruction format
Show correct answer and explanation
Correct answer: A. An event requesting processor attention and handler execution
An interrupt requests attention from a processor, often indicating a device event or fault. The processor can suspend normal execution and invoke an appropriate handler.
Question 190. What is polling in device communication?
- Always using interrupt delivery
- Repeatedly checking device status in software
- Only allocating cache lines
- Only encrypting the bus
Show correct answer and explanation
Correct answer: B. Repeatedly checking device status in software
Polling repeatedly reads a device’s status to determine whether it is ready or has completed work. It avoids some interrupt overhead but can waste CPU cycles.
Question 191. What does ECC memory protect against?
- Eliminating every hardware fault
- Always doubling RAM speed
- Detecting and correcting specified memory bit errors
- Only making addresses larger
Show correct answer and explanation
Correct answer: C. Detecting and correcting specified memory bit errors
Error-correcting codes can detect and correct supported bit-error patterns in memory, such as common single-bit errors, depending on the ECC scheme.
Question 192. Which bit-error patterns can simple parity detect?
- All possible multiple-bit errors
- Any software logic error
- Every timing error
- Some bit-error patterns such as a single-bit flip
Show correct answer and explanation
Correct answer: D. Some bit-error patterns such as a single-bit flip
A parity bit changes when an odd number of protected bits flip. Thus simple parity detects single-bit errors but may miss an even number of flips.
Question 193. What is the function of a watchdog timer?
- Detects missed progress and can trigger recovery actions
- Only increases CPU clock
- Only changes cache line size
- Only optimizes SQL
Show correct answer and explanation
Correct answer: A. Detects missed progress and can trigger recovery actions
A watchdog timer detects a missing expected progress signal and can initiate recovery, such as resetting a hung subsystem.
Question 194. What failure protection can RAID mirroring provide?
- The need for all backups disappears
- Availability under certain drive failures
- CPU integer precision
- Only instruction encoding
Show correct answer and explanation
Correct answer: B. Availability under certain drive failures
Mirroring keeps copies of data on separate drives so service may survive a supported drive failure. Mirroring does not protect against all simultaneous failures or logical corruption.
Question 195. Why are backups still needed when RAID mirroring is used?
- RAID never stores files
- Mirroring removes all data
- Deletion corruption and ransomware can affect mirrored data
- Only caches need backups
Show correct answer and explanation
Correct answer: C. Deletion corruption and ransomware can affect mirrored data
Accidental deletion, malware, corruption or ransomware can affect all mirrored copies. Independent versioned backups provide recovery points for logical data loss.
Question 196. What is the purpose of a performance benchmark?
- Only changes BIOS passwords
- Guarantees future speed for all tasks
- Only reads CPU serial numbers
- Measures a workload under controlled conditions
Show correct answer and explanation
Correct answer: D. Measures a workload under controlled conditions
A benchmark measures performance on a specified workload under stated conditions. Results are meaningful only when workload, hardware and measurement method are relevant.
Question 197. What is the maximum theoretical speedup if one quarter of the work is strictly serial?
- 4
- 8
- 16
- Unlimited
Show correct answer and explanation
Correct answer: A. 4
With serial fraction f = 0.25, Amdahl’s limit as parallel resources approach infinity is 1/f = 4. The serial part remains unaccelerated.
Question 198. What perspective does Gustafson’s law offer on parallel speedup?
- Only cache line indexing
- Scaled workload speedup with increasing processor resources
- Only instruction encoding
- Only DRAM refresh
Show correct answer and explanation
Correct answer: B. Scaled workload speedup with increasing processor resources
Gustafson’s law considers increasing problem size as more processors are added. Scaled speedup can grow even when fixed-workload speedup is limited by Amdahl’s law.
Question 199. What is a scalability bottleneck?
- Always the fastest component
- Only a compiler keyword
- A resource or coordination limit preventing further performance growth
- Only an empty register
Show correct answer and explanation
Correct answer: C. A resource or coordination limit preventing further performance growth
A bottleneck is a resource or coordination constraint that limits the gain from adding more capacity elsewhere. Memory bandwidth or synchronization can be limiting factors.
Question 200. What is the goal of a balanced computer architecture?
- Only maximum clock frequency regardless of cost
- Only largest possible caches
- Only one instruction type
- Appropriate compute memory and interconnect resources for its target workload
Show correct answer and explanation
Correct answer: D. Appropriate compute memory and interconnect resources for its target workload
A balanced architecture allocates suitable processing, memory and interconnect resources to match its target workloads. Improving just one component may have little overall benefit.
