Linked lists for userspace programs in Linux

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Mon Jun 16 12:01:44 EDT 2014


On Mon, 16 Jun 2014 21:35:20 +0800, Chandrasekaran Sivakumar said:

> Apologies from me. I didn't explain my problem properly. I am working on
> modifying the linux kernel's scheduler framework to include support for
> real-time algorithms. In order to give user inputs such as number of tasks,
> their execution cost, period, deadline etc, I am creating an userspace
> program. Then this program would transfer control to the kernel to perform
> system calls for creation and execution of tasks.

Nope.  Wrong answer.  You can't do real-time that way.

If the userspace code gets hung in a loop or something, your in-kernel
scheduler can get stuck with old/stale information, and as a result incorrectly
schedule the next process, causing a realtime window to be totally blown.

And if all the userspace code is doing is writing config information for
which tasks get what priorities, you should be instead extending the
sched_setscheduler() syscall, or possibly adding a /proc/PID/<something>
interface.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140616/ce988ee0/attachment.bin 


More information about the Kernelnewbies mailing list