![]() Some critical sections of code protect themselves from concurrency problems by disabling interrupts before entering the critical section and re-enabling interrupts on exiting the section.Most modern UNIXes deal with this problem by making the process wait until the system call has either completed or blocked before allowing the preemption Unfortunately this solution is problematic for real-time systems, as real-time response can no longer be guaranteed. updating critical kernel data structures ) when the preemption occurs. Preemption can also be a problem if the kernel is busy implementing a system call ( e.g.Chapter 6 will examine this issue in greater detail. Note that pre-emptive scheduling can cause problems when two processes share data, because one process may get interrupted in the middle of updating shared data structures.Note that pre-emptive scheduling is only possible on hardware that supports a timer interrupt. Macs used non-preemptive prior to OSX, and pre-emptive since then. Windows used non-preemptive scheduling up to Windows 3.x, and started using pre-emptive scheduling with Win95.Otherwise the system is said to be preemptive. Under these conditions, once a process starts running it keeps running, until it either voluntarily blocks or until it finishes. If scheduling takes place only under conditions 1 and 4, the system is said to be non-preemptive, or cooperative.For conditions 2 and 3 there is a choice - To either continue running the current process, or select a different one. ![]()
0 Comments
Leave a Reply. |