In ________, a cancellation request may take effect without waiting for the…

2018

In ________, a cancellation request may take effect without waiting for the target thread to reach a cancellation point.

Answer: A. Asynchronous cancellationConceptThread cancellation uses a cancellation state and a cancellation type to control whether and when a pending request takes effect. With asynchronous…

  1. A.

    Asynchronous cancellation

  2. B.

    Synchronous cancellation

  3. C.

    Deferred cancellation

  4. D.

    Both deferred and asynchronous cancellation

Attempted by 519 students.

Show answer & explanation

Correct answer: A

Concept

Thread cancellation uses a cancellation state and a cancellation type to control whether and when a pending request takes effect.

With asynchronous cancellation, the request may be acted on at any time. With deferred cancellation, it remains pending until the target reaches a defined cancellation point.

Application

  1. The stem says the request need not wait for the target thread to reach a cancellation point.

  2. That timing rule is the defining behavior of asynchronous cancellation.

  3. Therefore, the blank is filled by “asynchronous cancellation.”

Contrast and cross-check

  • Synchronous cancellation is not one of the two POSIX cancellation types; it suggests a coordinated request-response action.

  • Deferred cancellation waits for the target to reach a cancellation point.

  • “Both deferred and asynchronous cancellation” combines two distinct timing policies instead of naming the single policy described.

Cross-check: POSIX defines the two cancellation types as asynchronous and deferred, and the at-any-time behavior belongs to the asynchronous type.

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

Explore the full course: Rssb Senior Computer Instructor

Loading lesson…