GATE CS 2025 Set 2 | Question 61
An application executes \(6.4 \times 10^{8}\) number of instructions in 6.3 seconds. There are four types of instructions, the details of which are given in the table. The duration of a clock cycle in nanoseconds is _________. (rounded off to one decimal place)
| Instruction type | Clock cycles required per instruction (CPI) | Number of instructions executed |
|---|---|---|
| Branch | 2 | \(2.25 \times 10^{8}\) |
| Load | 5 | \(1.20 \times 10^{8}\) |
| Store | 4 | \(1.65 \times 10^{8}\) |
| Arithmetic | 3 | \(1.30 \times 10^{8}\) |
Explanation
Answer: 3
The total number of clock cycles is the CPI-weighted sum of the instruction counts:
\[(2 \times 2.25 + 5 \times 1.20 + 4 \times 1.65 + 3 \times 1.30) \times 10^{8} = (4.5 + 6.0 + 6.6 + 3.9) \times 10^{8} = 21 \times 10^{8}\]
The four counts add up to \(6.4 \times 10^{8}\), as stated, so the average CPI is \(21 / 6.4 \approx 3.28\).
Dividing the run time by the cycle count gives the clock cycle time:
\[\frac{6.3\ \text{s}}{21 \times 10^{8}} = 3 \times 10^{-9}\ \text{s} = 3.0\ \text{ns}\]
Answer: 3.0