Xref: utzoo comp.sys.amiga.misc:206 comp.sys.amiga.advocacy:206 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!snorkelwacker.mit.edu!ai-lab!geech.ai.mit.edu!rjc From: rjc@geech.ai.mit.edu (Ray Cromwell) Newsgroups: comp.sys.amiga.misc,comp.sys.amiga.advocacy Subject: Multitasking. Message-ID: <12916@life.ai.mit.edu> Date: 23 Jan 91 04:42:55 GMT References: <1991Jan21.032207.6127@cunixf.cc.columbia.edu> <4827@skye.cs.ed.ac.uk> <12913@life.ai.mit.edu> Sender: news@ai.mit.edu Organization: None Lines: 68 It seems a few people misread my original message about preemptive vs cooperative multitasking and my chart. Re-read my message. I said that my chart assumes each task uses ALL of its timeslice, this means no waiting is occuring. Mac multitasking will become jerky and bogged down before Amiga tasks will in a heavily loaded system. Consider the following psuedo-code. Mac: GetNextEvent(); HandleTheEvent(); while(condition) { do compute intensive loop such as uncrunch, fractal, trace, search a buffer, fibonacci,etc } Amiga: CheckMsgPort(); HandleTheMsg(); while(condition) { compute loop } Now run 3 or 4 copies of this program on each machine. On the Mac, the loop will grab 100% of CPU time and the other 3 copies will be DEAD. On the Amiga, all 4 will run but at a slower speed (assuming equal priority). The Mac programmer must decide CAREFULLY where to place I/O calls to give up the CPU. If the compute loop is sufficiently complex( nested), he will have to put them in many places. One can readily test this on the Amiga by starting up 2 or 3 copies of MandelVroom or BioMorph. I did it, and on my 7mhz Amiga, the fractal slows down linearly, but it does NOT become jerky. On the Mac, the other fractal geneators will become jerky(possibly dead). Mac users must consider what Amiga users typically do. An artist may place a long ray-trace task at -1 priority in the background and let it run for a week! A programmer will put a compile in the background while editing or reviewing source. I suspect the Mac's lack of priorities and preemptive tasking would cause foreground tasks to become jerky if compute intensive tasks are placed in the background (such as a long ray-trace). Also, I made the comment 'I don't consider the Mac to be multitasking since ithasn't been multitasking since the start.' Let me clarify this. On the Amiga, programming rules about multitasking have been around since day one. However, on the Mac, I suspect the vast quantities of software published before Multifinder was invented will be CPU hogs. The Amiga faces the same problem with device independent graphics. Most Amiga programs assume bitplaned graphics and alot of them write directly to display memory. It will be hard for the Amiga to become device independent and still work with older programs. The MS-DOS world has an even bigger problem. No matter how many kludges IBM companies come up with, they will always have to contend with MS-DOS and 8088 compatibility. If they don't, they have to break millions of dollars of software out there. Now look at the Mac. Apple is attempting to layer a multitasking interface ontop of a non-multitasking core. This is almost the same as layering MS Windows ontop of MS-DOS. As far as I know, the Mac has none of the facilities the Amiga has for sharing interupts, exceptions, handlers devices, console windows, keyboard strokes. Consider the Amiga's Task Control Block, or struct Process, can anybody tell me what the Mac equivelent is? -- Destroy Iraq, send them the Mac!