Ben Cantrick (mackys) wrote,
Ben Cantrick

Dekker's Algorithm.

I can't believe I was never taught this in college!

Dekker's Algorithm and Peterson's simplification thereof.

From Wikipedia:

A concurrent programming algorithm for mutual exclusion that allows two processes to share a single-use resource without conflict, using only software means and shared memory for communication.

It avoids the strict alternation of a naive turn-taking algorithm, and was one of the first mutual exclusion algorithms to be invented. The first proveably correct software-only mutual exclusion algorithm.
  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.