[comp.sys.amiga] REAL, TRUE, Honest-to-God Multitasking.

91_bickingd@GAR.UNION.EDU ("Bicking, David") (01/11/91)

Date sent:  10-JAN-1991 18:43:19 

>multitasking system. If the user expects program not to multitask, and
>the exceptions are magic programs (TSRs, desktop accessories,
>whatever) that can run while a "normal" program runs - then you don't
>have a multitasking system.
> 
>   Again, my original point was that a much larger segment of the industry
>   counts non-preemptive multitasking as not quite "true" multitasking.  It
>   wasn't the Amiga folks who made it up, though you are correct in that some
>   of them do tend to yell too loudly about it simply to make themselves
>   feel superior to Machine X, often without really understanding the real
>   differences.

This must be quantified....

> 
>Well, I managed to miss the rest of the industry doing it, so I assume
>others have done the same. Amiga users dropping that usage would help
>their image. Since I object to the usage, it'd also make me feel
>better.

You may object to the usage, but too bad.  I object to Apple calling Hypercard 
applications multitasking, but I'm going to have to live with it.


>Then again, I'll could decide that "true" multitasking means "no task
>can ever be completely blocked out, unless the user specifically
>allows it to happen by tagging the blocked task". That makes a lot
>more sense to me than just not allowing low priority tasks to starve
>higher priority ones. But then the Amiga doesn't have "true"
>multitasking.

	Time to do the quanitfying I mentionned above.  I am currently learning 
about operating systems in college.  I now understand the difference between 
Unix multitasking and amiga multitasking and "other" multitasking.
	The Amiga uses a "Round-Robin" scheduler.  This means the _OS_ gives 
every TASK/Process equal time, preempting a task after a fixed clock period and 
moving to the next task.  This means, obviously, that shorter/smaller tasks 
will be finished before long ones, but the longer ones will not starve (be 
denied the CPU).  Under this system, all tasks are preempted by the OS (unless 
some special option is used to override.  Such a command exists on the amiga), 
and the program doesn't need to do anything special to multitask, but must do 
something special to hog the CPU.

	Unix uses a "Multiple Feedback Queue" scheduler.  This has much more 
overhead, as larger tasks are shoved on lower-priority queues to permit the 
shorter tasks to hog the CPU and get their job over-with faster.  With this 
scheduler, cpu-intensive tasks could conceivably starve.  The prof says that 
this is a "more efficient" scheduler than the round-robin one, but I tend to 
disagree.

	Then there is the MAC and the IBM.  The OS has no clue about 
multitasking.  Programs must be written to work at the same time as others (
TSRs and Multifinder apps).  This is, strictly speaking, multitasking.  H
owever, Engineers and Computer Science people do not generally consider it 
multitasking because it is not PREEMPTIVE.  The MAC and IBM (under dos/windows) 
do not multitask.  The stuff written that runs while other stuff runs are "
kludges" in the sense that they act outside the OS in that respect.  I can see 
already that my dialogue is getting abstract and muddy, so I will stop.  I've 
begun to speak from opinion.

	OS/2, I believe, does multitask preemptively.  Don't hold me to that 
statement though, I know little about it :)


--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-
Dave Bicking         	       Single Tasking????? Just say NO!!!!
Union College Box 152          91_bickingd@union.bitnet              //
Schenectady, NY 12308          91_bickingd@gar.union.edu	   \X/ Amiga 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

daveh@cbmvax.commodore.com (Dave Haynie) (01/16/91)

In article <9101110001.AA18145@ucbvax.Berkeley.EDU> 91_bickingd@GAR.UNION.EDU ("Bicking, David") writes:

>	The Amiga uses a "Round-Robin" scheduler.  This means the _OS_ gives 
>every TASK/Process equal time, preempting a task after a fixed clock period and 
>moving to the next task.  

That's actually, every task (or Process, which is of course as an OS object 
child of the Task object and behaves in every way like a Task, with additional
properties useful to the DOS subsystem and other higher OS levels) at the
same priority that gets scheduled round-robin.  Higher priority tasks are 
dealt with before any lower priority tasks are given any CPU time, as 
mentioned before.

>This means, obviously, that shorter/smaller tasks will be finished before 
>long ones, but the longer ones will not starve (be denied the CPU).  Under 
>this system, all tasks are preempted by the OS (unless some special option 
>is used to override.  Such a command exists on the amiga), and the program 
>doesn't need to do anything special to multitask, but must do something 
>special to hog the CPU.

True.  Actually, by waiting for I/O, tasks will give up their time slot prior
to the normal preemption time.

>	Unix uses a "Multiple Feedback Queue" scheduler.  This has much more 
>overhead, as larger tasks are shoved on lower-priority queues to permit the 
>shorter tasks to hog the CPU and get their job over-with faster.  With this 
>scheduler, cpu-intensive tasks could conceivably starve.  The prof says that 
>this is a "more efficient" scheduler than the round-robin one, but I tend to 
>disagree.

You have to qualify what you mean by "more efficient".  Certainly, the Amiga
scheme uses less CPU overhead, so in at least in a technical way is more 
efficient.  The Amiga scheme also allows realtime (or near realtime, if you
want to get hardcore about it) response, whereas the UNIX system doesn't.  But
the UNIX system will successfully handle a multiuser system fairly, whereas
the Amiga system is really designed to serve a single interactive user
properly.  This is why a moderate speed Amiga can seem faster than a fast
UNIX workstation to the user, at least for the jobs its capable of.  User
interaction is a realtime task.

>However, Engineers and Computer Science people do not generally consider it 
>multitasking because it is not PREEMPTIVE.  

Because if you're not preemptive, noninteractive tasks can't run efficiently.
Engineers run lots of CPU-eating tasks in the background -- simulations and
that kind of thing.  The same simulation could take 2-3 times a long to run 
on a non-preemptive system as a preemptive system with equivalent foreground
activity, if you maintain multitasking performance on the non-preemptive 
system.  CS people, like most scientists, consider what's actually happening
rather than what appears to happen in their chosen specialty.  The business
person, running an interactive spreadsheet and interactive word processor
at the same time can't tell the difference.

>	OS/2, I believe, does multitask preemptively.  Don't hold me to that 
>statement though, I know little about it :)

From what I've read of it, it does.  It has something like 3 classes of 
processes (heavy weight tasks), each of which can have threads (light
weight tasks) within them.  Within each process class (which I think are
set up along the lines of Device/OS, Interactive, and Background), the 
processes get some kind of load balancing like under UNIX, but priority
between the classes is strict, like under AmigaOS.  This would, for instance,
let the GUI have better response, like AmigaOS, but still let you have normal
user tasks scheduled to permit a decent multiuser response.  Anyway, that's
my recollection of how it works.

>Dave Bicking         	       Single Tasking????? Just say NO!!!!


-- 
Dave Haynie Commodore-Amiga (Amiga 3000) "The Crew That Never Rests"
   {uunet|pyramid|rutgers}!cbmvax!daveh      PLINK: hazy     BIX: hazy
	"Don't worry, 'bout a thing. 'Cause every little thing, 
	 gonna be alright"		-Bob Marley