Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Real-Time Programming in AIX

60 views
Skip to first unread message

Greg

unread,
Mar 25, 1999, 3:00:00 AM3/25/99
to
Hi,

I'm trying to understand how real-time programming is done in AIX.
Let's say I want to have some processes to be executed periodically and
scheduled by the rate monotonic algorithm (highest frequency first).
Furthermore, there are other processes to be executed sporadically.

Now the obvious things I can do about the scheduler are: - I can choose
between three policies (fifo, round robin and other, which seems to be round
robin with changing priorities depending on recent CPU usage) - I can change
the priority of a process.

The only way I see to implement the desired behaviour is to have a process
that is executed regularly, and that will boost up the priority of the
process to be executed. Is there an easier way?


Regards, Greg

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Manoj Patil

unread,
Apr 15, 1999, 3:00:00 AM4/15/99
to
Hi !
firstly expecting real time performace from OS like unix is like taking station
wagon
and competing with other Indy in a car race.
Though by selecting the appropriate sceduling policy, logical needs can be met,
but what about the determinism which is a basic need in real time systems.
A proper analysis of target achievment needs to be in case soft real time
scenarios
are into consideraion

Regards
Manoj
IBM India

Norman Levin

unread,
Apr 15, 1999, 3:00:00 AM4/15/99
to
Real time applications can be handled in AIX. The "setpri()" call will
nail a processes priority so it is not influenced by nice/renice or
normal cpu vs i/o scheduling needs. Must run as root to use setpri().
You can even run in front of the paging routines! (Swapper runs at
priority 16 - you could run better then that!

--
Norman Levin
vm/dynAmIX inc.


Julie Haugh

unread,
Apr 18, 1999, 3:00:00 AM4/18/99
to
Norman Levin wrote:

> Real time applications can be handled in AIX. The "setpri()" call will
> nail a processes priority so it is not influenced by nice/renice or
> normal cpu vs i/o scheduling needs. Must run as root to use setpri().
> You can even run in front of the paging routines! (Swapper runs at
> priority 16 - you could run better then that!

Yes, but you'd better be willing to relinguish the CPU if paging is
required for the job mix -- and since AIX is a pagable kernel, you
can get yourself into real trouble really quick if you =do= set your
priority more highly favoured than the swapper ...

-- Julie.


pete...@my-dejanews.com

unread,
Apr 26, 1999, 3:00:00 AM4/26/99
to pece...@tripac.com
Greg, et al -

I agree with Manoj. Why are you trying to use AIX as a "real-time" OS? You
need to understand what your needs are and then check to see if establishing
priorities in AIX will come close to your desired needs. As Manoj says, if
you need an Indy Car, buy one. If you are statisfied with a station wagon
then you probably don't need real-time capabilities. Also once you try to use
Fifo or Round Robin scheduling in real-time you are lost to start with.
"Predictability" is nearly impossible.

Peter
Tri-Pacific Software Inc.

In article <3716B241...@ibm.net>,


norma...@ibm.net wrote:
> Real time applications can be handled in AIX. The "setpri()" call will
> nail a processes priority so it is not influenced by nice/renice or
> normal cpu vs i/o scheduling needs. Must run as root to use setpri().
> You can even run in front of the paging routines! (Swapper runs at
> priority 16 - you could run better then that!
>

Norman Levin

unread,
Apr 26, 1999, 3:00:00 AM4/26/99
to
You're absolutely correct. I used to work with VM/ESA (and all flavors back
to
CP/67) and OS/390 (and again flavors back to MFT) and I was amazed that any
operating system considered the paging/swapping code as possibly lower in
priority then a special users. Guess that's what happens when you try to
serve
two task masters at once - real time, and good interactive response.

On the other hand, I do remember that OS/390 (MVS) had a function that an
authorized program could use that looked like "enq ..args STEP MUST COMPLETE"
which basically said, once this piece of code was entered, NOTHING could
interrupt it until it issued a "deq" instruction. I think you needed a
papel dispensation if you wrote more then 50 lines of code between the enq/deq
with that step-must-complete option!

Julie Haugh wrote:


>
> Norman Levin wrote:
>
> > Real time applications can be handled in AIX. The "setpri()" call will
> > nail a processes priority so it is not influenced by nice/renice or
> > normal cpu vs i/o scheduling needs. Must run as root to use setpri().
> > You can even run in front of the paging routines! (Swapper runs at
> > priority 16 - you could run better then that!
>

> Yes, but you'd better be willing to relinguish the CPU if paging is
> required for the job mix -- and since AIX is a pagable kernel, you
> can get yourself into real trouble really quick if you =do= set your
> priority more highly favoured than the swapper ...
>
> -- Julie.

--
Norman Levin
vm/dynAmIX inc.


jpa...@my-dejanews.com

unread,
Apr 27, 1999, 3:00:00 AM4/27/99
to
Manoj Patil wrote:
> Hi !
> firstly expecting real time performace from OS like unix is like taking
station
> wagon
> and competing with other Indy in a car race.
> [snip]

Isn't QNX supposed to provide this capability and provide a UNIX-like
interface?

Regards,
Jon

0 new messages