comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Tasking performance between Ada83 and Ada95
Date: 1997/06/15
Date: 1997-06-15T00:00:00+00:00	[thread overview]
Message-ID: <dewar.866376446@merv> (raw)
In-Reply-To: Db0ccBASt4ozEwUo@walsh.demon.co.uk


Edmond Walsh said

<<Efficiency was a significant problem.  The program ran correctly in Ada
95 on the SG Indy with each task being executed as a seperate unix
process.  However this ran rather slowly because of the large overheads
in context switching unix processes.  In the original Nighthawk '83
version the two main components (consisting of many tasks) each ran as a
seperate unix process and the individual tasks in the components were
controlled by the Ada run time executive.  The blocking of one task due
to inter (unix) process comunications did not block the entire
component.  When this scheme was ported to the SG Indy it was found that
the blocking of a task due to inter (unix) process communications did
block the entire component.  Working around this problem to achieve
reasonable run time and correct operation was what caused the trouble.  
>>


You mean separate unix thread, rather than separate unix process I think.
At least there is certainly no need to use separate processes for each
task. Nevertheless that can indeed introduce extra overhead.

In the Ada 83 world on monoprocessors, the use of a special Ada exec for
task switching on top of an OS often made sense, and this is exactly what
we get when we port the FSU threads. The advantage of the FSU threads is
high efficiency and exact semantic accuracy.

However, these days, more and more work is done on multi-processors, and
then of course you have no choice if you want to distribute tasks across
processors other than to use the system level threads. Furthermore, the
efficiency hit from operating these threads on separate processors may
indeed be significant.

No obvious solution here ... that's why the best approach seems to be to
provide a choice of threads libraries on machines where it makes sense.
In version 3.10 of GNAT, we we providing that choice for Solaris and
for Linux. We may do it for additional ports as we go along. So far we
did not port FSU threads to SGI (one of the motives for doing so, accuracy,
does not apply, since the SGI threads implementation is exactly correct
for Ada, one of the advantages of having the vendor have an interest and
stake in Ada!) But the efficiency issue might still apply.

Note that on the SGI implementation of GNAT, there are controls ovre how
tasks are distributed among processes, and it is worth while tuning these
right, especially when using a multi-processor machine





  reply	other threads:[~1997-06-15  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-06  0:00 Tasking performance between Ada83 and Ada95 Mike Rose
1997-06-07  0:00 ` Robert Dewar
1997-06-08  0:00   ` Edmond Walsh
1997-06-09  0:00     ` Robert Dewar
1997-06-15  0:00       ` Edmond Walsh
1997-06-15  0:00         ` Robert Dewar [this message]
1997-06-15  0:00           ` Tom Moran
1997-06-16  0:00           ` Robert A Duff
1997-06-17  0:00             ` Robert Dewar
1997-06-22  0:00           ` Geert Bosch
1997-06-23  0:00             ` Robert Dewar
1997-06-23  0:00             ` Larry Kilgallen
1997-06-25  0:00               ` Fergus Henderson
1997-06-25  0:00                 ` Larry Kilgallen
1997-06-07  0:00 ` Robert A Duff
1997-06-08  0:00   ` Robert Dewar
1997-06-10  0:00     ` PascMartin
1997-06-10  0:00       ` Robert Dewar
1997-06-10  0:00     ` Jon S Anthony
1997-06-07  0:00 ` jim hopper
replies disabled

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