Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!jarthur!usc!apple!sun-barr!rutgers!cbmvax!daveh From: daveh@cbmvax.commodore.com (Dave Haynie) Newsgroups: comp.sys.amiga Subject: Re: REAL, TRUE, Honest-to-God Multitasking. Message-ID: <17632@cbmvax.commodore.com> Date: 15 Jan 91 19:42:28 GMT References: <9101110001.AA18145@ucbvax.Berkeley.EDU> Reply-To: daveh@cbmvax.commodore.com (Dave Haynie) Organization: Commodore, West Chester, PA Lines: 74 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