A critical section is a program segment

2008

A critical section is a program segment

  1. A.

    which should run in a certain 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 263 students.

Show answer & explanation

Correct answer: C

A critical section is a program segment where shared resources are accessed. To prevent race conditions, access to this segment must be mutually exclusive, meaning only one process can execute it at a time.

Explore the full course: Isro