Talk:Preemption (computing)

From Wikipedia, the free encyclopedia

Contents

[edit] To do

  • history of pre-emption: invention and first application.

[edit] Scheduler activation

Which instance in a computer system causes the scheduler to get activated once in a while? --Abdull 14:22, 12 July 2007 (UTC)

[edit] Cross link

Please cross link each os with the scheduling algorithims that it uses. I was interested in OpenBSD scheduler, but that page says nothing in this regard. I post here because those interested in scheduling are more likely to know what is the case than those only interested in the specific os. --cant remember my password (41.243.106.81 08:51, 6 August 2007 (UTC))


[edit] Pre-emptive kernels

Windows XP does have a preemptive kernel. --71.202.151.77 (talk) 18:33, 24 November 2007 (UTC)

I removed the inaccurate information regarding Windows XP and 2000. —Preceding unsigned comment added by 70.89.6.163 (talk) 07:06, 9 December 2007 (UTC)

[edit] More Pre-emptive Kernels

Mac OS 9 also has a preemptive kernel, site here under Mac OS 9 Threading: http://developer.apple.com/technotes/tn/tn2028.html Neskiairti (talk) 07:55, 18 December 2007 (UTC)

[edit] What about Windows 98?

Pre-emptive? Cooperative? ---- Theaveng (talk) 14:27, 7 January 2008 (UTC)

[edit] User preemption versus kernel preemption

It looks to me as if we're getting our knickers in a twist here over the definition of preemptive multitasking. I've removed this confusing statement:

Linux kernels prior to Linux 2.6 were also nonpreemptive, but later releases implemented the preemptive model. Several commercial versions of UNIX are preemptive, including Solaris and IRIX. (ref: Operating System Concepts 7th edition (Pg. 195) - Silberschatz, Galvin, Gagne)

Now preemptive multitasking is pretty routine, and almost universal. Most non-toy operating systems can pre-empt a user process. Just about the only popular non-preemptive system I can think of is the old MacOS, which I suppose is conceivably still in use somewhere or other. Windows 386 had preemptive multitasking when running DOS applications on 80386 systems. Windows 3.0 had preemptive multitasking when running in "386 enhanced mode" on 80386 systems (but not on 8086 which had no protected mode operation, and sadly not the famously "brain dead" 80286 which had no way of getting out of protected mode short of resetting the chip). Windows NT, a total rewrite of Windows based on an original concept by Dave Cutler, also had it because it was never conceived as a toy. The broader UNIX family (UNIX, BSD, LINUX) have it for the same reasons.

This seems to have gotten mixed up with kernel-mode preemption, which is a different kettle of fish. When servicing a system call, many system kernels do not permit themselves to be preempted, so while the processor is servicing a system call on such a system the other processors must wait. This can have an impact on real time systems and may make a single-user system appear unresponsive in some critical situations.

This needs to be written up properly, and with more detail. --Tony Sidaway 16:05, 6 February 2008 (UTC)


I don't think you're being accurate when you say Windows 386 (1.0, 2.0, and 3.0?) used preemptive multitasking. They used cooperative multitasking, meaning whichever task currently had the CPU (for example WordPerfect) would maintain control of said CPU until WordPerfect felt like giving it up. If WordPerfect never gave it up, then other programs (like Mosaic) never received any CPU time, which most often led to a "freeze" of the OS. THAT'S the main difference between cooperative v. preemptive multitasking: Can a program misbehave itself and hog all CPU time? In a cooperative system, it can. In a preemptive system, it can not.
BTW: You mentioned protected-mode memory. I don't see the relevance? You can have a protected-memory CPU, and yet still have a Cooperative multitasking OS sitting on top of it. ----- Vice-versa, you can have a NON-protected-mode CPU that does preemptive multitasking. The Commodore Amiga OS ran on a 68000 CPU, and it had no protected memory of any kind, and yet the computer still did preemptive multitasking (i.e. WordPerfect would be forced to stop running, and the CPU control moved to another program like Mosaic). I think you're confusing protected/unprotected memory with preemptive/cooperative multitasking, and the two are not the same. As an OS-designer, you can mix-and-match those conditions in whatever way you want.
P.S. I'm a bit confused by your title. What's "user preemption"? I've never heard of such a thing. As far as I know a user has no control over which program gains control of the CPU? ---- Theaveng (talk) 14:42, 8 February 2008 (UTC)
Windows 386 (a specific release of Windows that preceded Windows 3.0) did have pre-emptive multitasking of DOS processes. You would have multiple DOS sessions (called "DOS boxes") and the kernel would interrupt them on a round robin scheme. Cooperative multitasking applied to Windows programs. You're perfectly correct about Windows applications being able to hog the processor because of the Windows cooperative multitasking model.
I mention protected mode only in the context of the 80286, which was called brain-dead because the only way to get out of protected mode was to reset the processor. I'm quite familiar with AmigaOS's preemptive multitasking and aware that it didn't have any memory protection. The difference is that the Amiga was multitasking processes running code that was compiled to relocatable binary, whereas Windows was running legacy DOS code that had been compiled to absolute code and all assumed they had a whole PC to themselves. The Amiga's loader would take the relocatable binary and produce absolute code in the course of loading. A disadvantage of the Amiga's way of doing things is that applications could corrupt one another quite easily, especially if written with malice in mind. The two great advantages, which it inherited from TRIPOS, were that it could provide pre-emptive multitasking on the most basic chip in the Motorola 16-bit family, and it supported a very fast non-copying message-passing kernel.
I'm sorry I confused you with the term "user preemption". I used this solely to distinguish preemption of processes while in user-mode from preemption of processes while executing in the kernel. By making the kernel itself preemptible the system designer improves system response at the expenses of increasing the complexity of the kernel. --Tony Sidaway 15:11, 11 February 2008 (UTC)
I've rewritten the article in the hope of making the distinct ideas involved clearer. I've also tried to include everything about support for preemptive multitasking by various operating systems in one subsection under the main section. Please feel free to revert and discuss if this looks worse than the former version. --Tony Sidaway 15:01, 12 February 2008 (UTC)

http://support.microsoft.com/kb/117567 (shudder) reading that makes me cringe! - AM —Preceding unsigned comment added by 81.101.44.107 (talk) 15:45, 13 April 2008 (UTC)