LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 08-17-2006, 03:31 PM   #1
CelticBlues
LQ Newbie
 
Registered: Jan 2005
Posts: 29

Rep: Reputation: 15
Information on writing a custom scheduler


I am working on an hard real-time application which will distribute command packets to other apps. I need to be able to scedule the packets based on certain parameters... Where can I find information on writing a scheduler? I googled the topic but it seems that everything that came up was describing in theory how the linux scheduler works.

Thanks,
CB
 
Old 08-17-2006, 04:34 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
There are many different kinds of schedulers. In your case, you probably need a kind of load-balancing algorithm. It's important which factors are important: load, number of messages, time to beeing processed and so on.
 
Old 08-19-2006, 02:08 PM   #3
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Quote:
Originally Posted by CelticBlues
I am working on an hard real-time application which will distribute command packets to other apps. I need to be able to scedule the packets based on certain parameters... Where can I find information on writing a scheduler? I googled the topic but it seems that everything that came up was describing in theory how the linux scheduler works.

Thanks,
CB
Aside from searching the net for information on work scheduling which should be very productive, mathematically this is a fundamental queueing theory problem. Arrival times of work can be viewed as statistical events and processed accordingly.
 
Old 08-21-2006, 01:50 PM   #4
bastl
Member
 
Registered: Sep 2003
Location: Germany/BW
Distribution: My own
Posts: 237

Rep: Reputation: 22
I think you have to explain "command packets" in detail. Are they big, are they of CPU instructions, can be set a pointer to them ...?
In most cases you can transmit a pointer in a signal to an other thread. And KDEs DCOP is more faster if you have front end support.
If that packets are big ( > 8 byte) than I think an interface to the receivers is the right chose ( a file including this formated data packages - database ). the receivers are then terminal based programs f.e. decoding this file if updated.
If you want to write a scheduler then look how to write a kernel module or rewrite your linux source code of your favorite scheduler.
But be careful, the scheduler keeps the main application loop, so you can say linux is the scheduler. The kernel docs should include enough information.
Or have a look to http://www.kernel.org/
Linux is a multithread system maybe you're fixed to a wrong system ? But there are different mechanisms to synchronize threads under Linux if you search for that.
If you want to have some processes (functions) working more slowly in different cases - there are kernel interrupts to give up to the scheduler before end or you can decrease the process priority.
Good luck !!! you'll need it.
 
  


Reply



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
Custom kernel image on custom slack build using CUSS nykey Slackware 2 07-15-2006 03:05 AM
Hiding machine information and root information geletine Linux - Security 6 07-14-2006 07:57 AM
custom install cd base-config custom mithereal Debian 6 09-11-2005 03:48 PM
custom geforce video card--custom module? bandofmercy Linux - Hardware 3 10-14-2004 06:52 PM
scheduler... os2 Programming 0 07-24-2004 12:38 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:34 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration