The EX stage of a pipelined processor performs the memory read operations for LOAD instructions, and the operations for the arithmetic and logic instructions. Let $t_{E X}$ denote the time taken by the EX stage to perform the operation for an instruction. For each instruction type, the values of $t_{E X}$ and $M$ (the number of instructions of that type in a sequence of 100 instructions for a program $P$ ), are given in the table below. The duration of the pipeline clock cycle is 1 nanosecond. Assume that the latch time for the interstage buffers in the pipeline is negligible.
| Instruction | $$ t_{E X} \text { in nanoseconds } $$ |
M |
|---|---|---|
| LOAD | 1.8 | 15 |
| IMUL | 1.5 | 10 |
| IDIV | 2.5 | 5 |
| FADD | 1.7 | 10 |
| FSUB | 1.7 | 5 |
| FMUL | 2.8 | 15 |
| FDIV | 3.2 | 5 |
| All other instruction | Less than 1.0 | 35 |
When program $P$ is executed, the number of clock cycles for which the pipeline is stalled due to structural hazards in the EX stage is $\_\_\_\_$ . (answer in integer)
Let $n$ be an odd number greater than 100 . Consider a binary minheap with $n$ elements stored in an array $P$ whose index starts from 1. Which of the following indices of $P$ do/does NOT correspond to any leaf node of the minheap?
Consider a hash table $P[0,1, \ldots, 10]$ that is initially empty. The hash table is maintained using open addressing with linear probing. The hash function used is $h(x)=(x+7) \bmod 11$. Consider the following sequence of insertions performed on $P$ :
$$ 1,13,22,15,11,24 $$
Which of the following positions in the hash table is/are empty after these insertions are performed?
The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree. The maximum possible height of a full binary tree with 23 nodes is $\_\_\_\_$ . (answer in integer)
GATE CSE Papers
All year-wise previous year question papers