This shows you the differences between two versions of the page.
|
uso:laboratoare:ac:laborator-04:run [2021/10/28 20:58] liza_elena.babu [Investigarea proceselor] |
uso:laboratoare:ac:laborator-04:run [2021/10/28 20:59] (current) liza_elena.babu [Investigarea proceselor] |
||
|---|---|---|---|
| Line 27: | Line 27: | ||
| Un proces este creat de un alt proces. De exemplu, mai sus, procesul ''%%which%%'' a fost creat dintr-un proces shell (''%%bash%%''). Procesul shell a fost, la rândul său, creat de un alt proces. Un proces are un proces părinte; un proces poate avea mai multe procese copil. Procesele sunt, așadar, parte dintr-o ierarhie. | Un proces este creat de un alt proces. De exemplu, mai sus, procesul ''%%which%%'' a fost creat dintr-un proces shell (''%%bash%%''). Procesul shell a fost, la rândul său, creat de un alt proces. Un proces are un proces părinte; un proces poate avea mai multe procese copil. Procesele sunt, așadar, parte dintr-o ierarhie. | ||
| + | |||
| + | În vârful ierarhiei de procese este procesul numit clasic ''%%init%%''. În listarea de mai sus vedem că procesul din vârful ierarhiei este ''%%systemd%%''. ''%%systemd%%''((https://freedesktop.org/wiki/Software/systemd/ | ||
| + | )) este implementarea de ''%%init%%'' prezentă în cea mai mare parte a distribuțiilor Linux curente((Procesul ''%%init%%'' va exista în permanență în vârful ierarhiei de procese, indiferent de faptul că se va numi ''%%systemd%%'', ''%%init%%'', ''%%upstart%%'' sau altfel. | ||
| + | )). | ||
| ==== Listarea proceselor ==== | ==== Listarea proceselor ==== | ||
| Line 58: | Line 62: | ||
| [...] | [...] | ||
| </code> | </code> | ||
| - | ==== Ierarhia proceselor ==== | ||
| - | |||
| - | Un proces este creat de un alt proces. De exemplu, mai sus, procesul ''%%ps%%'' a fost creat dintr-un proces shell (''%%bash%%''). Procesul shell a fost, la rândul său, creat de un alt proces. Un proces are un proces părinte; un proces poate avea mai multe procese copil. Procesele sunt, așadar, parte dintr-o ierarhie. | ||
| - | |||
| - | Pentru a vizualiza ierarhia de procese, folosim utilitarul ''%%pstree%%'': | ||
| - | |||
| - | <code bash> | ||
| - | student@uso:~$ pstree | ||
| - | systemd-+-ModemManager---2*[{ModemManager}] | ||
| - | |-NetworkManager-+-2*[dhclient] | ||
| - | | `-2*[{NetworkManager}] | ||
| - | [...] | ||
| - | |-acpid | ||
| - | |-avahi-daemon---avahi-daemon | ||
| - | |-boltd---2*[{boltd}] | ||
| - | |-colord---2*[{colord}] | ||
| - | |-cron | ||
| - | [...] | ||
| - | |-systemd-+-(sd-pam) | ||
| - | | |-gnome-terminal--+-bash | ||
| - | | | `-3*[{gnome-terminal-}] | ||
| - | [...] | ||
| - | </code> | ||
| - | În vârful ierarhiei de procese este procesul numit clasic ''%%init%%''. În listarea de mai sus vedem că procesul din vârful ierarhiei este ''%%systemd%%''. ''%%systemd%%''((https://freedesktop.org/wiki/Software/systemd/ | ||
| - | )) este implementarea de ''%%init%%'' prezentă în cea mai mare parte a distribuțiilor Linux curente((Procesul ''%%init%%'' va exista în permanență în vârful ierarhiei de procese, indiferent de faptul că se va numi ''%%systemd%%'', ''%%init%%'', ''%%upstart%%'' sau altfel. | ||
| - | )). | ||
| ==== Atributele proceselor ==== | ==== Atributele proceselor ==== | ||