1
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
Suppose we want to synchronize two concurrent processes P and Q using binary semaphores S and T. The code for the processes P and Q is shown below.

Process P:

while(1){
  W:
  Print '0';
  Print '0';
  X:
}

Process Q:

while(1){
  Y:
  Print '1';
  Print '1';
  Z:
}
Synchronization statements can be inserted only at points W, X, Y, and Z.

Which of the following will always lead to an output starting with 001100110011

A
P(A) at W, V(S) at X, P(T) at Y, V(T) at Z, S and T initially 1
B
P(A) at W, V(T) at X, P(T) at Y, V(S) at Z, S initially 1 and T initially 0
C
P(S) at W, V(T) at X, P(T) at Y,V(T) at Z, S and T initially 1
D
P(S) at W, V(S) at X, P(T) at Y, V(T) at Z, S initially 1 and T initially 0
2
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
Suppose we want to synchronize two concurrent processes P and Q using binary semaphores S and T. The code for the processes P and Q is shown below.

Process P:

while(1){
  W:
  Print '0';
  Print '0';
  X:
}

Process Q:

while(1){
  Y:
  Print '1';
  Print '1';
  Z:
}
Synchronization statements can be inserted only at points W, X, Y, and Z.

Which of the following will ensure that the output string never contains a substring of the form 01n0 or 10n1 where n is odd?

A
P(S) at W, V(S) at X, P(T) at Y, V(T) at Z, S and T initially 1
B
P(S) at W, V(T) at X, P(T) at Y, V(S) at Z, S and T initially 1
C
P(S) at W, V(S) at X, P(S) at Y, V(S) at Z, S initially 1
D
V(S) at W, V(T) at X, P(S) at Y, P(T) at Z, S and T initially 1
3
GATE CSE 2003
MCQ (Single Correct Answer)
+1
-0.3
In a system with $$32$$ bit virtual addresses and $$1$$ $$KB$$ page size, use of one-level page tables for virtual to physical address translation is not practical because of
A
The large amount of internal fragmentation
B
The large amount of external fragmentation
C
The large memory overhead in maintaining page tables.
D
The large computation overhead in the translation process
4
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
Which of the following is NOT an advantage of using shared, dynamically linked libraries as opposed to using statically linked libraries?
A
Smaller sizes of executable files
B
Lesser overall page fault rate in the system
C
Faster program startup
D
Existing programs need not be re-linked to take advantage of newer versions of libraries.
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12