Blocking Process: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
mNo edit summary
Line 20: Line 20:
{A, 2} -> {B, 2} -> {C, 0} -> {E, 2} -> {D, 1}
{A, 2} -> {B, 2} -> {C, 0} -> {E, 2} -> {D, 1}


if the topmost process reaches zero, then it (and any processes immediately following it that are also zero) is placed back into the active scheduling queue. Thus, after 2 more ticks, A is set as active; 2 ticks after that, both B and C are set as active; and so on. This approach has the advantage of minimizing the number of changes required in a given clock tick.
If the topmost process reaches zero, then it -- and any processes immediately following it that are also zero -- are placed back into the active scheduling queue. Thus, after 2 more ticks, A is set as active; 2 ticks after that, both B and C are set as active; and so on. This approach has the advantage of minimizing the number of changes required in a given clock tick.


== Interruptible and Uninterruptible ==
== Interruptible and Uninterruptible ==


It is generally good idea to make a difference between interruptible wait/sleep, and uninterruptible wait/sleep. Depending on your system, you will probably want most wait states interruptible, while you almost definitely will need some uninterruptible states. You might want to consider building interruptible wait on top of uninterruptible wait, instead of using special flags.
It is generally a good idea to differentiate between interruptible wait/sleep and uninterruptible wait/sleep. Depending on your system, you will probably want most wait states interruptible, though you almost definitely will need some uninterruptible states. You might want to consider building interruptible wait on top of uninterruptible wait, instead of using special flags.


[[Category:Processes and Threads]]
[[Category:Processes and Threads]]