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,5f0b2f174ad085de X-Google-Attributes: gid103376,public From: Ehud Lamm Subject: Re: tasking in Ada and Annex D question Date: 1999/02/03 Message-ID: #1/1 X-Deja-AN: 439930081 References: <793jl9$hf@drn.newsguy.com> <796jj7$5s2$1@pegasus.csx.cam.ac.uk> <796v4e$16e$1@nnrp1.dejanews.com> <797m6h$73g$2@pegasus.csx.cam.ac.uk> <36B77471.ACD2DE1A@icon.fi> Content-Type: TEXT/PLAIN; charset=US-ASCII Organization: The hebrew University of Jerusalem Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-02-03T00:00:00+00:00 List-Id: On Tue, 2 Feb 1999, Niklas Holsti wrote: > Markus Kuhn wrote: > > > > > > What I have a bit of a problem to understand is, for what > > else apart from preemptive scheduling, concurrency when system > > calls block, and utilization of multiprocessor systems do I > > need tasks for (i.e., all the things FSU doesn't do)? > > You need tasks to modularise your program's NON-synchronised > (i.e. logically concurrent) functions, while programming each > such function in an easy-to-understand sequential manner. > I ask my students to write a simulation of some grazing animals, predators and grass, all having different behaviours, and interactions when the meet (grass is eaten when it meets a hungry cow. Same things happens to the cow if the lion is hungry :-) etc.) I urged them to think of coding this sequentially. They usually see the point. It is harder to coceptualized this using tasks. Tasks are part of the tools to abstract the control structure. Ehud Lamm mslamm@pluto.mscc.huji.ac.il