GATE 2007 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2007

184 questions

MCQ 1841-mark 184

Questions 66–70 of 184

Q66Pipeline Processor1 markMCQ−0.33 if wrong
Data forwarding techniques can be used to speed up the operation in presence of data dependencies. Consider the following replacements of LHS with RHS.
i. R1→Loc,Loc→R2  ≡  R1→R2,R1→LocR1\rightarrow Loc, Loc\rightarrow R2 \; \equiv \; R1\rightarrow R2, R1 \rightarrow Loc
ii. R1→Loc,Loc→R2  ≡  R1→R2R1\rightarrow Loc, Loc\rightarrow R2 \; \equiv \; R1\rightarrow R2
iii. R1→Loc,R2→Loc  ≡  R1→LocR1\rightarrow Loc, R2 \rightarrow Loc \; \equiv \; R1\rightarrow Loc
iv. R1→Loc,R2→Loc  ≡  R2→LocR1\rightarrow Loc, R2 \rightarrow Loc \; \equiv \; R2\rightarrow Loc
In which of the following options, will the result of executing the RHS be the same as executing the LHS irrespective of the instructions that follow ?

Q67Pipeline Processor1 markMCQ−0.33 if wrong
The floating point unit of a processor using a design D takes 2t cycles compared to t cycles taken by the fixed point unit. There are two more design suggestions D1D_1 and D2D_2. D1D_1 uses 30% more cycles for fixed point unit but 30% less cycles for floating point unit as compared to design D. D2D_2 uses 40% less cycles for fixed point unit but 10% more cycles for floating point unit as compared to design D. For a given program which has 80% fixed point operations and 20% floating point operations, which of the following ordering reflects the relative performances of three designs? (DiD_i > DjD_j denotes that DiD_i is faster than DjD_j)

Q68Pipeline Processor1 markMCQ−0.33 if wrong
A processor takes 12 cycles to complete an instruction II. The corresponding pipelined processor uses 6 stages with the execution times of 3, 2, 5, 4, 6 and 2 cycles respectively. What is the asymptotic speedup assuming that a very large number of instructions are to be executed?

Q69Pipeline Processor1 markMCQ−0.33 if wrong
Consider a pipelined processor with the following four stages:
IF: Instruction Fetch
ID: Instruction Decode and Operand Fetch
EX: Execute
WB: Write Back

The IF, ID and WB stages take one clock cycle each to complete the operation. The number of clock cycles for the EX stage depends on the instruction. The ADD and SUB instructions need 1 clock cycle and the MUL instruction needs 3 clock cycles in the EX stage. Operand forwarding is used in the pipelined processor. What is the number of clock cycles taken to complete the following sequence of instructions?
ADD R2, R1, R0 (R2 ←\leftarrow R1 + R0)
MUL R4, R3, R2 (R4 ←\leftarrow R3 * R2)
SUB R6, R5, R4 (R6 ←\leftarrow R5 - R4)

Q70Pipeline Processor1 markMCQ−0.33 if wrong
Following table indicates the latencies of operations between the instruction producing the result and instruction using the result.
Instruction producing the resultInstruction using the result LatencyALU OperationALU Operation2ALU OperationStore2LoadALU Operation1LoadStore0\begin{array}{|l|l|c|} \hline \textbf {Instruction producing the result} & \textbf{Instruction using the result }& \textbf{Latency} \\\hline \text{ALU Operation} & \text{ALU Operation} & 2 \\\hline \text{ALU Operation} & \text{Store} & \text{2}\\\hline \text{Load} & \text{ALU Operation} & \text{1}\\\hline \text{Load} & \text{Store} & \text{0} \\\hline \end{array}
Consider the following code segment:
Load R1, Loc 1; Load R1 from memory location Loc1
 Load R2, Loc 2; Load R2 from memory location Loc 2
 Add R1, R2, R1; Add R1 and R2 and save result in R1
 Dec R2;         Decrement R2
 Dec R1;         Decrement R1
 Mpy R1, R2, R3; Multiply R1 and R2 and save result in R3
 Store R3, Loc 3; Store R3 in memory location Loc 3 

What is the number of cycles needed to execute the above code segment assuming each instruction takes one cycle to execute?