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

GATE 2005

203 questions

MCQ 2031-mark 203

Questions 86–90 of 203

Q86IO Interface1 markMCQ−0.33 if wrong
Normally user programs are prevented from handling I/O directly by I/O instructions in them. For CPUs having explicit I/O instructions, such I/O protection is ensured by having the I/O instructions privileged. In a CPU with memory mapped I/O, there is no explicit I/O instruction. Which one of the following is true for a CPU with memory mapped I/O?

Q87Interrupt1 markMCQ−0.33 if wrong
Which one of the following is true for a CPU having a single interrupt request line and a single interrupt grant line?

Q88Pipeline Processor1 markMCQ−0.33 if wrong
We have two designs D1 and D2 for a synchronous pipeline processor. D1 has 5 pipeline stages with execution times of 3 nsec, 2 nsec, 4 nsec, 2 nsec and 3 nsec while the design D2 has 8 pipeline stages each with 2 nsec execution time How much time can be saved using design D2 over design D1 for executing 100 instructions?

Q89Pipeline Processor1 markMCQ−0.33 if wrong
A 5 stage pipelined CPU has the following sequence of stages:

IF - Instruction fetch from instruction memory,
RD - Instruction decode and register read,
EX - Execute: ALU operation for data and address computation,
MA - Data memory access - for write access, the register read at RD stage is used,
WB - Register write back. 
Consider the following sequence of instructions:
I1 : L R0, loc1;        R0 <= M[loc1]
I2 : A R0, R0;           R0 <= R0 + R0
I3 : S R2, R0;           R2 <= R2 - R0
 
Let each stage take one clock cycle. What is the number of clock cycles taken to complete the above sequence of instructions starting from the fetch of I1 ?

Q90Loop1 markMCQ−0.33 if wrong
Consider line number 3 of the following C-program.

int main ( ) { /* Line 1 */
int I, N; /* Line 2 */
fro (I =0, I < N, I++); /* Line 3 */
}
Identify the compiler's response about this line while creating the object-module: