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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,59c52143b2a1463b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!i31g2000yqm.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Egil_H=F8vik?= Newsgroups: comp.lang.ada Subject: Re: How many hardware threads? Date: Mon, 12 Jul 2010 04:47:40 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2ef176db-36f1-4aae-b427-e22a36e237be@i31g2000yqm.googlegroups.com> References: <4c3a65d7$0$2405$4d3efbfe@news.sover.net> NNTP-Posting-Host: 84.211.57.26 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1278935260 1679 127.0.0.1 (12 Jul 2010 11:47:40 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 12 Jul 2010 11:47:40 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i31g2000yqm.googlegroups.com; posting-host=84.211.57.26; posting-account=P68zsgoAAABKpXKMUuwuUZ_RfBk1kZfB User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.80 (Windows NT 5.1; U; Edition Campaign 21; en) Presto/2.5.24 Version/10.53,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:12337 Date: 2010-07-12T04:47:40-07:00 List-Id: On Jul 12, 2:47=A0am, "Peter C. Chapin" wrote: > As we all know there is currently a lot of "buzz" about parallel > programming and about the "crisis in software development" that is > associated with it. People using languages with weak support for > concurrency are now wondering how they will use multi-core systems > effectively and reliably. Of course Ada already has decent support for > concurrency so part of the problem is solved for those of us using Ada. > > But not all of the problem... > > I see a couple of difficulties with writing effective parallel programs > for "ordinary" applications (that is, applications that are not > embarrassingly parallel). One difficulty is load balancing: how can one > decompose a problem to keep all processors reasonably busy? The other > difficulty is scalability: how can one design a single program that can > use 2, 4, 16, 128, or more processors effectively without knowing ahead > of time exactly how many processors there will be? I'm not an expert in > Ada tasking but it seems like these questions are as big a problem for > Ada as they are for any other language environment. > > I'm not looking for a solution to all tasking problems here. But there > is one feature that seems like a necessary prerequisite to such a > solution. The language (or its standard library) needs to provide a > portable way for the program to determine how many hardware threads are > available. > > I'm about to write a simple program that decomposes into parallel, > compute-bound tasks quite nicely. How many such tasks should I create? I > could ask the user to provide the number as a command line argument or > in a configuration file. Yet it seems like the program should just be > able to figure it out. Does Ada have a standard way of doing that? I > didn't see anything in my (admittedly short) review. > > Thanks! > > Peter Have a look at this proposal for Ada 2012: http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0167-1.txt?rev=3D1.4 -- ~egilhh