From: soh@tmp_ip_003.trl.OZ.AU (Soh Kam Hung)
Subject: Re: the NeXT option (Was Re: 7.1 vs. OS/2 and Windows NT)
Organization: Telecom Research Labs, Melbourne, Australia
Date: Tue, 13 Oct 1992 04:05:31 GMT

ewright@convex.com (Edward V. Wright) writes:

>In <bmccnnll.718583847@unix1.tcd.ie> bmccnnll@unix1.tcd.ie (Barry McConnell) writes:

>>On the Amiga, you use the Forbid() .. Permit() combination to "turn off"
>>multitasking. In effect, you are back down to co-operative multitasking, in
>>that you can hold the entire system at your mercy via this method. I would
>>thus consider pre-emptive multitasking a superset of co-operative 
>>multitasking, and hence there is no valid argument for *not* having it! ;-)

>Well, no, you've just proven that the Amiga, like the Macintosh,
>has cooperative multitasking.  The only time it can multitask
>is when an application permits it.  If an application doesn't
>cooperate by using Permit() calls at the appropriate times (after
>a Forbid() call), multitasking can't occur.

Barry stated that all tasks work in the Amiga's pre-emptive
multitasking environment unless a task explicitly grabs all of the
processor's time.  Edward is being an obscurant by suggesting that the
ability of tasks to turn off preemption implies the Amiga only allows
cooperative multitasking.

>>Again, on the Amiga, the priority of an application can be changed 
>>dynamically.  You can be running at priority 0 for most of the time, 
>>and priority 5 for the time when you *absolutely need* to get something 
>>done.

>Who is "you?" Does the user set that priority, or the program?  
>If it's the user, it's got to be damned annoying to fiddle with
>the priorities setting everytime you change to a different paint
>tool.  If it's the program -- I'm pretty sure it is -- well, that's
>different, but again, this is cooperative multitasking.  It depends
>on programs cooperating and not just cranking their priority up to
>5 all the time.

Applications can choose a default priority level, or the Amiga user can
set the priority level using a command called ``changetaskpri''.
However, the ability by either the user or applications to change
priority levels does NOT imply cooperative multitasking.

From my understanding, ``cooperative multitasking'' means that programs
have to cooperate to create a multitasking environment, i.e.  programs
have to delibrately relinquish control of the processor to give other
programs a chance to do work.  The operating system has no effective
ability to determine how much processor time each program receives, so
setting processor priority is not useful in a cooperative multitasking
environment.

``Pre-emptive multitasking'' usually means the operating system decides
which waiting process gets to use the processor.  The process priority
can be used to determine how many time units or how long the process
uses the processor.

There is hardly any need for changing the priority level of any task in
the Amiga.  The only good reason I can think of for changing a task's
priority is if the user has long running jobs and wants to use a
interactive programs at the same time.  Then, the user would lower the
priority of these background tasks or raise the priority of the
interactive tasks.

Regards,

---
Soh Kam Hung, Network Management Research,     | h.soh@trl.oz.au  
TRL, POB 249 Clayton, Victoria 3168, Australia | +61 3 253 6638