next up previous
Next: Process Termination Up: Implementation Previous: Procedure resume

Procedure suspend

Takes as argument the process id of process to be suspended.

Returns an error value if process id is invalid or process is not in the ready or current state. Otherwise returns the priority of the process just before suspend terminates.

Changes state of process to suspended.

If process is in the ready state it is removed from the ready list. (Should it put the process in some other list?)

If process is in the current state, it calls resched (why?).

disables interrupts while accessing process table.


Prasun Dewan
Tue Jan 20 11:58:31 EST 2004