Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.


Closed Thread
  Search this Thread
Old 05-17-2010, 08:51 PM   #1
LQ Newbie
Registered: May 2010
Posts: 6

Rep: Reputation: 0
Question 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.


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

Last edited by sanil.rc; 05-17-2010 at 08:59 PM. Reason: Posted question on wrong thread
Old 05-17-2010, 09:26 PM   #2
LQ Newbie
Registered: May 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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.
Old 05-18-2010, 12:38 AM   #3
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Duplicate closed

Closed Thread

background, cpu, diff, foreground, process

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
tty background/foreground color neo77777 Linux - General 11 11-25-2014 08:59 AM
how to move background process to foreground batola Linux - Server 29 03-10-2010 10:28 AM
background process popping up in foreground noir911 Linux - General 1 12-14-2007 11:53 PM
Foreground and Background program switching isolvesystems Linux - Newbie 2 10-03-2007 09:30 AM
Background and Foreground Datamike Linux - Software 2 01-20-2006 04:20 PM > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 06:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration