Tasks, RM Tasks, Queues and priorities.

Joel Sherrill joel.sherrill at OARcorp.com
Fri Oct 27 15:13:51 UTC 2000


Wow!! Graphics. :)

The services being used are a mix of POSIX and Classic API which
have different notions of numerical priority.  Are your priorities
always in the same API?  Are you mixing priority numbers between the
APIs.

Sporadic server is a posix feature and the attributes sched_priority
and ss_low_priority would be POSIX priorities.  If these are RTEMS
Classic API tasks (created via rtems_task_create, then their priorities
run the opposite direction numerically.

Classic API: 1=highest priority, 255=lowest.
POSIX API: 1=lowest priority, 255=highest.

If you are mixed the notion of priority, then when ss_low_priority
is used, it would certainly confuse things.

> John Bebbington wrote:
> 
> Hello RTEMS users,
> I am experiencing a problem with the interaction of tasks and queues
> and wanted to know if I was doing anything wrong.
> 
> Here is the scenario:
> =====================
> 
> 
> 
> 
> 
> Problem:
> 
> The problem is that the Task B seems to suspend and not wake although
> there is a message pending in Queue B.
> 
> If a second message is sent later then the Task B resumes and
> processes both messages.
> 
> 
> 
> My question is :
> 
> Am I causing problems by assigning a higher priority to sporadic Tasks
> A & B than the periodic Rate Monotonic task?
>
> Is it possible that because there is a RM task present that the
> sporadic task B does not get resumed until a 2nd message enters the
> queue?

No.  The sporadic task will be readied when the message arrives if
it is blocked but it may not get to run because of CPU use contention
or priority problems.

> Can the "readying" of a RM task have priority over the sporadic task B
> if the task B's priority is greater than that of the RM task?
> 
> I have read in the users manual for RTEMS that critical RM tasks
> should have higher priority than the non-critical tasks. When
> "relaxing the rules a bit" the sporadic tasks are okay as long as
> these sporadic tasks don't take much time and can be treated the same
> as ISRs for calculating the processor utilisation.
> 
> Any comments would be helpful
> 
> regards
> 
> John Bebbington.
> 
> 
> 
> 

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list