Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!portal!cup.portal.com!Sullivan From: Sullivan@cup.portal.com (sullivan - segall) Newsgroups: comp.sys.amiga.tech Subject: Re: Semaphores (Why don't we use 'em?) Message-ID: <31309@cup.portal.com> Date: 1 Jul 90 07:28:09 GMT References: <709.268c893f@desire.wright.edu> Distribution: na Organization: The Portal System (TM) Lines: 22 > > There is a utility called Stat in the v2.0 of the Kramden utilities. >It has a way to let you list all the semaphores in your system. There >are only 2 programs that I've seen that use there own semaphore and these >are Tracksalve and some other program (I forget it;s's name). How come >more people don't use semaphrores? Wouldn't they help out a lot in some >areas? I know that semaphorses in a Vax is useful for synchronizing tasks... >Is this what they are used for on the Amiga? Would someone PLEASE elaborate? > The Amiga tends to use Forbid() and Permit() to serve this purpose. The good side of this is that you don't have to know what the name of the semaphore you want to allocate is. (Sorry about the verb, I've been studying German for too long.) The bad side is that you basically have the equivalent of one system semaphore for every program. As a result every task is blocked from running when you really only need to block programs requesting the same resource. Of course in many areas semaphore like operations are handled well. Filelocks, and library locks are examples. Some misbehaved programs can cause quite a bit of trouble though by abusing these semaphores. -kls