Jump to content
pyth0n3

Unix - Knowledge Base (intrebare)

Recommended Posts

Cand sistemul booteaza se creaza un proces parinte care are PID 0. Este singurul proces care nu se creaza cu fork(). Dupa acest poces care mai este numit si swapper se creaza defapt procesul init care are PID = 1 si este parinte pentru toate celelalte procese care se creaza.

  • Upvote 1
Link to comment
Share on other sites

Salut,

Pid 0 nu exista in Linux (sau nu este vizibil pentru ca nu este creeat prin fork(), cum spune M2G) iar pid 1 este init (ca si la FreeBSD sau Solaris). Pe FreeBSD, unde se respecta multe de la UNIX, exista pid 0 (primul process) care are chiar numele "[kernel]". Pe Linux, pentru o "vizualizare" mai buna, recomand 'pstree -a'

In linux daca dai 'kill -9 1', moare totul.

Edited by aelius
  • Upvote 1
Link to comment
Share on other sites

Pai e corect si ce am zis eu. PID-ul primului proces e intradevar 0 dar numele lui poate sa fie swapper, sched... pentru ca se ocupa cu managementul memoriei. Probabil ca in sisteme diferite are alt nume. Oricum acel proces face parte din kernel si nu din modul utilizator. Dupa ce procesul init ia nastere acel proces swapper devine system idle process. E la fel si in windows.

Exemplu:

11vp0k5.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...