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

GATE 2004

199 questions

MCQ 1991-mark 199

Questions 131–135 of 199

Q131Syntax-directed Translation1 markMCQ−0.33 if wrong
Consider the grammar rule E→E1−E2E \rightarrow E1 - E2 for arithmetic expressions. The code generated is targeted to a CPU having a single user register. The subtraction operation requires the first operand to be in the register. If E1 and E2 do not have nay-common sub-expression, in order to get the shortest possible code

Q132Assemblers, Linkers and Loaders1 markMCQ−0.33 if wrong
Consider a program P that consists of two source modules M1 and M2 contained in two different files. If M1 contains a reference to a function defined in M2 the reference will be resolved at

Q133System Call1 markMCQ−0.33 if wrong
A process executes the following segment of code :
 for(i = 1; i <= n; i++)
    fork ();
The number of new processes created is

Q134Thread1 markMCQ−0.33 if wrong
Which one of the following is NOT shared by the threads of the same process ?

Q135Thread1 markMCQ−0.33 if wrong
Consider the following statements with respect to user-level threads and kernel-supported threads

(i) context switch is faster with kernel-supported threads
(ii) for user-level threads, a system call can block the entire process
(iii) Kernel supported threads can be scheduled independently
(iv) User level threads are transparent to the kernel
Which of the above statements are true?