A critical section is a program segment?

1996

A critical section is a program segment?

  1. A.

    which should run in a certain specified amount of time

  2. B.

    which avoids deadlocks

  3. C.

    where shared resources are accessed

  4. D.

    which must be enclosed by a pair of semaphore operations, P and V

Attempted by 186 students.

Show answer & explanation

Correct answer: C

A critical section is a program segment where shared resources are accessed by multiple concurrent processes. It requires synchronization mechanisms to ensure mutual exclusion and prevent race conditions when accessing these shared resources.

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

Explore the full course: Gate Guidance By Sanchit Sir