comp.lang.ada
 help / color / mirror / Atom feed
From: mgk25@cl.cam.ac.uk (Markus Kuhn)
Subject: Re: tasking in Ada and Annex D question
Date: 1999/02/02
Date: 1999-02-02T00:00:00+00:00	[thread overview]
Message-ID: <797m6h$73g$2@pegasus.csx.cam.ac.uk> (raw)
In-Reply-To: 796v4e$16e$1@nnrp1.dejanews.com

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: <http://www.cl.cam.ac.uk/~mgk25/>




  reply	other threads:[~1999-02-02  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-31  0:00 tasking in Ada and Annex D question nabbasi
1999-02-01  0:00 ` Dr. Hubert B. Keller
1999-02-02  0:00 ` Markus Kuhn
1999-02-02  0:00   ` robert_dewar
1999-02-02  0:00     ` Markus Kuhn [this message]
1999-02-02  0:00       ` Niklas Holsti
1999-02-03  0:00         ` Ehud Lamm
1999-02-03  0:00       ` robert_dewar
1999-02-02  0:00 ` robert_dewar
1999-02-02  0:00   ` Roger Racine
1999-02-02  0:00     ` robert_dewar
1999-02-03  0:00       ` Nick Roberts
1999-02-03  0:00         ` Frank Mueller
1999-02-03  0:00         ` Frank Mueller
1999-02-03  0:00         ` Roger Racine
1999-02-03  0:00     ` Tom Moran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox