GATE 2015 (Session 3) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2015 (Session 3)

65 questions

MCQ 45 · NAT 201-mark 30 · 2-mark 35

Questions 46–50 of 65

Q46Network Layer Protocol2 marksNAT
In the network 200.10.11.144/27, the fourth octet (in decimal) of the last IP address of the network which can be assigned to a host is ____________.

Q48Pipeline Processor2 marksNAT
Consider the following reservation table for a pipeline having three stages S1,S2 and S3.
Time → 1 2 3 4 5 S1 S2 S3 X X X X X
The minimum average latency (MAL) is ________.

Q49Pipeline Processor2 marksMCQ−0.67 if wrong
Consider the following code sequence having five instructions I1 to I5. Each of these instructions has the following format.

OP Ri, Rj, Rk

where operation OP is performed on contents of registers Rj and Rk and the result is stored in register Ri.

I1: ADD R1, R2, R3
I2: MUL R7, R1, R3
I3: SUB R4, R1, R5
I4: ADD R3, R2, R4
I5: MUL R7, R8, R9

Consider the following three statements.
S1: There is an anti-dependence between instructions l2 and l5
S2: There is an anti-dependence between instructions l2 and l4
S3: Within an instruction pipeline an anti-dependence always creates one or more stalls

Which one of above statements is/are correct?

Q50Array2 marksMCQ−0.67 if wrong
Consider the following two C code segments. Y and X are one and two dimensional arrays of size n and nxn respectively, where 2≤n≤102\leq n\leq 10. Assume that in both code segments, elements of Y are initialized to 0 and each element X[i][j] of array X is initialized to i+j. Further assume that when stored in main memory all elements of X are in same main memory page frame.
Code segment 1:
//initialize elements of Y to 0
//initialize elements X[i][j] of X to i+j
for(i = 0; i < n; i++)
Y[i] += X[0][i]; 
Code Segment 2:
//initialize elements of Y to 0
//initialize elements X[i][j] of X to i+j
for(i = 0; i < n; i++)
Y[i] += X[i][0];
Which of the following statements is/are correct?
S1: Final contents of array Y will be same in both code segments
S2: Elements of array X accessed inside the for loop shown in code segment 1 are contiguous in main memory
S3: Elements of array X accessed inside the for loop shown in code segment 2 are contiguous in main memory