1
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
Which one of the first order predicate calculus statements given below correctly expresses the following English statement?

Tigers and lion attack if they are hungry of threatened.

A
$$\forall x[(tiger(x) \wedge lion(x)) \to $$$$\{ (hungry(x) \vee threatened(x)) \to attacks(x)\} ]$$
B
$$\forall x[(tiger(x) \vee lion(x)) \to $$$$\{ (hungry(x) \wedge threatened(x)) \to attacks(x)\} ]$$
C
$$\forall x[(tiger(x) \vee lion(x)) \to $$$$\{ attacks(x) \to (hungry(x)) \vee threatened(x))\} ]$$
D
$$\forall x[(tiger(x) \vee lion(x)) \to $$$$\{ (hungry(x) \vee threatened(x)) \to attacks(x)\} ]$$
2
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
A Computer system supports $$32$$-bit virtual addresses as well as $$32$$-bit physical addresses. Since the virtual address space is of the same size as the physical address space, the operating system designers decide to get rid of the virtual memory entirely. Which one of the following is true?
A
Efficient implementation of multi-user support is no longer possible.
B
The processor cache organization can be made more efficient now.
C
Hardware support for memory management is no longer needed.
D
$$CPU$$ scheduling can be made more efficient now.
3
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
Consider the following snapshot of a system running n processes. Process i is holding xi instances of a resource R, for $$1 \le i \le n$$. Currently, all instances of R are occupied. Further, for all i, process i has placed a request for an additional yi instances while holding the xi instances it already has. There are exactly two processes p and q such that yp = yq = 0. Which one of the following can serve as a necessary condition to guarantee that the system is not approaching a deadlock?
A
$$\min ({x_p},{x_q}) < {\max _{k \ne p,q}}{y_k}$$
B
$${x_p} + {x_q} \ge {\min _{k \ne p,q}}{y_k}$$
C
$$\max ({x_p},{x_q}) > 1$$
D
$$\min ({x_p},{x_q}) > 1$$
4
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
Barrier is a synchronization construct where a set of processes synchronizes globally i.e. each process in the set arrives at the barrier and waits for all others to arrive and then all processes leave the barrier. Let the number of processes in the set be three and S be a binary semaphore with the usual P and V functions. Consider the following C implementation of a barrier with line numbers shown on left.
void barrier (void) { 
1: P(S); 
2: process_arrived++; 
3: V(S); 
4: while (process_arrived !=3); 
5: P(S); 
6: process_left++; 
7: if (process_left==3) { 
8: process_arrived = 0; 
9: process_left = 0; 
10: } 
11: V(S); 
} 
The variables process_arrived and process_left are shared among all processes and are initialized to zero. In a concurrent program all the three processes call the barrier function when they need to synchronize globally.
Which one of the following rectifies the problem in the implementation?
A
Lines 6 to 10 are simply replaced by process_arrived--
B
At the beginning of the barrier the first process to enter the barrier waits until process_arrived becomes zero before proceeding to execute P(S).
C
Context switch is disabled at the beginning of the barrier and re-enabled at the end.
D
The variable process_left is made private instead of shared
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12