LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Why does ps -A show several instances of the same application? (https://www.linuxquestions.org/questions/debian-26/why-does-ps-a-show-several-instances-of-the-same-application-170915/)

davidas 04-16-2004 09:49 AM

Why does ps -A show several instances of the same application?
 
Code:

ps -A
Output:

.
.
.
.
.
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 !

ToniT 04-19-2004 10:52 PM

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.

ToniT 04-19-2004 10:53 PM

ps -fA shows also the parent process of processes.


All times are GMT -5. The time now is 10:46 PM.