At a particular time of computation, the value of a counting semaphore is 10. Then 12 P operations and “x” V operations were performed on this semaphore. If the final value of semaphore is 7, x will be :
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. 9
Explanation
Each P subtracts 1 and each V adds 1: 10 − 12 + x = 7, so x = 9.
More System Software and Operating System questions
- In a paged memory, the page hit ratio is 0.40. The time required to access a page in secondary memory is equal to 120 ns. The time required…
- In a multi-user operating system, 30 requests are made to use a particular resource per hour, on an average. The probability that no reques…
- Normally user programs are prevented from handling I/O directly by I/O instructions in them. For CPUs having explicit I/O instructions, suc…
- Which UNIX/Linux command is used to make all files and sub-directories in the directory “progs” executable by all users ?
- Which of the following statements are true ? (a) External Fragmentation exists when there is enough total memory space to satisfy a request…
- Page information in memory is also called as Page Table. The essential contents in each entry of a page table is/are _________.