adplus-dvertising
frame-decoration

Question

A counting semaphore was initialized to 10. Then 6 P (wait) operations and 4V (signal) operations were completed on this semaphore. The resulting value of the semaphore is

a.

0

b.

8

c.

10

d.

12

Posted under Operating System

Answer: (b).8

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. A counting semaphore was initialized to 10. Then 6 P (wait) operations and 4V (signal) operations were completed on this semaphore. The resulting value of the semaphore is

Similar Questions

Discover Related MCQs

Q. The following program consists of 3 concurrent processes and 3 binary semaphores. The semaphores are initialized as S0=1, S1=0, S2=0.
Process P0 :
while (true) {
wait (S0);
print (0);
release (S1);
release (S2);
}

Process P1 :
wait (S1);
Release (S0);

Process P2 :
wait (S2);
release (S0);
How many times will process P0 print '0'?

Q. What is said to happen when the result of computation depends on the speed of the processes involved?

Q. Consider a counting semaphore which was initialized to 10 and then 6P (wait) operations and 4v(signal) operations were completed on this semaphore. What is the resulting value of semaphore?

Q. Let P1 and P2 be the two processes and S1 and S2 be the two shared Boolean variables. The initial values of S1 and S2 are randomly assigned. For accessing the critical sections of P1 and P2 the methods used by them are given below:

Method used by P1
While ( S1 == S2 );
Critical section
S1 = S2;

Method used by P2
While ( S1! = S2 )
Critical section
S2 = not (S1);

Which statement / s describes that the properties are achieved?

Q. Which is the device that should get the highest priority in assigning the interrupts?

Q. Scissoring enables

Q. ............... refers to the ability of multiple process (or threads) to share code, resources or data in such a way that only one process has access to shared object at a time.

Q. ................. is the ability of multiple process to co-ordinate their activities by exchange of information.

Q. …………… is a condition in which there is a set of concurrent processes, only one of which is able to access a given resource or perform a given function at any time.

Q. …………………. Techniques can be used to resolve conflicts, such as competition for resources, and to synchronize processes so that they can cooperate.

Q. Producer consumer problem can be solved using

Q. Concurrent access to shared data may result in :

Q. A situation where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which access takes place is called :

Q. The segment of code in which the process may change common variables, update tables, write into files is known as :

Q. The following three conditions must be satisfied to solve the critical section problem :

Q. Mutual exclusion implies that :

Q. Bounded waiting implies that there exists a bound on the number of times a process is allowed to enter its critical section :

Q. A minimum of _____ variable(s) is/are required to be shared between processes to solve the critical section problem.

Q. In the bakery algorithm to solve the critical section problem :

Q. An un-interruptible unit is known as :