Site icon T4Tutorials.com

Task Synchronization – Real-time Systems MCQs

1. What is the main purpose of task synchronization in real-time systems?

(A) To reduce CPU utilization


(B) To increase task execution time


(C) To coordinate access to shared resources and avoid conflicts


(D) To execute tasks randomly



2. Which problem occurs when two or more tasks access a shared resource simultaneously without proper synchronization?

(A) Priority inversion


(B) Race condition


(C) Deadlock


(D) Periodic task violation



3. Which mechanism is commonly used for task synchronization?

(A) Semaphores and mutexes


(B) CPU scheduling only


(C) Memory allocation


(D) Task deletion



4. A mutex is primarily used to:

(A) Protect shared resources from simultaneous access


(B) Execute tasks faster


(C) Increase task periods


(D) Reduce deadlines



5. Priority inversion occurs when:

(A) All tasks execute sequentially


(B) A high-priority task is blocked by a lower-priority task holding a resource


(C) Tasks are preempted correctly


(D) CPU is idle



6. Which protocol can prevent priority inversion in task synchronization?

(A) RMS


(B) Priority Inheritance Protocol (PIP)


(C) EDF


(D) Round-robin



7. Deadlock in task synchronization occurs when:

(A) Tasks execute without preemption


(B) CPU utilization is 100%


(C) Tasks are waiting indefinitely for resources held by each other


(D) Tasks are aperiodic



8. Which of the following is TRUE about semaphores?

(A) They can be used for mutual exclusion and signaling


(B) They only reduce task execution time


(C) They ignore task priorities


(D) They are not used in real-time systems



9. A binary semaphore is equivalent to:

(A) A mutex


(B) A task period


(C) A WCET


(D) An aperiodic task



10. In real-time systems, task synchronization is critical to:

(A) Reduce memory usage


(B) Increase CPU idle time


(C) Ignore deadlines


(D) Avoid race conditions and ensure predictable task execution



11. Which task may inherit priority temporarily in task synchronization?

(A) Low-priority task holding a resource needed by a high-priority task


(B) High-priority task waiting for aperiodic event


(C) Background task


(D) Non-preemptive task



12. Task synchronization can be implemented using:

(A) Background scheduling only


(B) CPU idle cycles


(C) Semaphores, mutexes, monitors, and condition variables


(D) Periodic task periods



13. What is the effect of improper task synchronization?

(A) Race conditions, priority inversion, and deadlocks


(B) Faster task execution


(C) Reduced WCET


(D) Increased CPU speed



14. Priority Ceiling Protocol (PCP) is used in task synchronization to:

(A) Prevent deadlocks and priority inversion


(B) Reduce task periods


(C) Increase WCET


(D) Ignore deadlines



15. A counting semaphore can be used to:

(A) Control access to a limited number of identical resources


(B) Execute tasks faster


(C) Handle periodic tasks only


(D) Ignore race conditions



16. A monitor is:

(A) A CPU scheduling algorithm


(B) A periodic task


(C) A high-level synchronization construct that combines mutual exclusion and condition variables


(D) A memory allocation scheme



17. What is a common issue when multiple tasks share resources without proper synchronization?

(A) Faster execution


(B) Deadlocks and inconsistent data


(C) Reduced CPU utilization


(D) Infinite task periods



18. In task synchronization, “blocking time” refers to:

(A) Task period


(B) Total execution time


(C) Time a high-priority task waits for a resource held by a lower-priority task


(D) WCET



19. Which of the following is used to avoid simultaneous access to critical sections?

(A) Mutexes


(B) Periods


(C) Deadlines


(D) WCET



20. Task synchronization ensures:

(A) Random execution of tasks


(B) Correct and predictable execution of tasks accessing shared resources


(C) Increased WCET only


(D) Task periods are doubled



Exit mobile version