Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!sun!imagen!atari!portal!cup.portal.com!ts From: ts@cup.portal.com (Tim W Smith) Newsgroups: comp.sys.mac Subject: Re: Apple System 7.0 Message-ID: <19720@cup.portal.com> Date: 21 Jun 89 04:56:05 GMT References: <17183@usc.edu> <4679@okstate.UUCP> <1925@internal.Apple.COM> <18888@cup.portal.com> <576@cbnewsm.ATT.COM> Organization: The Portal System (TM) Lines: 24 >> If you've got kernel sources for Unix, try hacking it to not >> use pre-emptive multitasking. It might be interesting to see >> what happens. > >Admittedly, the last time I looked at the UNIX kernel was in graduate school >some 15 years ago, and it was 6th edition, but UNIX multitasking has been >based on time-slices and not on preemtption in all versions I know about. "A scheduling discipline is nonpreemptive if, once a process has been given the CPU, the CPU cannot be take away from that process. A scheduling discipline is preemptive if the CPU can be taken away." from "An Introduction to Operating Systems", revised first edition, by Harvey M. Deitel, page 252. Unix is preemptive. Time-slices are used to determine *when* to preempt. In other words, time-slices are one way to implement a preemptive scheduler. This is all from the point of view of user mode code, of course. To kernel mode code, Unix is nonpreemptive. Tim Smith