Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!hsi!genly!chris From: chris@genly.UUCP (Chris Hind Genly) Newsgroups: comp.sys.amiga.programmer Subject: Re: What's a Hanging Forbid!? Message-ID: Date: 2 Feb 91 01:22:45 GMT References: <1991Jan28.171326.6363@maytag.waterloo.edu> Organization: Eggplant Software Tools, CT, USA Lines: 34 >In article , chris@genly.UUCP (Chris Hind Genly) writes: > >Chris> You would use Forbid()/Permit() when accessing structures >Chris> shared by several tasks to prevent the structure from being >Chris> modified while you were working on it. >In article <1991Jan28.171326.6363@maytag.waterloo.edu> himacdon@maytag.uwaterloo.ca (Hamish Macdonald) writes: > >Hamish> No, you should use SEMAPHORES when accessing structures shared by >Hamish> several tasks to prevent the structure from being modified while >Hamish> you were working on it. No? You're very definite about that. How about saying something to support your position. Semaphores aren't provided for Dos structures. In this case you must use Forbid()/Permit(). Also if you're atomic task is quick, Forbid()/Permit() should be quite fair. Semaphores have their advantages. For one, they only involve those tasks interested in a particular shared datum, not every task in the system. If your access is going to take a while, and you are in control of all tasks doing the access, semaphores would be preferred. * * * \|/ * _______ --O-- ____/ KC1VP \____ * /|\ * ______/ (203) 389-8680 \______ ______/ Eggplant Software Tools \________ ______/ 95 Fountain Terr., New Haven, CT, USA, 06515 \_______ / Chris Hind Genly chris@genly.uucp uunet!hsi!genly!chris \ ----------------------------------------------------------------