Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!ucbvax!unisoft!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Need info on multitasking capabilities on the mac Message-ID: <9014@hoptoad.uucp> Date: 20 Nov 89 01:03:41 GMT References: <9775@zodiac.ADS.COM> <39178@srcsip.UUCP> <36687@lanl.gov> <5267@internal.Apple.COM> <74117@tut.cis.ohio-state.edu> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 61 In article <36687@lanl.gov> tjf@lanl.gov (Tom J Farish) writes: > I've heard that multitasking has been dropped from system 7 for the > Mac...Why? In article <5267@internal.Apple.COM> lsr@Apple.COM (Larry Rosenstein) writes: >Multitasking hasn't be dropped from System 7.0; I don't know where you >might have heard this. In article <74117@tut.cis.ohio-state.edu> wilson m liaw writes: > Are we talking about the same type of Multitasking here? I think Tom >was talking about true multitasking.( As in unix.) While the multitasking in >System 7.0 is like the current MultiFinder. Oh no, not this argument again! I hope a few words can hold off a slew of messages debating the true meaning of multitasking. Multitasking means simply that a computer is capable of switching its operation between a set of independent or semi-independent "tasks", which take the form of separate pieces of compiled software. There are a number of types of multitasking, which may broadly be divided into synchronous and asynchronous. In synchronous multitasking, each piece of software must explicitly signal the scheduler that it is willing to give up control of the processor for a task switch to happen. This is the kind of multitasking currently implemented on the Mac; the signals that a task is willing to give up the processor are (for applications) GetNextEvent, WaitNextEvent, and SystemTask, and (for desk accessories) returning from a request call initiated by the operating system. The Mac has always had this capability with respect to desk accessories; MultiFinder added this capability with respect to applications. In asynchronous or time-sliced multitasking, the scheduler does not depend on signals from software that they are ready to give up the processor. instead, they are assumed to always be ready to give up execution, and they do so when the scheduler demands that they do so by saving their context and passing execution to another task, typically during a clock interrupt. The Mac does not have this capability, and I doubt that it will have it in System 7.0. Nor does it greatly suffer for the loss. Any Mac application that does not give up the processor for a long time is probably engaged in a processor-intensive task which would allow other tasks to run only very slowly, and which itself would run very slowly if it were being switched in and out. I think it is very far from correct to refer to only time-sliced multitasking as "true" multitasking, at least on a single-user computer. (It *is* important for multi-user systems, I admit.) Synchronous multitasking is true multitasking. (Nor is it true to say that UNIX by nature has this "true" multitasking. This is true of the overwhelming majority of UNIX systems, but I have read of some which used synchronous multitasking, context switching only when a program makes a system call [an implicit signal that the software is willing to give up control of the processor].) -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "Philosophy is the talk on a cereal box Religion is the smile on a dog" -- Edie Brickell, "What I Am"