Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!sdd.hp.com!wuarchive!uunet!midway!msuinfo!rang From: rang@cs.wisc.edu (Anton Rang) Newsgroups: comp.sys.mac.system Subject: Changes for preemptive multitasking (was Re: When will mac do...) Message-ID: Date: 7 May 91 05:56:48 GMT References: <1991May3.035637.4446@vax5.cit.cornell.edu> <811@newave.UUCP> <15931@helios.TAMU.EDU> Sender: news@msuinfo.cl.msu.edu Distribution: comp Organization: UW-Madison CS department Lines: 44 In-Reply-To: jeff@archone.tamu.edu's message of 7 May 91 04:11:12 GMT In article <15931@helios.TAMU.EDU> jeff@archone.tamu.edu (Jeff Raymond) writes: >Windows 3.0 can do it, the Amiga can do it, so why not the Mac? I'm not >an Apple engineer nor do I claim to know how they do what they do, but if >this functionality can be grafted on top of DOS' aching bones (across >multiple platforms), certainly it can be done on the Mac as well. It can be done, though without a 68020 and PMMU it's may not be worth the effort (protected memory and separate address spaces really help here). The big problem, at least as I see it, is that the current libraries aren't re-entrant. Some of these things would be easy to change; others wouldn't. For instance, take QuickDraw. Suppose that process A is busily doing a DrawPicture. What happens when process B is context switched in and tries to update its window which was moved earlier? I suspect there are parts of QuickDraw which expect various global variables and data structures to be in consistent states, and that you'd have a problem. (What if you're in the process of creating a new window and it's not fully linked into the window list when a new process tries to create one, too?) I don't think the file manager currently processes more than one request either, though that isn't as serious a problem (especially when asynchronous I/O can be used) since it at least queues multiple requests for service. Some parts of the system which have been introduced for MultiFinder will help quite a bit when preemptive multitasking finally comes (and I do believe it will, though I'll make no predictions on dates). The notification manager, for instance, is a great tool even with MF. Programs which depend on global variables may have to be changed, though a lot of the functionality could be emulated by using the MMU to trap accesses to global variable addresses and emulate them (at some cost in speed). Programs which use the managers should work fine, since the *internals* can be changed to allow for pre-emptive multitasking without changing the interface. (At least, I haven't come up with any obvious cases where it can't be done yet.) It's possible to do. It'll be expensive and take a long time. I'd hope that Apple's already working on this stuff, and that their newer code (e.g. System 7) is written with it in mind.... Anton +---------------------------+------------------+-------------+----------------+ | Anton Rang (grad student) | rang@cs.wisc.edu | UW--Madison | "VMS Forever!" | +---------------------------+------------------+-------------+----------------+