Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!wookumz.ai.mit.edu!rjc From: rjc@wookumz.ai.mit.edu (Ray Cromwell) Newsgroups: comp.sys.amiga.introduction Subject: Re: Amiga Multitasking Message-ID: <1991Jan12.040249.1510@mintaka.lcs.mit.edu> Date: 12 Jan 91 04:02:49 GMT References: <663@tnc.UUCP> Sender: daemon@mintaka.lcs.mit.edu (Lucifer Maleficius) Organization: None Lines: 66 Lets also add to this: The Amiga, since it was designed to multitask from the beginning allows tasks to communicate between one another using Signals, MsgPorts and Semaphores. At the lowest level are Signals, which allow tasks to signal each other and wait for certain signals. (and while waiting, other tasks are allowed to run making effective use of CPU time.) When a task receives a signal it 'Wakes up' and starts running. Using signals, the Amiga supports Message Ports. These are like signals in that, tasks may wait for them. Messages offer more however. Messages can contain data, so tasks can 'share' information instead of holding multiple copies of data, or reading it from disk. Semaphores are like signals and message ports. They are primarily used to share public data effectively. Semaphores can be like auctions. Tasks can 'bid' for the ability to own some data for a certain period of time and guarantee that another task won't be trying to access that data while your task is using it. The Amiga's DOS system has another kind of communication called Packets. Packets are like Message ports, and are mainly concerned with asking 'handlers' to do something, like open a file for you, and read some data. I am not an expert on the Mac, so I don't know how the Mac shares things like Interupts, Devices, Memory, etc. The main problem I see for the Mac is, most of the software not written explicitly for Multifinder won't cooperate enough to make it usuable as a multitasking system. And even if it does, the MacOS is still at the core, and Multifinder is just a front-end. (Just like Windows runs on top of MS-DOS) To me, true multitasking means multitasking from the beginning. OS/2 multitasks from the beginning, so does Unix, and fortunately so does AmigaOS. The Amiga faces a challenge of supporting new video devices in a friendly manner. (Retargetable Graphics) Since the Amiga didn't have this from the beginning, it will be hard to make existing software work on newer graphic devices. The Mac ironicly got this part right with QuickDraw (I'm willing to bet, QuickDraw wasn't written to handle multiple tasks updating the display however.). My opinion of course, is I think multitasking is more important than supporting different display devices. One last note about multitasking. Systems which support multiple users usually implement something called 'Aged Multitasking.' This prevents one user from being stingy and steal lots of processor time from other users. Imagine a low priority task like printing the current date periodically, and a high priority task like a Ray-Tracer. On the Amiga (a single user system) the Ray Tracer can steal lots of CPU time from a low priority task, even though the low task doesn't want that much time (since it only runs periodically.) On 'aged' systems, the OS keeps track of how long each task runs. If a task gets starved too much, it gives a little extra CPU time to it. This has a disadvantage in that it can prevent real time response, and has even more overhead involved in task switching.