comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: basic question on Ada tasks and running on different cores
Date: Sun, 06 May 2012 12:31:17 +0200
Date: 2012-05-06T12:31:17+02:00	[thread overview]
Message-ID: <87bom18utm.fsf@ludovic-brenta.org> (raw)
In-Reply-To: m2397dvd8x.fsf@pushface.org

Simon Wright writes on comp.lang.ada:
> One imagines that Ada RTS's will offer the ability to map tasks to
> cores, building on the facilities offered by the OS's to specify
> processor affinities. Whether Ada 2020 will standardise an interface
> to this is to be determined! (ada-auth.org isn't responding at the
> moment, so I can't tell whether there's anything in Ada 2012).

Ada 2012 has an entire clause, D.16, "Multiprocessor Implementation",
devoted to this.  The salient part is:

7/3 For a task type (including the anonymous type of a
single_task_declaration) or subprogram, the following language-defined
representation aspect may be specified:

8/3 CPU

               The aspect CPU is an expression, which shall be of type
               System.Multiprocessors.CPU_Range.

This allows assigning a single CPU to a task; the problem is that the
value of the aspect_specification must be static.  In subclause D.16.1
"Dispatching Domains" we see:

16/3
The type Dispatching_Domain represents a series of processors on which
a task may execute. Each processor is contained within exactly one
Dispatching_Domain. System_Dispatching_Domain contains the processor or
processors on which the environment task executes. At program start-up
all processors are contained within System_Dispatching_Domain.

17/3
For a task type (including the anonymous type of a
single_task_declaration), the following language-defined representation
aspect may be specified:

18/3
Dispatching_Domain

               The value of aspect Dispatching_Domain is an expression,
               which shall be of type
               Dispatching_Domains.Dispatching_Domain. This aspect is
               the domain to which the task (or all objects of the task
               type) are assigned.

This allows assigning any one of a range of CPUs to a task.

-- 
Ludovic Brenta.
An enhanced, consistent, best practice culturally prioritizes an
emotional intelligence.



  reply	other threads:[~2012-05-06 10:31 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 [this message]
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
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