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-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: question about tasks, multithreading and multi-cpu machines Date: Wed, 15 Mar 2006 06:46:19 +0000 Organization: Pushface Message-ID: References: NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1142405177 18763 62.49.19.209 (15 Mar 2006 06:46:17 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 15 Mar 2006 06:46:17 +0000 (UTC) Cancel-Lock: sha1:hOIY+4eQHH8wt3RXupMaiUHcPIQ= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news1.google.com comp.lang.ada:3366 Date: 2006-03-15T06:46:19+00:00 List-Id: Norbert Caspari writes: > 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. If you used VxWorks you would find that the right word to use was 'task' throughout. Threads/tasks mean different things to different folk using different languages, get used to it. On several platforms GNAT uses POSIX threads to implement tasking, don't know about HPUX. > 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". > > I tested this with gnat v3.15p under HPUX 11 on a multi-cpu server. > > How can I write my code to utilize all cpu's on such a machine? Is there a > different way in Ada to perform multi-tasking instead of multi-threading? I have had an SMP Linux x86 box for years, runs tasks on both CPUs with no trouble (though I haven't used 3.15p for a long time).