From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Ada Task Priorities (Windows vs Linux)
Date: 12 Apr 2006 13:08:36 -0400
Date: 2006-04-12T13:08:36-04:00 [thread overview]
Message-ID: <wcclkualo17.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 1144855455.401847.282300@i40g2000cwc.googlegroups.com
"AAFellow@hotmail.com" <AAFellow@hotmail.com> writes:
> Hi Everyone,
>
> How are tasks prioritized in Ada when running on Linux (compared to
> Windows). I wrote a small test program that I ran in Windows, and it
> seems that the higher the number that I set the task's priority to, the
> higher the priority that is given to that task (I thought the opposite
> was true?)
In Ada, higher numbers mean higher priority.
> In Linux (using GNAT complier), how are the priorities mapped? I know
> a lower number means a higher priority, with a range of -20 to 19 and a
> default of 0. Do we just use these same numbers in the Ada code when
> setting the priorities of the tasks?
No. You use the numbers in the range System.Priority
(or sometimes, System.Interrupt_Priority).
The default is System.Default_Priority.
Look at the source code for package System to see what the numbers are.
The Ada run-time system will map these numbers to whatever the operating
system uses. If the operating system thinks lower numbers mean higher
priority, then the Ada run-time system will take that into account.
> Also, (so we can verify we have set the priorities correctly) does
> Linux provide a way to actually see what priority the OS has given to
> tasks that the Ada code has started? Are there any tools availible
> that can do this?
I think the 'top' program will show such info. Not sure.
- Bob
next prev parent reply other threads:[~2006-04-12 17:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-12 15:24 Ada Task Priorities (Windows vs Linux) AAFellow
2006-04-12 17:08 ` Robert A Duff [this message]
2006-04-13 21:26 ` AAFellow
2006-04-14 1:16 ` Robert A Duff
2006-04-17 12:14 ` Alex R. Mosteo
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox