Advanced Computer Architecture Week 5 NPTEL Assignment Answers 2025

NPTEL Advanced Computer Architecture Week 5 Assignment Answers 2024

1. Which of the following is true regarding non-selective replay in case of a misspeculation?
a. The entire pipeline is flushed.
b. All the instructions in the window of vulnerability are squashed.
c. All the instructions in the ROB are flushed.
d. All the instructions in the instruction window are squashed.

Answer: b
Explanation: In non-selective replay, when a misspeculation is detected, all the instructions within the window of vulnerability (instructions that depend on the speculative instruction) are squashed and replayed, not the entire pipeline or instruction window.


2. The ____________ is used to squash the instructions whose timer is not equal to ____________ in non-selective replay.
a. Squash bit, 1
b. Kill wire, 1
c. Squash bit, 0
d. Kill wire, 0

Answer: d
Explanation: In non-selective replay, a “kill wire” is asserted with a time value. Instructions whose timer does not match this value are squashed. Hence, kill wire and value 0 are used.


3. When an instruction is squashed, its ready flag is ______________ .
a. Unaffected
b. Set
c. Reset
d. Removed

Answer: c
Explanation: When an instruction is squashed, it is marked invalid and its ready flag is reset so that it can be re-evaluated when replayed.


4. In the delayed selective replay scheme, when is the poison bit set?
a. At the time of speculation.
b. At the time the instruction is issued.
c. At the time of asserting the kill wire.
d. None of these

Answer: c
Explanation: The poison bit is set when the kill wire is asserted, indicating that subsequent dependent instructions may need to be replayed due to a mis-speculated instruction.


5. Which among the following can help to save orphan instructions? (Select the most appropriate option).
a. Poison bit
b. Kill wire
c. Early broadcast
d. A second broadcast at an appropriate time

Answer: d
Explanation: A second broadcast can help resolve orphan instructions by giving them the required operand values at the right time, thus saving them from being unnecessarily squashed.


6. In token based selective replay, if the maximum number of tokens is N, then the size of the token vector is __ bits.
a. N
b. N-1
c. 2*N
d. N/2

Answer: a
Explanation: Token vectors are used to track data dependencies, and if there are N tokens, each bit in the vector represents a token. Therefore, the vector size is N bits.


7. In the ARF (Architectural Register File) based design, the temporary state (uncommitted results) of the system is available in the ____________
a. Architectural register file
b. Physical register file
c. Reorder buffer
d. None of these

Answer: c
Explanation: The ROB holds uncommitted or speculative results temporarily before they are written to the architectural register file upon instruction commit.


8. Which of the following structures doesn’t store the values of operands in the ARF (Architectural Register File) based design?
a. ARF (Architectural Register File)
b. Free list
c. ROB (Reorder Buffer)
d. IW (Instruction Window)

Answer: b
Explanation: The free list is only used to track available registers and does not store operand values. The ARF, ROB, and IW can hold operand values or metadata.


9. Which of the following is not a type of compiler-based optimization?
a. Strength reduction
b. Constant folding
c. Common subexpression evaluation
d. Dead code elimination

Answer: c
Explanation: The correct option is “Common subexpression elimination” not “evaluation”. The term “evaluation” is not standard in compiler optimization.


10. Which of the following statements is true?
a. Induction variable based optimization is not a loop-based optimization.
b. Loop invariant based code motion is not a compiler-based optimization.
c. Loop fusion increases the instruction count and the number of branches.
d. Software pipelining can accommodate multi-cycle loads without stalls.

Answer: d
Explanation: Software pipelining schedules instructions from different iterations in overlapping fashion, enabling multi-cycle loads to complete without stalling the pipeline.