1
GATE CSE 2014 Set 3
Numerical
+2
-0
An instruction pipeline has five stages, namely, instruction fetch $$(IF),$$ instruction decode and register fetch $$(ID/RF)$$ instruction execution $$(EX),$$ memory access $$(MEM),$$ and register writeback $$(WB)$$ with stage latencies $$1$$ ns, $$2.2$$ $$ns,$$ $$2$$ $$ns,$$ $$1$$ $$ns,$$ and $$0.75$$ $$ns,$$ respectively ($$ns$$ stands for nanoseconds). To gain in terms of frequency, the designers have decided to split the $$ID/RF$$ stage into three stages $$(ID, RF1, RF2)$$ each of latency $$2.2/3$$ $$ns,$$ Also, the $$EX$$ stage is split into two stages $$(EX1, EX2)$$ each of latency $$1$$ ns. The new design has a total of eight pipeline stages. A program has $$20$$% branch instructions which execute in the $$EX$$ stage and produce the next instruction pointer at the end of the $$EX$$ stage in the old design and at the end of the $$EX2$$ stage in the new design. The IF stage stalls after fetching a branch instruction until the next instruction pointer is computed. All instructions other than the branch instruction have an average $$CPI$$ of one in both the designs. The execution times of this program on the old and the new design are $$P$$ and $$Q$$ nanoseconds, respectively. The value of $$P/Q$$ is _____________.
Your input ____
2
GATE CSE 2014 Set 3
MCQ (Single Correct Answer)
+2
-0.6
Consider the pseudocode given below. The function Dosomething () takes as argument a pointer to the root of an arbitrary tree represented by the leftMostChild-rightSibling representation. Each node of the tree is of type treeNode.
typedef struct treeNode* treeptr; 
Struct treeNode 
{ 
    Treeptr leftMostchild, rightSibiling; 
}; 
Int Dosomething (treeptr tree) 
{ 
    int value =0; 
    if (tree ! = NULL) { 
      If (tree -> leftMostchild = = NULL) 
          value=1; 
    else 
        value = Dosomething (tree->leftMostchild); 
        value = value + Dosometing (tree->rightsibiling); 
    } 
    return (value); 
}
When the pointer to the root of a tree is passed as the argument to DoSomething, the value returned by the function corresponds to the
A
number of internal nodes in the tree.
B
height of the tree
C
number of nodes without a right sibling in the tree.
D
number of leaf nodes in the tree.
3
GATE CSE 2014 Set 3
Numerical
+1
-0
Suppose depth first search is executed on the graph below starting at some unknown vertex. Assume that a recursive call to visit a vertex is made only after first checking that the vertex has not been visited earlier. Then the maximum possible recursion depth (including the initial call) is _________. GATE CSE 2014 Set 3 Data Structures - Graphs Question 24 English
Your input ____
4
GATE CSE 2014 Set 3
MCQ (Single Correct Answer)
+2
-0.6
Consider a hash table with 100 slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first 3 slots are unfilled after the first 3 insertions?
A
97 × 97 × 97)/1003
B
(99 × 98 × 97)/1003
C
(97 × 96 × 95)/1003
D
(97 × 96 × 95)/(3! × 1003)
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12