1
GATE CSE 2000
MCQ (Single Correct Answer)
+2
-0.6
Which of the following is NOT a valid deadlock prevention scheme?
A
Release all resources before requesting a new resource
B
Number the resources uniquely and never request a lower numbered resource than the last one requested.
C
Never request a resource after releasing any resource
D
Request and all required resources be allocated before execution.
2
GATE CSE 2000
MCQ (Single Correct Answer)
+1
-0.3
Let m[0] ..m[4] be mutexes (binary semaphores) and P[0] ...P[4] be processes. Suppose each process P[i] executes the following:

wait (m[i]); wait (m(m[(i+1) mod 4]))0;
.......
release (m[i]); release (m[(i+1) mod 4]);

This could cause
A
Thrashing
B
Deadlock
C
Starvation, but not the deadlock
D
None of the above
3
GATE CSE 2000
MCQ (Single Correct Answer)
+1
-0.3
The following C declarations
struct node{
  int i:
  float j;
};
struct node *s[10];
define s to be
A
An array, each element of which is a pointer to a structure of type node
B
A structure of 2 fields, each field being a pointer to an array of 10 elements
C
A structure of 3 fields: an integer, a float, and an array of 10 elements
D
An array, each element of which is a structure of type node
4
GATE CSE 2000
MCQ (Single Correct Answer)
+1
-0.3
The most appropriate matching for the following pairs

X: m=malloc(5); m= NULL;
Y: free(n); n->value = 5;
Z: char *p; *p='a';

1: using dangling
2: using uninitialized pointers
3. lost memory
is:
A
X – 1 Y – 3 Z – 2
B
X – 2 Y – 1 Z – 3
C
X – 3 Y – 2 Z – 1
D
X – 3 Y – 1 Z – 2
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