:PROPERTIES:
:ID: ffd6e138-6cc4-450f-b3da-24edf74d4201
:mtime: 20240305025721
:ctime: 20240305025720
:END:
#+title: process termination
#+filetags: :public:project:
* Process Termination
There are 3 ways for a [[id:ea9ceb4e-ff99-4939-ad40-90d5dae2d567][process]] to die
** Process performs an illegal operation, e.g.,
• Makes an attempt to access memory without authorisation
• Attempts to execute a privileged instruction
** [[id:9903fd7a-39b0-47c9-adeb-7f98cdefa4d5][Parent]] terminates child (abort, kill), e.g. because
• [[id:7405eae1-0686-41c0-a87d-7c402d98e018][Child]] has exceeded allocated resources
• Task assigned to child is no longer required
• Cascading termination – parent is exiting and OS requires children must also exit
** Process executes last statement and asks the OS to delete it (exit)
• Parent waits and obtains status data from child
• If parent didn’t wait, process is a zombie
• If parent terminated without waiting, process is an orphan