Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!ima!mirror!cca!dvmark From: dvmark@cca.UUCP Newsgroups: comp.sys.amiga,comp.sys.mac,comp.sys.m68k,comp.sys.misc Subject: Re: Re: Mac vs. Amiga Message-ID: <12679@cca.CCA.COM> Date: Fri, 30-Jan-87 14:46:04 EST Article-I.D.: cca.12679 Posted: Fri Jan 30 14:46:04 1987 Date-Received: Sat, 31-Jan-87 15:02:20 EST References: <8520@topaz.RUTGERS.EDU> <1270@cbmvax.cbmvax.cbm.UUCP> Reply-To: dvmark@CCA.UUCP (Mark Jay Jones) Organization: Computer Corp. of America, Cambridge, MA Lines: 43 Xref: watmath comp.sys.amiga:1814 comp.sys.mac:1058 comp.sys.m68k:199 comp.sys.misc:274 Now, now, now. Lets not get context switching confused with multi-tasking. On the Mac with swither, only one program is running at a time. You can't start a program compile, and switch to another program and do something else in the mean time. When you switch to another program, the other programs are not running, just the one in front of you. To illustrate this point even better, I have a friend that runs a BBS on his Amiga, and while it is running, he can run a text editor to develop programs, compile and link-edit them *while* the BBS is running, allowing some dialed- in user to read the BBS mail, up/down-load programs, etc. This cannot be done on a Mac or Atari-ST. A question was raised about whether a compute-bound program can monopolize the Amiga and take up all of the available CPU. Here's the story: there are 256 priorities for tasks in the Amiga OS. If a task is ready to run and there are no other tasks at it's priority, it is just handed control and that is it. All higher priority tasks must be in a wait state (or else they would be running, instead of the job at the current priority). When there is an interrupt that makes a higher priority job ready to run, the current job that is running is stopped, and the higher priority job is given control at that point (basic tricle-down dispatching). Here is the good part: If a task is ready to run, and there are more than 1 task ready to run at its priority, the EXEC routines set a hardware timer to interrupt in 64 milliseconds (that's about 1/15 of a second in case you don't have your calculator handy) and then give the task control. If that task does not give up control of the CPU in 64 ms, *BOOM* out he goes, and the next task at that priority is given control the same way. Since all user tasks in the Amiga run at the same priority, this effectively time-slices use of the CPU, and things continue to run. (There is a new command in 1.2 AmigaDOS that allows you to change priority, so you could, in 1.2, block other programs with a compute-bound program, but its your own fault if you ask for it to be done.) The time-slicing that is described in the prior paragraph is very sophisticat- ed, and is *not* done if only one task is running at a given priority, so no overhead is incurred if only one thing at a time is runnable. The only machine that I know of that uses this round-robin time-slicing method could be effectively used as a boat anchor for the USS Nimitz (aircraft carrier). There is certainly no micro that does this. When the Mac and Atari-ST can do the above, drop me a line, and we'll talk about multi-tasking operating systems.