Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!mcnc!ece-csc!ncrcae!ncr-sd!hp-sdd!hplabs!sdcrdcf!trwrb!scgvaxd!stb!michael From: michael@stb.UUCP (Michael) Newsgroups: comp.sys.amiga,comp.sys.mac Subject: Multitasking: Amiga vs. Unix, and apple comments Message-ID: <56@stb.UUCP> Date: Wed, 31-Dec-69 18:59:59 EDT Article-I.D.: stb.56 Posted: Wed Dec 31 18:59:59 1969 Date-Received: Sun, 23-Aug-87 11:42:54 EDT References: <6565@eddie.MIT.EDU> <2742@hoptoad.uucp> <3638@cit-vax.Caltech.Edu> <2758@hoptoad.uucp> <4537@videovax.Tek.COM> <1500@apple.UUCP> Reply-To: michael@.UUCP (Michael) Organization: STB BBS, La, Ca, USA, 90402 Lines: 62 Summary: Why Amiga's is better than unix, and comments on Mac's. Xref: mnetor comp.sys.amiga:7669 comp.sys.mac:5869 Someone asked for an explanation of why Amiga's multitasking system is better than unix's, and made the comment about poor performance for interactive programs on unix, esp. on demand paging. #1. Priority. Unix goes out of its way to give everyone sometime unless the system is totally hogged. Amiga, in contrast, has fixed priority levels--if you are at a higher priority, you get all the time you want. Basically, its like saying "Nice jobs finish last, er, niced jobs get no time unless no one else wants it", as opposed to "Niced jobs get 80% of what they would have". #2. Demand paging. This is good only for one thing: Letting a large program run on a small machine. If an interactive program has to wait while a background task runs and pages in, that program is very slow. The Amiga does not suffer from this mixed blessing. Personally, I think this could be improved by giving more priority (read: resources) to an interactive task even when its not running. Unix is notoriously bad with interactive tasks--esp. on swapping systems where as soon as it does the read(), it gets swapped. (You thought paging was bad? Swapping seems worse). The Amiga does not swap, so it can give good response time. #3. Two tasks competing for time. . Ok, so no scheme is perfect. Yes, with two tasks trying to run at the same time, it will be twice as slow. Yes, everysystem will have this problem if they are at equal priority. No they do not have to be at equal priority. The trick is to give the more interactive one higher priority (unix does), and give higher priority ones more resources (unix does NOT). The Amiga gives higer priority processes more resources, but only because the only one it gives is CPU time--memory, etc. goes to whoever asks first. Now for the Mac. Granted, a well written program that gives up control at various points can behave just as well as a pre-emptive timeslice system. However, A) It is easier to write for pre-emptive systems. B) A program that has a bug in it (lets face it, they all do) may never get around to giving up control when you want it to. C) There is inherent unfairness in it as two different programs will not give up control at the same rate; so, one program will get more time than the other. This is decided by the program author, not by the user. My own opinion is that we need something inbetween the two. On Unix, all programs get CPU time, even when niced. I've had programs run at nice of +20 on non-paging systems (they run just fine when other people are doing disk io, and they still get good time on their own IO), even when I put them there because I wanted them to WAIT. On the other hand, a low priority program on the Amiga (And unix, if the load is high) will not even see a signal sent to them. What we need is a "nice"'ing scheme sort of in the middle, where a little niceness does make a noticable difference in performance, and also in I/O speed. But at the same time, if you get a signal/message/whatever, you should be guaranteed CPU time quickly to respond to it. Michael -- : Michael Gersten seismo!scgvaxd!stb!michael : Copy protection? Just say Pirate! (if its worth pirating)