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,ce6f6f23c4e880ad X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-20 14:03:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Multitasking theory question Date: 20 Jun 2002 16:53:47 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <3d123f34.0@news.unibw-muenchen.de> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1024606886 7356 128.183.220.71 (20 Jun 2002 21:01:26 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 20 Jun 2002 21:01:26 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:26523 Date: 2002-06-20T21:01:26+00:00 List-Id: "Kai Schuelke" writes: > Hello, > > during my programming course we learned about tasks, too. One qustion that > couldn't be answered was: > > Is an Ada-Task a process of the operating system or is it a kind of process > inside the whole program? This is not defined by the language. It is up to the implementation, and both approaches have been taken. Most Ada 95 compilers use OS threads for Ada tasks, if the OS supports threads. This is simple, because threads within a process share an address space, as Ada tasks do. > I tend to agree with the second opinion, based on what I have seen > during some personal "experiments". But it seems to depend on how > the compiler handles the tasks. The example consisted of two tasks. > In one case, using DOS and an old Ada83 compiler the second task > never could do anything, because all resources (CPU-Time) where > blocked by Task #1. The same code run in a WinNT DOS-Box and > compiled with the actual Aonix compiler switched between the task > with intervals of about 1 second. This is addressing a different question; whether the runtime supports preemption. Since DOS is neither multi-processing nor multi-threaded, this is not surprising. > Under DOS tasks ran cooperative, under Win preemtive. Why this > difference? Is it because of the OS, the compiler or the change from > Ada83 to Ada95? The OS. -- -- Stephe