LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
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.

Notices

Closed Thread
 
Search this Thread
Old 05-17-2010, 08:51 PM   #1
sanil.rc
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.

Thanks

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
sanil.rc
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
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Duplicate closed
 
  


Closed Thread

Tags
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
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
tty background/foreground color neo77777 Linux - General 10 08-18-2002 03:53 PM


All times are GMT -5. The time now is 02:45 AM.

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