[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [rtl] reading a file



 

On Mon, 27 Jul 1998, Ming Lee wrote:

> 
> Hi,
> 
> I've asked that question before, but nobody answered. How can I "signal"
> a process from my rt-handler??? I used kill() but it said "unresolved symbol".
> when I loaded the module into the kernel.
> Any help on how I can do it is greatly appreciated..
> 
> > 
> > How about using a non-RT task that reads your input file and writes it to
> > an rt-fifo?  You can use a rt-handler to signal to your rt-process that
> > there is input.
> > 

Now I'm confused!  By "rt-handler", I meant nothing more than the
rt_create_handler() function.  The 2tasks example shows how this function is
used to create a handler for an rt-process.

If by 'process' you mean a normal Linux process, then I don't know how one
signals a normal process from the RT layer.  I'm not sure this is congruent
with the RT-Linux philosophy (if I understand it correctly).  Signalling a
normal Linux process from the RT-layer would mean you want to be able to
control the scheduling of all processes (RT and non-RT) and since there are
in effect 2 schedulers at work here (the RT one and the normal Linux) this
would be quite something to get both schedulers to work together.

Having said this, I assume what you would still like to have is for the
normal Linux process to run as soon as you have stuffed some useful
information into a fifo.  If your RT-process is asynchronous or has a long
period of inactivity, you could probably get the same effect by suspending
the RT process.  This would allow the Linux kernel to run.  If your normal
process blocks on the fifo read, it would then be scheduled to run as soon
as your RT process blocks.  Of course, when the RT scheduler runs the Linux
kernel, there is no guarantee that the Linux scheduler will run your
process.  But, if there are few or no competing normal processes, then the
chances that your process will run is probably pretty good.

If 'pretty good' is not good enough, then I'd say RT-Linux is not what you
want to use.  Hope this helps.

Ken

--- [rtl] ---
For more information on Real-Time Linux see:
http://www.rtlinux.org/