Skip to main content
Library homepage
 
Engineering LibreTexts

0.11: Process Hierarchy

  • Page ID
    81535
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Process Hierarchy

    Whilst the operating system can run many processes at the same time, in fact it only ever directly starts one process called the init (short for initial) process. This isn't a particularly special process except that its PID is always 0 and it will always be running.

    All other processes can be considered children of this initial process. Processes have a family tree just like any other; each process has a parent and can have many siblings, which are processes created[15] by the same parent.

    Certainly children can create more children and so on and so forth.

    Example 5.2. pstree example
      1 init-+-apmd
             |-atd
             |-cron
             ...
      5      |-dhclient
             |-firefox-bin-+-firefox-bin---2*[firefox-bin]
             |             |-java_vm---java_vm---13*[java_vm]
             |             `-swf_play
        


    [15] The term spawn is often used when talking about parent processes creating children; as in "the process spawned a child".


    0.11: Process Hierarchy is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?