Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-29-2010, 09:18 AM   #1
LQ Newbie
Registered: Nov 2010
Location: Spain
Distribution: Ubuntu, Buildroot...
Posts: 3

Rep: Reputation: 0
How can I put a process to sleep, and Wake it when something is written to its FIFO?

Hello everyone:

First post asking for help here. I will try to be as descriptive as I can.

I am working on a system with many processes that communicate to each other through FIFOs transferring data. Among them, there is a DBManager process that gets all the input coming from the other processes.

I need to make the system more responsive, by working on that DBManager.

This DBManager process is getting all the input information by regularly polling the FIFOs. The problem, is that I cannot just reduce the polling time to increase the responsiveness since it's running on an embedded system, and I would be wasting too much CPU time.

Is there a way that I could put that process to sleep, and somehow awake it when something is put on the FIFO without having to switch to a RTLinux kernel? I have been trying to find information about that all over the internet, and on these forums, but I can't seem to be able to find a mechanism that would help me in that.

Thanks in advance for all of your help.


Old 11-29-2010, 10:19 AM   #2
Registered: Sep 2007
Location: Mariposa
Distribution: FreeBSD,Debian wheezy
Posts: 811

Rep: Reputation: 178Reputation: 178
In the name of the Flying Spaghetti Monster,

Have you tried select()?
man 2 select
Old 11-30-2010, 02:38 AM   #3
LQ Newbie
Registered: Nov 2010
Location: Spain
Distribution: Ubuntu, Buildroot...
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks a million! It seems it can work! I will try to implement that, and I'll post back if it fits my needs.


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
Howto put linux in sleep mode at 1 am and wake up at 6 am automatically Geert86 Linux - General 15 01-08-2010 09:32 PM
System goes into sleep mode, can't wake it up. Have to reboot. BHT Linux - Newbie 2 12-16-2008 07:16 AM
Display goes to sleep on boot - won't wake up without X! Clean3d Ubuntu 1 01-27-2008 09:39 PM
how to wake up from S3 acpi sleep state? bluesmanu Linux - Laptop and Netbook 4 01-15-2006 04:22 PM
Screen does not wake up after going to sleep at promp PSIPHON Linux - General 1 08-09-2005 09:30 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:02 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