for mutual exclusion of n processes - algorithm.

Discussion in 'Java' started by ppp, Dec 5, 2006.

  1. ppp

    ppp Guest

    Hi, I'm looking for some algorithm of mutex for n processes and I found
    only Lamport's Alg. There are at least 2 more algorithms: Peterson and
    Dekker. I found algorithms only for 2 processes, but I need one more
    for n. If you know any other algorithms or know how to implement one of
    these - I will be thankful.

    greetings...
     
    ppp, Dec 5, 2006
    #1
    1. Advertising

  2. ppp wrote:
    > Hi, I'm looking for some algorithm of mutex for n processes and I found
    > only Lamport's Alg. There are at least 2 more algorithms: Peterson and
    > Dekker. I found algorithms only for 2 processes, but I need one more
    > for n. If you know any other algorithms or know how to implement one of
    > these - I will be thankful.
    >
    > greetings...
    >


    Before looking for more algorithms, I strongly recommend studying one,
    such as Peterson's, in the light of the Java memory model.

    I believe you are taking algorithms that were designed with various
    memory model assumptions, and just assuming they will work in Java.

    Some of what you are doing may even work on a uniprocessor, though not
    necessarily guaranteed to do so.

    Patricia
     
    Patricia Shanahan, Dec 5, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Giambattista Bloisi

    non-blocking mutual exclusion

    Giambattista Bloisi, Dec 16, 2003, in forum: Java
    Replies:
    1
    Views:
    436
    Matt Humphrey
    Dec 16, 2003
  2. ppp
    Replies:
    0
    Views:
    361
  3. ppp
    Replies:
    0
    Views:
    352
  4. Replies:
    4
    Views:
    1,308
    CBFalconer
    Jul 7, 2005
  5. Replies:
    5
    Views:
    1,267
    CBFalconer
    Jul 7, 2005
Loading...

Share This Page