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: mgk25@cl.cam.ac.uk (Markus Kuhn) Subject: Re: tasking in Ada and Annex D question Date: 1999/02/02 Message-ID: <797m6h$73g$2@pegasus.csx.cam.ac.uk>#1/1 X-Deja-AN: 439882621 References: <793jl9$hf@drn.newsguy.com> <796jj7$5s2$1@pegasus.csx.cam.ac.uk> <796v4e$16e$1@nnrp1.dejanews.com> Organization: U of Cambridge Computer Lab, UK Newsgroups: comp.lang.ada Date: 1999-02-02T00:00:00+00:00 List-Id: In robert_dewar@my-dejanews.com writes: |> The FSU threads need supporting for at least a while for |> two reasons: |> |> [...] |> 2. They may well be far more efficient, that is true on |> many targets, did you experiment with this aspect. A lot |> of people do not need concurrency with system calls (indeed |> a properly written portable Ada program cannot rely on |> such concurrency, since it is not guaranteed by the Ada |> standard), and if FSU threads are more efficient, they |> may be preferable for many real applications. 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)? I realize that tasks were the only real synchronization mechanism in Ada83, but we now have protected objects to do this more efficiently without context switches. So I believe that in Ada95, the concurrency of tasks is much more important than the performance of task switches, because tasks are not used that much any more for time-consuming synchronization (reader/writer buffer tasks, semaphore tasks, etc.). Neat would however be a mechanism that combines native linuxthreads and FSU into a common mechanism. Groups of Ada tasks could be assigned to a single linux thread. FSU is used to manage the tasks *within* one linuxthread, and the Linux kernel switches between these groups of tasks using linuxthreads. Then you can fine-tune the performance versus concurrency tradeoffs with a few pragmas. I don't think it is urgent, but it would be rather neat. Does this sound like a plan for the future to think about? Markus -- Markus G. Kuhn, Computer Laboratory, University of Cambridge, UK Email: mkuhn at acm.org, WWW: