1
GATE CSE 2015 Set 3
MCQ (Single Correct Answer)
+2
-0.6
Consider the following policies for preventing deadlock in a system with mutually exclusive resources.

$$\,\,\,\,\,\,\,{\rm I}.$$ $$\,\,\,\,\,\,$$ Processes should acquire all their resources at the beginning of execution. If
$$\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,$$ any resource is not available, all resources acquired so far are released
$$\,\,\,\,\,{\rm II}.$$ $$\,\,\,\,\,\,$$ The resources are numbered uniquely, and processes are allowed to request
$$\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,$$ for resources only in increasing resource numbers
$$\,\,\,{\rm III}.$$ $$\,\,\,\,\,\,$$ The resources are numbered uniquely, and processes are allowed to request
$$\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,$$ for resources only in decreasing resource numbers
$$\,\,\,{\rm IV}.$$ $$\,\,\,\,\,\,$$ The resources are numbered uniquely. A process is allowed to request only
$$\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,$$ for a resource with resource number larger than its currently held resources

Which of the above policies can be used for preventing deadlock?

A
Any one of $${\rm I}$$ and $${\rm III}$$ but not $${\rm II}$$ or $${\rm IV}$$
B
Any one of $${\rm I},$$ $${\rm III},$$ and $${\rm IV}$$ but not $${\rm II}$$
C
Any one of $${\rm II}$$ and $${\rm III}$$ but not $${\rm I}$$ or $${\rm IV}$$
D
Any one of $${\rm I},$$ $${\rm II},$$ $${\rm III},$$ and $${\rm IV}$$
2
GATE CSE 2015 Set 3
MCQ (Single Correct Answer)
+2
-0.6
For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time?

Process Arrival Time Processing Time
A 0 3
B 1 6
D 4 4
E 6 2

A
First Come First Serve
B
Non-preemptive Shortest Job First
C
Shortest Remaining Time
D
Round Robin with Quantum value two
3
GATE CSE 2015 Set 3
MCQ (Single Correct Answer)
+1
-0.3
The maximum number of processes that can be in $$Ready$$ state for a computer system with $$n$$ $$CPUs$$ is
A
$$n$$
B
$${n^2}$$
C
$${2^n}$$
D
Independent of $$n$$
4
GATE CSE 2015 Set 3
MCQ (Single Correct Answer)
+1
-0.3
Consider the following C program segment.
#include < stdio.h >
int main()
{
    char s1[7] = "1234", *p;
    p = s1 + 2;
   *p = ā€˜0ā€™;
    printf("%s", s1);
}
What will be printed by the program?
A
12
B
120400
C
1204
D
1034
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