How Priority is Assigned to Tasks in ADA

procedure PRIORITY is

task A

task body A is

pragma PRIORITY(5);

begin

end A;

task B

task body B is

pragma PRIORITY(2);

begin

end B;

task C

task body C is

pragma PRIORITY(1);

begin

end C;

begin

–Procedure body

end PRIORITY

The above ADA code shows that static Priority of A is higher than B and B Over C. If two tasks have same priority then, the order of preference will be taken randomly.

Comments

Popular posts from this blog

Installing ns3 in Ubuntu 22.04 | Complete Instructions

Installation of NS2 in Ubuntu 22.04 | NS2 Tutorial 2

How to Create Ubuntu 24.04 Bootable USB Using Rufus [Step-by-Step Guide]