Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!heksterb From: heksterb@Apple.COM (Ben Hekster) Newsgroups: comp.sys.mac.system Subject: Re: True Multitasking Summary: System resources should not be preempted by the OS Message-ID: <48134@apple.Apple.COM> Date: 16 Jan 91 00:16:46 GMT References: <19019@shlump.nac.dec.com> <42588@ut-emx.uucp> <1991Jan15.233452.1163@maverick.ksu.ksu.edu> Organization: Apple Computer Inc., Cupertino, CA Lines: 43 awessels@ccwf.cc.utexas.edu (Allen Wessels) writes: >Every company that sells an OS has programming guidelines, and I'd guess that >most of them will tell you the bets are off if the program is written in an >OS-unfriendly fashion. jxf@orion.cis.ksu.edu (Jerry Frain) responds: > OS-unfriendly? Now there's a nifty term. A program should have to be > "OS-friendly," that's a lot of what this whole discussion is about. > > A primary job of the typical operating system is to manage resources. > Memory, disks, processes, etc. are all resources. If an OS cannot manage > a resource effectively and efficiently, then that part of the OS should > be enhanced so that it can manage the resource properly. These are indeed all examples of system resources. Although the OS does manage resources, it is up to the application to use them wisely. An analog to the processor-preemptive multitasking system, we could have memory-preemptive multitasking too--use all the memory you want, but keep it too long, and the OS pulls the rug out from under your feet... Save documents on disk? Fine--but if some other application needs space on a full volume, the OS will automatically delete enough files to make room for it... Well, you get my drift. To me, processor non-preemption seems to make sense. In the same way, still my opinion of course, if an application programmer feels that the user will be best served by completing a certain task as quickly as possible without interference from other applications that may happen to be present, he can implement this. If the application is performing a lengthy task, it might relinquish processor time to allow its user to do something else in the meantime. Of course this means that bad programs (that do not call WaitNextEvent as often as they might) will hog processor resources. So will applications that make extravagant NewHandle calls hog memory resources (and some do!). _______________________________________________________________________________ Ben Hekster | "I don't want to start any blasphemous Student intern | rumors/ but I think that God's got a AppleLink: heksterb | sick sense of humor/ and when I die Internet: heksterb@apple.com | I expect to find Him laughing" BITNET: heksterb@henut5 | --Depeche Mode [Some Great Reward]