TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Stephen Leake <[log in to unmask]>
Reply To:
Stephen Leake <[log in to unmask]>
Thu, 17 Mar 2005 11:27:39 -0500
text/plain (27 lines)
Colin Paul Gloster <[log in to unmask]> writes:

> Actually "task" is Ada's term for "process" not "thread". 

Hmm. In my experience, people use the term "process" for things that
have separate address spaces. Ada tasks share a single address space;
they can all access the same global variables. See ARM95 9 (8), and
ARM95 9.10.

> A process could have a number of subprocesses called threads which
> share data without mutual exclusion from the same process, like in
> POSIX or pthreads but thankfully not Ada.

Hmm. Ada permits two different tasks to access the same global
variable. If the global is declared Volatile, it can be safe. Ada also
provides higher-level abstractions for inter-task communication;
rendezvous and protected objects.

An Ada task is quite close to a POSIX pthread; the GNAT runtime uses
pthreads on platforms where it is available.

Ada allows programmers to shoot themselves in the foot; it just makes
it clear they are doing that :).

-- Stephe