Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!athena.mit.edu!dcw From: dcw@athena.mit.edu (David C. Whitney) Newsgroups: comp.sys.apple Subject: Re: multitasking, softswitch, etc. Message-ID: <10183@bloom-beacon.MIT.EDU> Date: 29 Mar 89 20:53:15 GMT References: <8903181259.aa27052@SMOKE.BRL.MIL> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: dcw@athena.mit.edu (David C. Whitney) Organization: Massachusetts Institute of Technology Lines: 43 In article <8903181259.aa27052@SMOKE.BRL.MIL> SASQUATCH@ALBION.BITNET ("Kevin O. Lepard 629-5511 x6668", 517) writes: > >Would it be possible to write a program similar to softswitch that could >automatically switch between applications, allowing something to run in >background? I've heard people talk about "heartbeat" interrupts. Couldn't >that be used somehow? Even if this cut the speed of the GS in half, it >would still be running as fast as a normal //e I think everyone here needs a bit of enlightenment. As much as I would LOVE a multitasking environment on my //GS, I *know* that it can't be done within any reasonable degree of efficiency. Even Macintoshes don't have "true" multitasking (ie, Multifinder is a good hack, but it isn't "for real"). Only Mac IIs with the PMMU installed (or any IIx - 68030) can even *hope* to do multitasking. The problem? A system for handling virtual memory is a MUST for multitasking. Now, a virtual memory handler *could* be written in assembler, but one running on a screeching 68030 going at 45MHz still wouldn't go fast enough to make the machine come within tolerable speed limits. That's why there is the PMMU - that's Paged Memory Managment Unit. It handles page faults in hardware, so things go reasonably fast (although most A/UX people will tell you it's still too slow). The next problem is designing a way to quickly make calls to the OS. The Mac (more accurately, the 680x0 series), along with 80x86 machines use something called "traps." They are basically undefined processor instructions that can be defined by the host computer. The Mac implements its toolbox calling by using traps. As far as I know, the 65816 doesn't have a trap mechanism (although, I suppose the COP instruction might get useful here...). Apple is going to release a new system sometime that uses the 68030 (or PMMU) to do virtual memory stuff. Sometime after that, MultiFinder will be a thing of the past, as *real* multitasking will be here. This is relatively easy to do on the Mac while it's remarkably hard on the //GS. So hard in fact that nobody should even bother. Sorry to rain on your parade, but a multitasking OS is a physical impossibility on the // line. IT CAN'T BE DONE. Now, expend that creative energy on porting GNU C and GNU Emacs, and I'll be VERY VERY happy! Dave Whitney A junior in Computer Science at MIT dcw@athena.mit.edu ...!bloom-beacon!athena.mit.edu!dcw dcw@goldilocks.mit.edu I wrote Z-Link & BinSCII. Send me bug reports. I use a //GS. Send me Tech Info. "This is MIT. Collect and 3rd party calls will not be accepted at this number."