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-Thread: 103376,3f60acc31578c72b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: question about tasks, multithreading and multi-cpu machines Date: Tue, 14 Mar 2006 18:18:13 +0100 Organization: Adalog Message-ID: References: NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1142359267 19757 195.25.228.57 (14 Mar 2006 18:01:07 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Tue, 14 Mar 2006 18:01:07 +0000 (UTC) User-Agent: Thunderbird 1.5 (Windows/20051201) In-Reply-To: Xref: g2news1.google.com comp.lang.ada:3357 Date: 2006-03-14T18:18:13+01:00 List-Id: Norbert Caspari a �crit : > In Ada it is possible to declare multiple parallel running "tasks". But for > my opinion the keyword "task" is somewhat misleding because in fact, those > "tasks" are really threads. "task" was the name commonly used for this at the time Ada was designed. Only (much) later light-weight concurrency was introduced in Unix, and for some mysterious reason they called that "threads" instead of "tasks". > If I run such a program on a multi-cpu machine, the process itself will use > only one cpu, even though I create several "tasks". > It depends on which run-time you use. If you use FSU-threads, you'll use only one CPU, but if you use native threads, you should get full use of you CPUs. Check the documentation to learn how to switch run-times (it is just a symbolic link you need to change). -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr