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