Machine-translated by Google. Questions are authored in English.
Top

Discussion

A binary semaphore differs from a counting one in that its count

  • A.records the priority of the task that took it
  • B.cannot exceed one
  • C.is set by the kernel and may not be read by a task
  • D.counts downward only and never rises again

Answer: B

Being limited to zero or one makes it a flag, and its two ordinary uses are signalling that something has happened and standing in for a lock. Used as a lock it lacks ownership, which is what distinguishes it from a mutex.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.