Why does ps -A show several instances of the same application?
Code:
ps -A . . . . . 687 ? 00:00:00 xterm 689 ttyp1 00:00:00 bash 1126 ttyp1 00:00:15 firefox-bin 1136 ttyp1 00:00:00 firefox-bin 1137 ttyp1 00:00:00 firefox-bin 1138 ttyp1 00:00:00 firefox-bin 1633 ttyp0 00:00:00 xmms 1634 ttyp0 00:00:00 xmms 1635 ttyp0 00:00:00 xmms 1636 ttyp0 00:00:00 xmms 1645 ttyp0 00:00:00 ps I'm the only user with only one copy of firefox and one copy of xmms running. Why are there 4 instances of each application when I do a 'ps -A'? Are there 4 copies of each application running? Thanks ! |
Programs happen to fork into multiple related processes that interoperate with eachother. Somewhat similar to threading. xmms for instance probably does mp3 reading and decoding it to the buffer in one process, feeding decoded wave to the soundcard in other and operating with the user through the X interface in the third, and so on.
|
ps -fA shows also the parent process of processes.
|
All times are GMT -5. The time now is 10:46 PM. |