Three concurrent processes X, Y, and Z execute three different code segments that access and update certain shared variables. Process X executes the P operation (i.e., wait) on semaphores a, b and c; process Y executes the P operation on semaphores b, c and d; process Z executes the P operation on semaphores c, d, and a before entering the respective code segments. After completing the execution of its code segment, each process invokes the V operation (i.e., signal) on its three semaphores. All semaphores are binary semaphores initialized to one. Which one of the following represents a deadlock-free order of invoking the P operations by the processes?
A
X:P(a)P(b)P(c)
Y:P(b)P(c)P(d)
Z:P(c)P(d)P(a)
B
X:P(b)P(a)P(c)
Y:P(b)P(c)P(d)
Z:P(a)P(c)P(d)
C
X:P(b)P(a)P(c)
Y:P(c)P(b)P(d)
Z:P(a)P(c)P(d)
D
X:P(a)P(b)P(c)
Y:P(c)P(b)P(d)
Z:P(c)P(d)P(a)
2
GATE CSE 2010
MCQ (Single Correct Answer)
Consider the methods used by processes P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1 and S2 are randomly assigned.
Which of the following statement describes the properties achieved?
A
Mutual exclusion but not progress
B
Progress but not mutual exclusion
C
Neither mutual exclusion nor progress
D
Both mutual exclusion and progress
3
GATE CSE 2002
MCQ (Single Correct Answer)
Which of the following scheduling algorithms is non-preemptive?
A
Round Robin
B
First-In-First-Out
C
Multilevel Queue Scheduling
D
Multilevel Queue Scheduling with feedback
4
GATE CSE 2001
MCQ (Single Correct Answer)
Where does the swap space reside?
A
RAM
B
Disk
C
ROM
D
On-chip cache
Write for Us
Do you want to write for us? Help us by contributing to our platform.