Placement papers on Operating System - Set 12

Placement papers on Operating System - Set 12


Q1. X[0], x[1] …………x[4] are the mutexes (binary semaphore) and P[0], P[1]…….P[4] are the processes. What will happen if each process executes the following?

Wait (x[i]; wait (x [i+1] mode4]) ;
…………..
Release (x[i]; release (x [i+1] mode4]) ;

1. This could cause thrashing.
2. This could cause Deadlock
3. This could cause starvation but not deadlock
4. None of the above
View Answer / Hide Answer

ANSWER: 2. This could cause Deadlock




Q2. If a processor does not have any stack pointer register, then

1. It cannot have nested subroutine calls
2. It cannot have interrupts
3. It cannot have subroutine call instruction
4. All sequences of subroutine calls and also interrupts are possible.
View Answer / Hide Answer

ANSWER: 3. It cannot have subroutine call instruction




Q3. Which one of the following is correct for a critical region?

1. It is a program segment that often causes unexpected system crashes
2. It is a program segment that has not been proved bug-free.
3. It is a program segment which is enclosed by a pair of P and V operations on semaphores
4. It is a program segment where shared resources are accessed.
View Answer / Hide Answer

ANSWER: 4. It is a program segment where shared resources are accessed.




Q4. What is the solution to the problem of Dining Philosophers?

1. One philosopher should pick up the left fork before the right fork and all others should pick up the right fork before the left fork.
2. All philosophers should pick up the left fork before the right fork
3. All philosophers should pick up the right fork before the left fork
4. None of the above
View Answer / Hide Answer

ANSWER: All philosophers should pick up the left fork before the right fork




Q5. Let the value of counting semaphore at any particular time 7 and 20P operations and 15V operations were completed on this semaphore. What is the resulting value of the semaphore?

1. 4
2. 10
3. 50
4. 2
View Answer / Hide Answer

ANSWER: 4. 2


Post your comment