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,292c095d622af1d0 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.230.98 with SMTP id sx2mr10313819pbc.1.1336300278905; Sun, 06 May 2012 03:31:18 -0700 (PDT) Path: pr3ni10257pbb.0!nntp.google.com!news2.google.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: basic question on Ada tasks and running on different cores Date: Sun, 06 May 2012 12:31:17 +0200 Organization: A noiseless patient Spider Message-ID: <87bom18utm.fsf@ludovic-brenta.org> References: Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="Rteh8k8/dmRdM+YvGc7uJw"; logging-data="1720"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ARr8wFY+JKVyvF2iw6d8f" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:XKJF/KARPOWcc6Bne9a3uHxtrHU= sha1:apaBXwL9GAIBJEseyfQYHhfU0nU= Content-Type: text/plain; charset=us-ascii Date: 2012-05-06T12:31:17+02:00 List-Id: 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.