I have been debugging a concurrent Ada program (on Windows XP, but I
expect the GNAT GPL would work the same on Linux). In the GPS debugger,
there is a task window. The primary procedure appears as a task, which I
believe is going to be related to the thread for the process. If I run a
strictly sequential version of the program there's only one task that appears
in the debugger window for tasks. When I switch over the the concurrent
version (which I'm still debugging), then I can have the program create,
run, and terminate a large number of tasks. These appear in the task
window including their state (runnable, ..., terminated). [I'll provide
the code after I'm satisfied with the debugging process.]
I believe the debugger provides a strong prima facie case the (at least
for GNAT GPL), Ada will treat a single process as a task. When you add
subroutines in other languages to this code, it seems likely that the
Ada compiler would still treat the main procedure as a task - although I do
not have direct evidence of that.
To the extent that the Ada program introduces other tasks, the program
falls into the realm of concurrent programming, where the appropriate
Ada approach is to deal with resource starvation or blocking with protected
objects or some of the more primitive approaches (such as semaphores).
If the program is going to run in an environment that involves multiple
machines, then in addition to concurrent programming, the system design
will involve distributed computing. Because multi-system designs usually
have to assume that the individual nodes are unreliable, the algorithms
become more complex because of the need to check on whether the components
are unavailable. That would be the case, for example, in dealing with
a web site that uses clusters of servers and storage units.
Bruce B.