The hardware implementation which provides mutual exclusion is

2020

The hardware implementation which provides mutual exclusion is

  1. A.

    Semaphores

  2. B.

    Test and set instruction

  3. C.

    Both options

  4. D.

    None of the options

Attempted by 358 students.

Show answer & explanation

Correct answer: B

Mutual exclusion ensures that only one process can access a critical section at any given time. Solutions are categorized into software and hardware implementations. Software solutions include semaphores, monitors, and message passing, which rely on underlying hardware primitives. Hardware implementations involve atomic instructions provided directly by the CPU architecture. The Test and Set instruction is a specific hardware primitive that allows atomic reading and modification of memory, making it a direct hardware implementation for mutual exclusion. Since the question specifically asks for a hardware implementation rather than a software mechanism, the Test and Set instruction is the correct choice.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Isro