home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / v21 / 097 < prev    next >
Internet Message Format  |  1990-12-05  |  2KB

  1. From std-unix-request@uunet.uu.net  Tue Sep 11 14:23:32 1990
  2. Received: from cs.utexas.edu by uunet.uu.net (5.61/1.14) with SMTP 
  3.     id AA16907; Tue, 11 Sep 90 14:23:32 -0400
  4. Posted-Date: 11 Sep 90 07:06:23 GMT
  5. Received: by cs.utexas.edu (5.64/1.76) 
  6. From: ok@goanna.cs.rmit.OZ.AU (Richard A. O'Keefe)
  7. Newsgroups: comp.std.unix
  8. Subject: Re: Standards Update, IEEE 1003.4: Real-time Extensions
  9. Message-Id: <503@usenix.ORG>
  10. References: <481@usenix.ORG> <495@usenix.ORG> <488@usenix.ORG> <491@usenix.ORG> <497@usenix.ORG> <497@usenix.ORG>,
  11. Sender: jsq@usenix.ORG
  12. Organization: Comp Sci, RMIT, Melbourne, Australia
  13. X-Submissions: std-unix@uunet.uu.net
  14. Date: 11 Sep 90 07:06:23 GMT
  15. Reply-To: std-unix@uunet.uu.net
  16. To: std-unix@uunet.uu.net
  17.  
  18. From: ok@goanna.cs.rmit.OZ.AU (Richard A. O'Keefe)
  19.  
  20. In article <497@usenix.ORG>, swart@src.dec.com (Garret Swart) writes:
  21. > I believe in putting lots of interesting stuff in the file system name
  22. > space but I don't believe that semaphores belong there.  The reason
  23. > I don't want to put semaphores in the name space is the same reason
  24. > I don't want to put my program variables in the name space:  I want
  25. > to have lots of them, I want to create and destroy them very quickly
  26. > and I want to operate on them even more quickly.  In other words, the
  27. > granularity is wrong.
  28.  
  29. So why not choose a different granularity?  Have the thing that goes in
  30. the file system name space be an (extensible) *array* of semaphores.
  31. To specify a semaphore, one would use a (descriptor, index) pair.
  32. To create a semaphore in a semaphore group, just use it.
  33. If you want to have a semaphore associated with a data structure in
  34. mapped memory, just use a lock on the appropriate byte range of the
  35. mapped file.
  36.  
  37. (Am I hopelessly confused, or aren't advisory record locks *already*
  38. equivalent to binary semaphores?  Trying to lock a range of bytes in
  39. a file is just a multi-wait, no?  Why do we need two interfaces?  (I
  40. can see that two or more _implementations_ behind the interface might
  41. be a good idea, but that's another question.)
  42. -- 
  43. Heuer's Law:  Any feature is a bug unless it can be turned off.
  44.  
  45. Volume-Number: Volume 21, Number 97
  46.  
  47.