Operating System Multiple Choice Questions – Process Synchronization

This set of Operating System Multiple Choice Questions & Answers (MCQs) focuses on “Process Synchronization”.

1. Which process can be affected by other processes executing in the system?
a) cooperating process
b) child process
c) parent process
d) init process
View Answer

Answer: a
Explanation: A cooperating process can be affected by other processes executing in the system. Also it can affect other processes executing in the system. A process shares data with other processes, such a process is known as a cooperating process.

2. When several processes access the same data concurrently and the outcome of the execution depends on the particular order in which the access takes place is called ________
a) dynamic condition
b) race condition
c) essential condition
d) critical condition
View Answer

Answer: b
Explanation: When several processes access the same data concurrently and the outcome of the execution depends on the particular order in which access takes place is called race condition.

3. If a process is executing in its critical section, then no other processes can be executing in their critical section. What is this condition called?
a) mutual exclusion
b) critical exclusion
c) synchronous exclusion
d) asynchronous exclusion
View Answer

Answer: a
Explanation: If a process is executing in its critical section, then no other processes can be executed in their critical section. This condition is called Mutual Exclusion. Critical section of the process is shared between multiple processes. If this section is executed by more than one or all of them concurrently then the outcome of this is not as per desired outcome. For this reason the critical section of the process should not be executed concurrently.
advertisement
advertisement

4. Which one of the following is a synchronization tool?
a) thread
b) pipe
c) semaphore
d) socket
View Answer

Answer: c
Explanation: Semaphore is a synchronization tool. Semaphore is a mechanism which synchronizes or controls access of threads on critical resources. There are two types of semaphores i) Binary Semaphore ii) Counting Semaphore.

5. A semaphore is a shared integer variable __________
a) that can not drop below zero
b) that can not be more than zero
c) that can not drop below one
d) that can not be more than one
View Answer

Answer: a
Explanation: A semaphore is a shared integer variable that can not drop below zero. In binary semaphore, if the value of the semaphore variable is zero that means there is a process that uses a critical resource and no other process can access the same critical resource until it is released. In Counting semaphore, if the value of the semaphore variable is zero that means there is no resource available.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. Mutual exclusion can be provided by the __________
a) mutex locks
b) binary semaphores
c) both mutex locks and binary semaphores
d) none of the mentioned
View Answer

Answer: c
Explanation: Mutual exclusion can be provided by both mutex locks and binary semaphore. Mutex is a short form of Mutual Exclusion. Binary semaphore also provides a mechanism for mutual exclusion. Binary semaphore behaves similar to mutex locks.

7. When high priority task is indirectly preempted by medium priority task effectively inverting the relative priority of the two tasks, the scenario is called __________
a) priority inversion
b) priority removal
c) priority exchange
d) priority modification
View Answer

Answer: a
Explanation: When a high priority task is indirectly preempted by a medium priority task effectively inverting the relative priority of the two tasks, the scenario is called priority inversion.
advertisement

8. Process synchronization can be done on __________
a) hardware level
b) software level
c) both hardware and software level
d) none of the mentioned
View Answer

Answer: c
Explanation: Process synchronization can be done on both hardware and software level. Critical section problems can be resolved using hardware synchronisation. But this method is not simple for implementation so software synchronization is mostly used.

9. A monitor is a module that encapsulates __________
a) shared data structures
b) procedures that operate on shared data structure
c) synchronization between concurrent procedure invocation
d) all of the mentioned
View Answer

Answer: d
Explanation: A monitor is a module that encapsulates shared data structures, procedures that operate on shared data structure, synchronization between concurrent procedure invocation.
advertisement

10. To enable a process to wait within the monitor __________
a) a condition variable must be declared as condition
b) condition variables must be used as boolean objects
c) semaphore must be used
d) all of the mentioned
View Answer

Answer: a
Explanation: To enable a process to wait within the monitor a condition variable must be declared as condition.

Sanfoundry Global Education & Learning Series – Operating System.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.