comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com (Ted Dennison)
Subject: Re: Ada tasks: processes or threads
Date: 14 Mar 2002 10:15:31 -0800
Date: 2002-03-14T18:15:31+00:00	[thread overview]
Message-ID: <4519e058.0203141015.53bbae17@posting.google.com> (raw)
In-Reply-To: 50c1a1b.0203132049.3c729ad0@posting.google.com

x24702@usma.edu (Zach Swanson) wrote in message news:<50c1a1b.0203132049.3c729ad0@posting.google.com>...
> The Ada standard for tasks is a multi-thread implementation, not
> multi-process. All threads belong to the parent process, which is the
> main compilation unit.


Errr, not exactly. 

Ada tasks were around before "threads" became a common OS concept. Ada
tasks are Ada tasks, period. However an implementation chooses to
implement them is entirely up to that implementation.

Due to the fact that they have to be able to share global data with
other tasks, it may *easier* to implement them using threads under
most of the big modern OS's. But to do so you have to be able to
follow all the other little Ada rules too. That's why the compliant
tasking runtime under Linux does *not* use OS threads.

Implementing tasks entirely in the Ada runtime within a single process
is a quite common method found on *many* compilers. I have also seen
implementations using OS threads, and using OS processes (all global
data was put in shared memory sections, which worked great, as long as
you didn't let an OS API allocate memory for you then try to use it in
another task...). On some RTOS's (eg: vxWorks), "processes" share a
single memory space, and the tasking executives can support all the
other niggling Ada task requirements, so Ada compilers on those
platforms have little trouble using OS processes.


-- 
T.E.D. 
Home     -  mailto:dennison@telepath.com (Yahoo: Ted_Dennison)
Homepage -  http://www.telepath.com/dennison/Ted/TED.html



      parent reply	other threads:[~2002-03-14 18:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-13  2:35 Ada tasks: processes or threads Frank Christiny
2002-03-13  2:45 ` Frank Christiny
2002-03-13  3:13 ` Ted Dennison
2002-03-14  4:49   ` Zach Swanson
2002-03-14 13:24     ` Larry Kilgallen
2002-03-15  5:24       ` Zach Swanson
2002-03-14 18:15     ` Ted Dennison [this message]
replies disabled

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