:PROPERTIES:
:ID: 64370e0d-7608-44dc-a647-28fe2e3ef3a4
:mtime: 20240525073158 20240305024311
:ctime: 20240305024310
:END:
#+title: process lifecycle
#+filetags: :public:project:
* Process States
There are 5 states an [[id:ea9ceb4e-ff99-4939-ad40-90d5dae2d567][operating system process]] can be in:
** New
process is being [[id:b46acdba-9a9d-4ec7-89f7-2ef1170e4457][created]]
** Ready
process is ready to run,
and is waiting for the CPU
** Running
process’ instructions are
being executed on the CPU
** Waiting (Blocked)
process has
stopped executing, and is waiting
for an event to occur
** Terminated (Exit)
process has finished executing
* Lifecycle Diagram
#+BEGIN_SRC dot :file lifecycle.png :cmdline -Kdot -Tpng :exports both
digraph lifecycle {
new -> ready [label="admitted"];
ready -> running [label="scheduler dispatch"];
running -> ready [label="interrupt/preempt"];
running -> waiting [label="IO or event wait"];
running -> terminated [label="exit"];
waiting -> ready [label="IO or event completion"];
}
#+END_SRC
#+RESULTS:
[[file:lifecycle.png]]