🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.mail-lists.parallel
Article #290

Locks without using atomic instructions

#290
From: Ian Evans
Date: Mon, 31 Aug 1992 12:45
26 lines
1647 bytes
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
	
Technical Details
Message-ID: <314650@nttlab.ntt.JP>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-snd-ss2!akiu!hakata!kyu-cs!wnoc-fukuoka-news!wnoc-kyo!kuis!kudpc!nuis!tutgw!lab!nttlab!daemon

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-snd-ss2!akiu!hakata!kyu-cs!wnoc-fukuoka-news!wnoc-kyo!kuis!kudpc!nuis!tutgw!lab!nttlab!daemon
From: iane@werple.pub.uu.oz.au (Ian Evans)
Newsgroups: fj.mail-lists.parallel
Subject: Locks without using atomic instructions
Message-ID: <314650@nttlab.ntt.JP>
Date: 31 Aug 92 12:45:39 GMT
Sender: daemon@nttlab.ntt.JP
Distribution: fj
Lines: 26
Approved: news@nttlab.ntt