Rationale for Ada 2005: Tasking and Real-Time

RUSTOP
BACKNEXT

ENG

7. High Integrity Systems annex

@ There are a few changes to this annex. The most noticeable is that its title has been changed from Safety and Security to High Integrity Systems. This reflects common practice in that high-integrity is now the accepted general term for systems such as safety-critical systems and security-critical systems.

@ There are some small changes to reflect the introduction of the Ravenscar profile. It is clarified that tasking is permitted in a high-integrity system provided that it is well controlled through, for example, the use of the Ravenscar profile.

@ A new pragma Partition_Elaboration_Policy is introduced. Its syntax is pragma Partition_Elaboration_Policy(policy_identifier); Two policy identifiers are predefined, namely, Concurrent and Sequential. The pragma is a configuration pragma and so applies throughout a partition. The default policy is Concurrent.

@ The normal behaviour in Ada when a program starts is that a task declared at library level is activated by the environment task and can begin to execute before all library level elaboration is completed and before the main subprogram is called by the environment task. Race conditions can arise especially when several library tasks are involved. Problems also arise with the attachment of interrupt handlers.

@ If the policy Sequential is specified then the rules are changed. The following things happen in sequence ? The elaboration of all library units takes place (this is done by the environment task) but library tasks are not activated (we say their activation is deferred). Similarly the attachment of interrupt handlers is deferred. ? The environment task then attaches the interrupts. ? The library tasks are then activated. While this is happening the environment task is suspended. ? Finally, the environment task then executes the main subprogram in parallel with the executing tasks.

@ Note that from the library tasks' point of view they go seamlessly from activation to execution.

@ Moreover, they are assured that all library units will have been elaborated and all handlers attached before they execute.

@ If Sequential is specified then

  1        pragma Restrictions (No_Task_Hierarchy);

@ must also be specified. This ensures that all tasks are at library level.

@ A final small point is that the Restrictions identifiers No_Unchecked_Conversion and No_Unchecked_Deallocation are now banished to Annex J because No_Dependence can be used instead.

Rationale for Ada 2005: Tasking and Real-Time

@ENGRUSTOPBACKNEXT

7. Приложения Систем Высокой Целостности

@ Есть несколько изменений к этому приложению. Самое значимое состоит в том, что его заголовок был изменен от Safety and Security на High Integrity Systems. Это отражает ненешнюю практику, и высокая целостность - теперь общепринятый термин для систем критических по отношению к безопасности и к секретности.

@ Есть несколько небольших изменений, чтобы отразить введение конфигурации Ravenscar. Заявлено, что управление задачами разрешено в системе высокой целостности при условии, что этим управляют надлежащим образом, например, используя конфигурацию Ravenscar.

@ Введена новая прагма Partition_Elaboration_Policy. Её синтаксис - pragma Partition_Elaboration_Policy (policy_identifier); Предопределены два идентификатора политики Concurent и Sequential. Прагма - прагма конфигурации и так применяется в течение разделения. Заданная по умолчанию политика Concurent.

@ Нормальное поведение при старте Ада - программы состоит в том, что задача, объявленная на библиотечном уровне, активизируется задачей среды и может начать выполняться прежде, чем будет выполнена элаборация библиотечного уровня и прежде, чем основную подпрограмму вызовет задача среды. Условия гонки могут возникнуть особенно, когда имеется несколько библиотечных задач. Проблемы также возникают с вложением обработчиков прерываний.

@ Если определена политика Sequential тогда выполнение осуществляется в следующей последовательности. Сначала выполняется элаборация всех библиотечных модулей (это осуществляется задачей среды), но сами библиотечные задачи не активизируются (мы говорим, что их активация задержана). Задерживается так же вложение обработчиков прерываний. Далее задача среды прилагает прерывания. Активизируются библиотечные задачи. В этот момент задача среды приостанавливается. После чего задача среды выполняет основную подпрограмму параллельно с выполняющимися задачами.

@ Отметим, что с точки зрения библиотечных задач они идут без приостановок от активации до выполнения.

@ Кроме того, они уверены, что все библиотечные модули закончат элаборацию, и все обработчики будут прикреплены прежде, чем они начнут выполнятся.

@ Если режим Sequential определен тогда:

  1        pragma Restrictions (No_Task_Hierarchy);

@ должен также быть определен. Это гарантирует, что все задачи находятся на библиотечном уровне.

@ Последний маленький пункт заключается в том, что идентификаторы ограничений No_Unchecked_Conversion и No_Unchecked_Deallocation теперь вынесены в приложение J, потому что No_Dependence может использоваться вместо них.

@ ENG RUS

TOP BACK NEXT

2010-10-24 00:26:55

. .