Version 1.4 of ai05s/ai05-0169-1.txt

Unformatted version of ai05s/ai05-0169-1.txt version 1.4
Other versions for file ai05s/ai05-0169-1.txt

!standard D.14.2(3-4/2)          10-04-20 AI05-0169-1/03
!standard D.14.2(21/2)
!reference AI05-0171-1
!class Amendment 09-10-22
!status ARG Approved 9-0-2 10-02-26
!status work item 09-10-22
!status received 09-10-22
!priority Low
!difficulty Easy
!subject Defining group budgets for multiprocessor platforms
!summary
Group budgets are defined to be tied to a single processor.
!problem
Ada 2005 does not fully define how group budgets should be implemented on multiprocessor platforms.
!proposal
The definition of group budgets should be changed to include a processor. A task will only consume budget if it is executing on the processor defined for that budget. The use of a default processor will mean that single processor programs will be unchanged.
In D.14.2(4/2) change:
with System; package Ada.Execution_Time.Group_Budgets is type Group_Budget is tagged limited private; ...
to
with System; with System.Multiprocessors; package Ada.Execution_Time.Group_Budgets is type Group_Budget(P : System.Multiprocessors.CPU := System.Multiprocessors.CPU'First) is tagged limited private;
Note that this definition depends on the definition of CPU from AI05-0171-1.
Other parts of the package remain unchanged.
A task will only consume the budget of a Group Budget if it is executing on the defined processor for that Group Budget. This applies to tasks assigned to specific processors, or those that are globally scheduling within a dispatching domain.
!wording
Change D.14.2(3-4/2) to:
with System; with System.Multiprocessors; package Ada.Execution_Time.Group_Budgets is
type Group_Budget(P : System.Multiprocessors.CPU := System.Multiprocessors.CPU'First) is tagged limited private;
Change the third sentance of D.14.2(21/2) to:
Any execution on processor P of any member of the group of tasks results in the budget counting down, unless exhausted.
!discussion
Whilst a task can only execute on one processor at a time, a group of tasks may execute in parallel. This makes it difficult for an implementation to support the execution of a handler at the point the group budget does to zero. It also makes it difficult for the programmer to construct useful multiprocessor 'execution-time servers'. Indeed the whole concept of such servers is single processor based. The workshop (IRTAW) therefore concluded that the existing definition of group budget be changed to make it explicitly a per-processor provision.
Examples were discussed at the workshop that showed that a program could move tasks between processors and group budget is a way to exploit 'reserved' budgets on each processor of an allocation domain.
This change constrains how implementations can implement this package on multiprocessor systems. This is potentially inconsistent with Ada 2005, as existing programs could depend on behavior that is no longer allowed (and they would fail if compiled with Ada 2012). It is unlikely that such an implementation exists (because of the monitoring problems previously noted), and if it did programs using it are already not portable. As such this is not a major concern.
!example
--!corrigendum D.14.2(4/2)
!ACATS test
Add an ACATS C-Test of setting the CPU in a group budget.
!appendix

****************************************************************



Questions? Ask the ACAA Technical Agent