process states ps vs. Andrew Tanenbaum
Posted: Wed Dec 05, 2018 2:22 am
I am studying the minix processes section of Andrew Tanenbaum's OS design and implementation book. There the topic of processes progresses into mutex and semaphores and describes process having state of
- running
- block
- sleep
Now it is academic book and not as complicated as real-life scenario.
But on "man ps" the process has about 9 states. Not sure how some of above three maps into below:
I am assuming:
- running -> R running or runnables
- block -> Not sure on this one???
- sleep -> S interruptable sleep.
PROCESS STATE CODES top
Here are the different values that the s, stat and state output
specifiers (header "STAT" or "S") will display to describe the state
of a process:
D uninterruptible sleep (usually IO)
I Idle kernel thread
R running or runnable (on run queue)
S interruptible sleep (waiting for an event to complete)
T stopped by job control signal
t stopped by debugger during the tracing
W paging (not valid since the 2.6.xx kernel)
X dead (should never be seen)
Z defunct ("zombie") process, terminated but not reaped by
its parent
- running
- block
- sleep
Now it is academic book and not as complicated as real-life scenario.
But on "man ps" the process has about 9 states. Not sure how some of above three maps into below:
I am assuming:
- running -> R running or runnables
- block -> Not sure on this one???
- sleep -> S interruptable sleep.
PROCESS STATE CODES top
Here are the different values that the s, stat and state output
specifiers (header "STAT" or "S") will display to describe the state
of a process:
D uninterruptible sleep (usually IO)
I Idle kernel thread
R running or runnable (on run queue)
S interruptible sleep (waiting for an event to complete)
T stopped by job control signal
t stopped by debugger during the tracing
W paging (not valid since the 2.6.xx kernel)
X dead (should never be seen)
Z defunct ("zombie") process, terminated but not reaped by
its parent