Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ames!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.sys.apple2 Subject: Re: Multitasking on a II Message-ID: <14797@smoke.brl.mil> Date: 9 Jan 91 09:52:24 GMT References: Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 19 In article flee@gnh-applesauce.cts.com (FRANK LEE) writes: >What IS "pre-emptive multitasking," anyway?? It's switching of tasks without regard for what a currently running task is doing -- thus preempting it (for a while). Generally this is done by a task scheduler that is driven by clock interrupts; when an interrupt says that it is time to change tasks, if there are any ready tasks other than the currently executing one, the current task is suspended (its state must be preserved) and a new task is selected for execution until the next scheduler interrupt or until it blocks upon making a system service request that cannot be immediately satisfied, whichever comes first. For more details, consult any good text on operating system design. The obvious alternative is to schedule tasks only at system service request points; since a looping computation would indefinitely delay other tasks, this approach can hang the system if an application has such an error. However, for single-user multitasking environments it normally works quite well.