Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!mephisto!udel!mmdf From: FILLMORE%EMRCAN.bitnet@ugw.utcs.utoronto.ca Newsgroups: comp.sys.amiga Subject: Re: Multifinder - Just the Facts, man. Message-ID: <18816@snow-white.udel.EDU> Date: 8 May 90 13:10:39 GMT Sender: mmdf@udel.EDU Lines: 72 Well, they say a picture is worth a thousand words so here is my attempt to clarify the discussion comparing multitasking on the Amiga and Macintosh. Note: I consider the Amiga custom chips, floating-point chips, etc. which have special instruction sets to be co-processors, NOT CPUs. They are not considered in the following illustration. Also, I ignore the effects of interrupt service routines. Legend: A = processor A, B = processor B, etc. A,B,... are all processors of the same type (homogeneous) < = task start > = task end | = task switch SINGLE-TASKING (eg. Mac Finder, MS-DOS programs) -------------- Task 1: Task 2: Notice that each task must run to completion before the next task starts. COOPERATIVE MULTITASKING (eg. Mac Multifinder, MS-DOS TSRs or spoolers) ------------------------ Task 1: | Task 2: Notice that the total elapsed time for a task is very unpredictable. Also, the elapsed time for task 1 depends on how task 2 is written (how often task 2 gives up the CPU). Each task must be programmed with multitasking in mind (frequent calls to system routines) in order for it to work successfully. Mac programs which follow Apple's guidelines will multitask fairly well. Program development costs may be higher because of extra care required. PRE-EMPTIVE MULTITASKING (eg. Amiga, Sun, each CPU in a mainframe) ------------------------ Task 1: | Task 2: |AAAAA| |AAAAA| |AAAAAAAAAAAAAAAAAAAAAAAAAAAA> Notice that each task is given an equal time slice in the CPU. Therefore, the total elapsed time for a task is the task CPU time multiplied by the number of tasks running (ie. it is predictable). In general, application programs can be written as if they own the whole machine - they do not have to keep multitasking in mind. Of course system-type programs do have to be well-behaved. MULTIPROCESSING or parallel processing (eg. mainframes with multiple CPUs) --------------- Task 1: Task 2: Since there is a CPU for each task the total task time is very predictable. Note: if there are more tasks than CPUs then some of the CPUs will start pre-emptive multitasking. All of these issues were covered years ago in the mainframe world. I have simplified things a lot to clarify the comparison. ________________________ Bob Fillmore, Systems Software & Communications BITNET: FILLMORE@EMRCAN Computer Services Centre, BIX: bfillmore Energy, Mines, & Resources Canada Voice: (613) 992-2832 588 Booth St., Ottawa, Ontario, Canada K1A 0E4 FAX: (613) 996-2953