home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / programm / 3349 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.5 KB  |  32 lines

  1. Newsgroups: comp.programming
  2. Path: sparky!uunet!psgrain!neon!nestmoi!jim
  3. From: jim@nestmoi.rain.com (Jim Chorn)
  4. Subject: Re: Semaphores, Swap, or Test_And_Set
  5. Message-ID: <1992Dec22.055727.8056@nestmoi.rain.com>
  6. Lines: 1370
  7. Organization: none - Portland, OR
  8. References: <1992Dec18.045022.15255@umbc3.umbc.edu> <1gsscvINNa2r@usenet.INS.CWRU.Edu> <1992Dec18.195139.15322@umbc3.umbc.edu> <1h53bpINNabh@usenet.INS.CWRU.Edu>
  9. Date: Tue, 22 Dec 1992 05:57:27 GMT
  10.  
  11. In article <1h53bpINNabh@usenet.INS.CWRU.Edu> trier@slc6.ins.cwru.edu (Mr. Stephen C. Trier) writes:
  12.     -> This approach uses the a lock prefix to make INC and DEC
  13.     -> atomic, even on multiprocessors.  It depends on the
  14. This will only work on multiprocessors if the lock prefix is supported by
  15. the processor. For example, if the multiprocessor system is tightly
  16. coupled and each processor supports a coherent cache but the cache
  17. ignores the processor lock signal this may not work. If the system
  18. is loosely coupled this may not work. It all depends on the hardware
  19. design...
  20.  
  21.     -> some who might disagree with my referring to these as
  22.     -> semaphores, since they are non-blocking and cannot be used
  23.     -> as counting semaphores.  If it makes you feel better, think
  24.     -> of them as semaphore building blocks, around which you can
  25.     -> build whatever sort of fancy setup you want.
  26. What you have described here in code is a 'lock' in the nature of P(), V()
  27. style E. Dijkstra. I prefer to think of them as what they. Yes, semaphores
  28. are built using locks and there are numerous types of semaphores (counting,
  29. blocking, event,...).
  30.  
  31.  
  32.