From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d576ceec8fa95166 X-Google-Attributes: gid103376,public From: Ehud Lamm Subject: Re: tasks, simple question Date: 1999/11/15 Message-ID: #1/1 X-Deja-AN: 548779616 References: <382FC705.29121528@interact.net.au> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Complaints-To: usenet@news.huji.ac.il X-Trace: news.huji.ac.il 942661703 29145 132.64.178.45 (15 Nov 1999 10:28:23 GMT) Organization: The Hebrew University of Jerusalem Mime-Version: 1.0 NNTP-Posting-Date: 15 Nov 1999 10:28:23 GMT Newsgroups: comp.lang.ada Date: 1999-11-15T10:28:23+00:00 List-Id: On Mon, 15 Nov 1999, G wrote: |What sort of role they play, so to say. What sort of things one |would use them for. | In a sense this is like asking where procedures are used. It is hard to give a concise and complete answer. One issue that is sometimes overlooked, but which I find very important (in general, not just in Ada), is that tasking is one of the abstraction mechanisms. So types of software elements are easier to dsrcribe using multi-tasking concepts. The ease , of course, depends of the specific tasking primitives. The usuall example I give, and which was debunked a bit on comp.lang.functional awhile back, is of a simulation system with all kinds of animals: "Consider an ecological simulation system. The system will simulate harbivores and carnivores, wonderring on a fixed MxN grass field. The grass grows at a certain rate - so that a certain time after a grass spot is eaten, new grass grows to fill that spot. When a carnivore meets a harbivore, the carnvore is the only one to walk away. Harbivores eat grass when hungry."[1] Tasks can help you with modelling. They also have, naturally, technical uses, from interrupt handlers to a mapping of OS threads - but these issues I am sure will be described by others. [1] This is from something temporarily titled "The Little Abstractionist; a Cacophony of Abstraction In Ada" which I am currently writing. It is an example based tour of various kinds of software abstractions in Ada. Not too advanced - it start with rationals, but I am trying to make it not too dull either. Is such a thing publishable?I am pretty sure that the answer is no. But anyway I have to finish writing it first... Ehud Lamm mslamm@mscc.huji.ac.il http://purl.oclc.org/NET/ehudlamm <== My home on the web Check it out and subscribe to the E-List- for interesting essays and more!