Skip to content

Named semaphores are not fair.  #1

@Micrified

Description

@Micrified

A process blocked on a semaphore is currently unblocked if it is the first process found in the process table that is blocked on that semaphore. The preference is ordered by:

  1. Processes belonging to arbiters with a lower socket number.
  2. Processes at the front of the arbiter's process list (a linked-list).

The implications of this scheme means that the system is biased towards processes that happen to be registered last in arbiters that connected earliest. To implement semaphores fairly, the process that blocked first should be the first to be unblocked if the semaphore is "upped".

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions