comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: basic question on Ada tasks and running on different cores
Date: Wed, 9 May 2012 21:20:11 -0500
Date: 2012-05-09T21:20:11-05:00	[thread overview]
Message-ID: <jof8lf$adu$1@munin.nbi.dk> (raw)
In-Reply-To: jodnse$c29$1@speranza.aioe.org

<anon@att.net> wrote in message news:jodnse$c29$1@speranza.aioe.org...
>I am talking about standard languages aka all languages including Ada.

Ada always has supported parallelism.

I think you are confused by various research languages that are trying to 
*automatically* make programs execute in parallel. It's not surprising that 
these disappear, people have been trying to design these since the 1960s 
(some of the research papers I read while in college - in the 1970s - were 
ancient even then).

My personal opinion is that these "holy grail" languages will never really 
work out. If a reasonably sensible solution existed, someone would have 
found it in the last 50 years of looking. I'm sure some progress will be 
made, but only by increasing non-determinism elsewhere in the language --  
which will make debugging (and thus the languages) impractical.

People that are looking for research grants have a lot of advantage to 
spreading FUD about what is and is not possible, so be careful about 
depending on them.

OTOH, *manual* parallelism, as exhibited by Ada's tasks, threads in Windows 
and Linux, and constructs in many other languages, works and has been in use 
for decades. (Ada makes no claim to having invented that.) To claim 
otherwise is just plain wrong.

And you don't have to take my word for it. You can see it yourself. You can 
download the very useful Process Explorer tool for Windows, which lets you 
see what each process on your computer is doing. Install it on any modern 
Windows system. Then compile a program that uses a number of CPU-intensive 
tasks with most Windows Ada compilers (any that claim to use threads, I know 
that GNAT, ObjectAda, and IBM's Ada all do from personal experience). I'm 
sure someone else here could recommend a short Ada program.

If you run such a compiled Ada program and examine the process with Process 
Explorer on a multicore machine, you'll see that several or all of the cores 
will be in use for that single process. (Yes, I've done this on Windows XP. 
Supposely, Windows 7 is better at it but I haven't tested that myself.) 
Typically, more CPU than a single core could use will be consumed by the 
program. That means that the core are running the tasks *in parallel*, 
because they obviously aren't being run sequentially and there is no other 
choice.

I suppose Microsoft could be lying about the parallel execution evidenced by 
this commonly used tool, but I have no idea what gain that would have for 
Microsoft.

Anyway, do the experiment with an appropriate program (just make sure that 
the program doesn't require sequential execution). See if you still think 
that Ada programs can't run parallel threads.

                                                         Randy.





  reply	other threads:[~2012-05-10  2:20 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-06  7:38 basic question on Ada tasks and running on different cores Nasser M. Abbasi
2012-05-06  7:59 ` Gautier write-only
2012-05-06 10:02 ` Simon Wright
2012-05-06 10:31   ` Ludovic Brenta
2012-05-06 14:14     ` Robert A Duff
2012-05-06 16:07       ` Vinzent Hoefler
2012-05-06 19:43       ` Ludovic Brenta
     [not found]         ` <15qdq7df9cji7htp52i9d5f8sqsgmisc3b@invalid.netcom.com>
2012-05-06 21:24           ` Ludovic Brenta
2012-05-06 14:13 ` Robert A Duff
2012-05-07  7:36 ` anon
2012-05-08  7:08   ` Maciej Sobczak
2012-05-08  9:02     ` anon
2012-05-08  9:52       ` Ludovic Brenta
2012-05-09 12:28         ` anon
2012-05-10  2:20           ` Randy Brukardt [this message]
2012-05-11  2:38             ` NatarovVI
2012-05-11  8:30               ` Georg Bauhaus
2012-05-16 15:40                 ` NatarovVI
2012-05-16 18:03                   ` Georg Bauhaus
2012-05-12  0:33               ` Randy Brukardt
2012-05-12 10:57                 ` Stephen Leake
2012-05-15  6:55                   ` Randy Brukardt
2012-05-15 22:54                     ` Shark8
2012-05-16 15:54                 ` NatarovVI
2012-05-17  0:11                   ` Randy Brukardt
2012-05-17  1:06                     ` Jeffrey Carter
2012-05-17  6:50                       ` Dmitry A. Kazakov
2012-05-18  4:12                       ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox