OA. free
Free
Qualcomm Embedded Systems & Hardware Embedded Systems & Hardware Medium

QUESTION 37 Which of the algorithm(s) given below is/are NOT a type of contention-based...

Qualcomm technical mcq question, verified with a worked answer. Free to practise - no sign-up.

QUESTION 37

Which of the algorithm(s) given below is/are NOT a type of contention-based algorithms for mutual exclusion in operating systems?

I) Lamport's Algorithm
II) Suzuki-Kasami Algorithm
III) Ricart-Agarwala Algorithm

Choose one option.
Show answer & explanation
Answer: D. Only (II)

Lamport's Algorithm and Ricart-Agarwala Algorithm are contention-based algorithms that use permission-based or timestamp-based approaches for mutual exclusion. Suzuki-Kasami Algorithm is a token-based (non-contention-based) algorithm where a single token is passed among processes, avoiding the contention characteristic of permission-based algorithms. Therefore, only (II) Suzuki-Kasami is NOT contention-based.

Step-by-step Derivation:
Mutual exclusion algorithms are classified into two categories:

  1. Contention-Based Algorithms: Processes compete for access by requesting permission from other processes.

    • Lamport's Bakery Algorithm (I): Uses logical clocks and timestamp ordering. Processes request access and compete for the critical section. ✓ Contention-based
    • Ricart-Agarwala Algorithm (III): Uses permission-based approach where a process requests permission from all others before entering the critical section. ✓ Contention-based
  2. Token-Based (Non-Contention) Algorithms: A single token circulates among processes; only the token holder can access the critical section.

    • Suzuki-Kasami Algorithm (II): Uses a token that circulates through a logical ring structure. Only the token holder enters the critical section, eliminating contention. ✗ NOT contention-based

Answer: Only (II) Suzuki-Kasami Algorithm is NOT contention-based.

Note: Option A references (IV) which does not exist in the question; this is a transcription error in the original options.