home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.parallel
- Path: sparky!uunet!gatech!hubcap!fpst
- From: iane@werple.pub.uu.oz.au (Ian Evans)
- Subject: Locks without using atomic instructions
- Message-ID: <1992Aug31.124322.2555@hubcap.clemson.edu>
- Summary: Anyone know how to lock in shared memory when no atomic instructions?
- Keywords: Lock asynchronous
- Sender: fpst@hubcap.clemson.edu (Steve Stevenson)
- Organization: werple public-access UNIX, Melbourne
- Date: 30 Aug 1992 00:35:48 +1000
- Approved: parallel@hubcap.clemson.edu
- Lines: 27
-
- I'm not sure whether a) This is the best newsgroup to ask this and b)
- whether this is a FAQ but..
-
- Let's say that there is a system (unfortunately there is) where some
- person (me) wants to get a few different computers communicating reliably,
- and the only available mechanism is reading a shared memory location, or
- writing a location, but there is no atomic set & test type instruction.
- It is possible, however, to get a unique system-wide process ID.
-
- What's needed is a locking algorithm that is completely bullet-proof, as
- the systems are completely asynchronous and have widely different
- speeds. There is, of course, no way to disable access by turning
- interrupts off, DMA off etc...
-
- Just thinking about it from cold, I've come up with what looks like
- an exceedingly complicated 7-step lock procedure using two memory
- locations. I can't see any obvious holes for 2 processes communicating,
- but it definitely breaks for 3.
-
- I would appreciate being pointed in the right direction, as I'm sure
- this has been described in half-a-zillion textbooks / PhD's etc...
-
- If this is obvious or a FAQ, please mail me direct:
- Ian Evans - Melbourne Australia
- iane@werple.pub.uu.oz.au
-
-
-