home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / parallel / 2010 < prev    next >
Encoding:
Text File  |  1992-08-30  |  1.7 KB  |  41 lines

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