Xref: utzoo comp.sys.mac:14119 comp.windows.misc:320 Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!claris!apple!goldman From: goldman@Apple.COM (Phil Goldman) Newsgroups: comp.sys.mac,comp.windows.misc Subject: Re: Shy pre-emption++ Message-ID: <7731@apple.Apple.Com> Date: 18 Mar 88 02:37:07 GMT References: <7670@apple.Apple.Com> <6970@drutx.ATT.COM> <2154@polya.STANFORD.EDU> Reply-To: goldman@apple.UUCP (Phil Goldman) Organization: Apple Computer Inc, Cupertino, CA Lines: 30 In article <2154@polya.STANFORD.EDU> ali@polya.UUCP (Ali Ozer) writes: >I'd hate to run any sort of interactive program on such a system, especially >if anyone is ray-tracing! 8-) But really, there are some other features that >Unix (and other multitasking systems provide) that you really do need. >Task priorities, for instance. Consider the Amiga: You run a ray tracer >and a word processor. Set the ray tracer's priority to a low value, and leave >the WP at the default. You are assured of getting immediate response as soon >as you hit any key in your WP, while the ray tracer (which we assume >is a CPU hog) will soak up any unused cycles from right between your fingers. >But you won't even know the ray tracer is running. > I think you have a point, but for a different reason. The only time you want the WP to have highest priority is when you are interacting with it. At all other times you want it to have the lowest priority. MultiFinder accomplishes this by guaranteeing highest priority to the application with the frontmost layer, at the expense of all other layers. However, when the WP is not frontmost, it gets no time at all and will never interrupt the ray tracer from its task. The only nicety in your example above is that *as soon as* you hit the key you get switched to the WP, but this is made possible because of preemption, not task priorities. Without preemption all the prioritization can't get the CPU to the WP's event handling code any quicker than MultiFinder does. One more point about prioritization is that it had better be dynamic (e.g. frontmost task vs. the rest in MF). Otherwise, priorities assigned in a vacuum will not work well with different task mixes. -Phil Goldman Apple Computer