From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c02e0ad89ef0dfec X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-14 10:15:31 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dennison@telepath.com (Ted Dennison) Newsgroups: comp.lang.ada Subject: Re: Ada tasks: processes or threads Date: 14 Mar 2002 10:15:31 -0800 Organization: http://groups.google.com/ Message-ID: <4519e058.0203141015.53bbae17@posting.google.com> References: <3C8EC270.1030006@telepath.com> <50c1a1b.0203132049.3c729ad0@posting.google.com> NNTP-Posting-Host: 65.115.221.98 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1016129731 12564 127.0.0.1 (14 Mar 2002 18:15:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 14 Mar 2002 18:15:31 GMT Xref: archiver1.google.com comp.lang.ada:21246 Date: 2002-03-14T18:15:31+00:00 List-Id: 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