LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   My process in background hogs 96% CPU but when ran in foreground its almost zero. (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/my-process-in-background-hogs-96-cpu-but-when-ran-in-foreground-its-almost-zero-808472/)

sanil.rc 05-17-2010 08:51 PM

My process in background hogs 96% CPU but when ran in foreground its almost zero.
 
Hi, I am new to this Forum.
I am trying to solve one problem: When i run my process in background it hogs around 96% of CPU.
But when ran in foreground, CPU utilization is almost zero.
Is there any difference b/n a background and a foreground process wrto CPU utilization?

Any help in this regard will be appreciated.

Thanks

I think the post is in the wrong thread..sorry..

sanil.rc 05-17-2010 09:26 PM

The process has 4 threads, 2 of them are TCP server threads waiting for two different client to connect. 3rd one is waiting on shell for user input, it is in while(1){ fgets() }. 4th thread is waiting on a queue to receive some messages.

pixellany 05-18-2010 12:38 AM

Duplicate closed


All times are GMT -5. The time now is 08:03 AM.