Vaidikalaya

MCQ On Process Synchronization


Q1. Which process can be affected by other processes executing in the system?.
  1. cooperating process
  2. child process
  3. parent process
  4. init process

Answer: a, cooperating process

Solution: 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.

Q2. 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 ________.
  1. dynamic condition
  2. race condition
  3. essential condition
  4. critical condition

Answer: b, race condition

Solution: 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.

Q3. 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?.
  1. mutual exclusion
  2. critical exclusion
  3. synchronous exclusion
  4. asynchronous exclusion

Answer: a, mutual exclusion

Solution: 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.

Q4. Which one of the following is a synchronization tool?.
  1. thread
  2. pipe
  3. semaphore
  4. socket

Answer: c, semaphore

Solution: Semaphore is a synchronization tool. Semaphore is a mechanism which synchronizes or controls access of threads on critical resources.

Q5. A semaphore is a shared integer variable __________.
  1. that can not drop below zero
  2. that can not be more than zero
  3. that can not drop below one
  4. that can not be more than one

Answer: a, that can not drop below zero

Solution: 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 it.

Q6. Mutual exclusion can be provided by the __________.
  1. mutex locks
  2. binary semaphores
  3. both mutex locks and binary semaphores
  4. none of the mentioned

Answer: c, both mutex locks and binary semaphores

Solution: Mutual exclusion can be provided by both mutex locks and binary semaphore. Mutex is a short form of Mutual Exclusion. Binary semaphore behaves similar to mutex locks.

Q7. When high priority task is indirectly preempted by medium priority task effectively inverting the relative priority of the two tasks, the scenario is called __________.
  1. priority inversion
  2. priority removal
  3. priority exchange
  4. priority modification

Answer: a, priority inversion

Solution: 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.

Q8. Process synchronization can be done on __________.
  1. hardware level
  2. software level
  3. both hardware and software level
  4. none of the mentioned

Answer: c, both hardware and software level

Solution: Process synchronization can be done on both hardware and software level.