Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!rex!ames!uhccux!virtue!ccc_ldo From: ccc_ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) Newsgroups: comp.sys.mac.system Subject: Re: PPC, IAC, and True Multitasking (tm) Message-ID: <1377.26dc1ba9@waikato.ac.nz> Date: 29 Aug 90 07:46:49 GMT References: <1990Aug3.040513.14844@d.cs.okstate.edu> <2760@bridge2.ESD.3Com.COM> <13888@cbmvax.commodore.com> <923@mdavcr.UUCP> Distribution: na Organization: University of Waikato, Hamilton, New Zealand Lines: 48 In <923@mdavcr.UUCP>, ewm@mdavcr.UUCP (Eric W. Mitchell) says: "preemptive multitasking slows down the system because it adds to the number of cycles required to perform a given operation." First of all, I'd like to say that I basically agree with Eric's viewpoint that the Mac *is* a multitasking system, albeit a non- preemptive one. However, even among preemptive systems, there're two broad strategies for divvying up the CPU time among tasks: time-slicing, and non-time-slicing. A time-slicing system forces a fair distribution of CPU time among a number of tasks with the same priority. It assigns a "quantum" of CPU time to each tasks, and does a reschedule immediately the current task exhausts its quantum. The suspended task gets a new quantum, but it goes to the end of the queue so it won't run again until every other task at the same priority level has had a chance. A non-time-slicing system only suspends the current task if a higher- priority one becomes computable. If such an event never happens, and the current task never goes into a voluntary wait state (such as waiting for an I/O operation to complete), it will continue running without interference from the scheduler. Time-slicing schemes evolved on timeshared multi-user systems, which need to protect themselves against compute-bound jobs hogging all the CPU and hurting the response time of other users. I consider their use inappropriate in a single-user environment. Consider: a PC is dedicated to serving the needs of one user. Whether it runs a preemptive or non-preemptive OS, all the tasks are still assumed to be *cooperating* in their service of a single user--you're not running a timesharing service on your desktop. Therefore, Eric's comment about preemptive multitasking *necessarily* involving extra overhead, I don't agree with. Provided you design the system specifically as an interactive single-user one, and not as a cut-down version of a multiuser one, the overhead can be kept very low indeed. Lawrence D'Oliveiro fone: +64-71-562-889 Computer Services Dept fax: +64-71-384-066 University of Waikato electric mail: ldo@waikato.ac.nz Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00 To someone with a hammer and a screwdriver, every problem looks like a nail with threads.