TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Ben Brosgol <[log in to unmask]>
Reply To:
Ben Brosgol <[log in to unmask]>
Mon, 9 Aug 1999 16:19:39 -0400
text/plain (38 lines)
Roger Racine wrote:

>I am having a debate with someone about the possibility of allowing time
>slicing within Ada programs if the Annex D standard task dispatching policy
>is followed.
>His position (if I have it correctly) is that time slicing is specifically
>forbidden.  He takes his position from the RM, section D.2.2.  My position
>is that time slicing is allowed.  My position comes from reading the
>Rationale, section D.2.1, the last paragraph of the section

You don't need to go to the Rationale; the permission is in the RM itself,
in D.2.2(6):

"The task dispatching policy is specified by a Task_Dispatching_Policy
configuration pragma.  If no such pragma appears in any of the program units
comprising a partition, the task dispatching policy for that partition is

Thus an implementation can supply a task dispatching policy, e.g.
Time_Slicing, and make this the default.

The reason for this freedom, if I remember the history correcdtly, is that
the target environment may be an OS the details of whose dispatching policy
are proprietary, so the Ada implementation might not even be able to
document what the policy is.

This does not absolve the Ada implementor from implementing
FIFO_Within_Priorities, since the user can always explicitly specify this
policy with the Task_Dispatching_Policy pragma.


Ben Brosgol
[log in to unmask]