[comp.sys.amiga.tech] Does AmigaDOS drive with one foot on the brake?

ecottle@falcon.afit.af.mil (Eugene T. Cottle) (08/14/90)

    It started with a question about input.device.  Now I am wondering
whether AmigaDOS is intentionally trying to slow down my program.

    I am writing very CPU intensive software in Fortran.  Since I am
interested in how efficiently it runs, I have been watching the CPU usage
with XOPER.  I have noticed something strange.  I have never seen any
single task use more than 50% of the CPU time.  I have seen two CPU
intensive tasks together use more than that, but never one.

    The task which I wondered about the most was the input.device.  With
nothing going on except Xoper (no mouse movement, no joystick, etc.) it
hovers around 10% CPU time.  When I run the number cruncher (no other
changes), input.device uses over 20% CPU time.  The program does no I/O
during that time.

    I have asked the opinions of a number of local gurus to try to get
an explanation.  The most reasonable theory I have heard yet is that
AmigaDOS may actually restrict any single task from using too much CPU
time.  Apparently some UNIX systems do that, and AmigaDOS is related to
UNIX (right?).  Another theory is that it may be related to using the
math processor.

    I am using an A2500/020, with the Absoft A/C Fortran 020 compiler,
with the 'p' switch on (generate code for the 68881).

    Any light anyone can shead on the subject would be greatly appreciated.
It is hard to believe that AmigaDOS would drive with one foot on the brake.
That would cripple the Amiga as a number cruncher.  Increasing the
priority would obviously help the number cruncher, but I don't want to
inhibit system tasks, right?

Eugene Cottle                               (513)254-7760
AFIT/ENA
Wright Patterson AFB, OH                    ecottle@falcon.afit.af.mil

jap@convex.cl.msu.edu (Joe Porkka) (08/14/90)

ecottle@falcon.afit.af.mil (Eugene T. Cottle) writes:


>    It started with a question about input.device.  Now I am wondering
>whether AmigaDOS is intentionally trying to slow down my program.

>single task use more than 50% of the CPU time.  I have seen two CPU
>intensive tasks together use more than that, but never one.

>nothing going on except Xoper (no mouse movement, no joystick, etc.) it
>hovers around 10% CPU time.  When I run the number cruncher (no other
>changes), input.device uses over 20% CPU time.  The program does no I/O
>during that time.

AmigaDos is not related to UNIX.

The task scheduler is simple round robin - The task of highest
priority readqy to run gets to run. If there are more than one task
at that priority level, then they get an equal chance at the CPU.

The 10% figure also includes overhead eaten up by DMA for video, sounds
disk, etc...

To check to see if you program is leaving any CPU unused, try this:
ChangeTaskPri -5
run SimpleBusyDemo - Like the lines demo from Workbench 1.2
ChangeTaskPri 0
run your program.

If the lines program runs AT ALL after you start your program, then
there idle times in your program, most likly caused by IO, or
even graphics could cause some (CPU waiting for the blitter).