MCQOPTIONS
Bookmark
Saved Bookmarks
→
Operating System
→
Process Scheduling Queue
→
In order to allow only one process to enter its cr...
1.
In order to allow only one process to enter its critical section, binary semaphore are initialized to
A.
0
B.
1
C.
2
D.
3
Answer» C. 2
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
A counting semaphore was initialized to 7. Then 20 P (wait) operations and x V (signal) operations were completed on this semaphore. If the final value of semaphore is 5, then the value x will be
At particular time, the value of a counting semaphore is 10, it will become 7 after
At a particular time of computation, the value of a counting semaphore is 7. Then 20 P operation and x V operations were completed on this semaphore. If the final value of the semaphore is 5, x will be
Consider the following policies for preventing deadlock in a system with mutually exclusive resources.I. Processes should acquire all their resources at the beginning of execution. If any resource is not available, all resources acquired so far are releasedII. The resources are numbered uniquely, and processes are allowed to request for resources only in increasing resource numbersIII. The resources are numbered uniquely, and processes are allowed to request for resources only in decreasing resource numbersIV. The resources are numbered uniquely. A process is allowed to request only for a resource with resource number larger than its currently held resourcesWhich of the above policies can be used for preventing deadlock?
In order to allow only one process to enter its critical section, binary semaphore are initialized to
Consider the following proposed solution for the critical section problem. There are n processes: P0…Pn – 1. In the code, function pmax returns an integer not smaller than any of its arguments. For all i, t[i] is initialized to zero.Code for Pi:do { c [i]=1; t[i] = pmax (t [0],…, t[n-1]) +1; c[i]=0; for every j ≠ I in {0,…,n-1} { while (c[j]); while (t[j] != 0 && t[j]
At a particular time of computation the value of a counting semaphore is 7. Then 20 P operations and 15 V operation were completed on this semaphore. The resulting value of the semaphore is
Each of a set of n processes executes the following code using two semaphores a and b initialized to 1 and 0, respectively. Assume that count is a shared variable initialized to 0 and not used in CODE SECTION P.CODE SECTION Pwait (a); count=count+1 ;if (count==n) signal (b) ;signal (a) ; wait (b) ; signal (b) ;CODE SECTION QWhat does the code achieve?
Consider the following solution to the producer-consumer synchronization problem. The shared buffer size is
In mass storage devices __________ is process of rearranging/relocating many small non-contiguous blocks of data, into fewer contiguous big-sized blocks.
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies