next up previous
Next: Process Creation Up: Implementation Previous: Implementation

Tasks Performed

(Error checking, ensuring mutual exclusion while accessing process table, and other functions common to resume and suspend will not be mentioned in the remaining implementation descriptions)

returns stack space.

frees process table entry, making it available for reuse.

remove process from any list it is on,

increments semaphore count if necessary,

reschedules if process killed itself. reschedule needs the ``freed'' process stack for passing arguments to ctxsw. Fortunately, this is not a problem, since interrupts are disabled between the time the stack is freed and ctxsw finishes processing the arguments. As a result, the freed stack will not be overwritten by another process while the arguments are accessed.



Prasun Dewan
Wed Jan 9 17:49:41 EST 2002