Re: Want a 1ms tick from Linux without modifying Linux Kernel



On Dec 6, 7:14 pm, Dennis <den...@xxxxxxxxxxx> wrote:
Like2Learn wrote:
I need to develop an embedded application running on Linux, to be more
specific, Wind River Linux 4.0 is my favorite for now. My application
requires a timer, or scheduler, which is required to tick my
application for about every 1ms. I say "about" because there is no
strict timing requirements, and either 1.01ms or 0.98ms would be
acceptable. In my application, written in C++, I will implement
OBSERVER pattern and Listener paradigm to get a full-featured
scheduler to dispatch events to processes at variable rates, say 5ms,
10ms, etc.

I would like to know if I can accomplish the above design without
modifying the linux kernel, since under GPL, having a kernel module in
my application will cause my application to be GPLed. At this moment I
don't want to go that far yet. If there is something in the kernel
already available, and can tick my application every 1ms, I would like
to use it directly in my application. I hope this way will save me
from the GPL license issue. Any thoughts? Thank you in advance!

If it is close to standard Linux check the timer resolution. If it will
handle 1ms resolution use setitimer() and handle the SIGALRM signal when
it expires. If you just want to wait use nanosleep()

The base time unit is 1usec but actual implementations may be more
coarse than that.- Hide quoted text -

- Show quoted text -

This sounds a good solution since I don't have to poll the timer with
the SIGALRM signal. Thanks!


.



Relevant Pages

  • Re: Want a 1ms tick from Linux without modifying Linux Kernel
    ... Wind River Linux 4.0 is my favorite for now. ... scheduler to dispatch events to processes at variable rates, say 5ms, ... already available, and can tick my application every 1ms, I would like ... I don't want to poll the timer. ...
    (comp.os.linux.misc)
  • Re: Want a 1ms tick from Linux without modifying Linux Kernel
    ... Wind River Linux 4.0 is my favorite for now. ... scheduler to dispatch events to processes at variable rates, say 5ms, ... already available, and can tick my application every 1ms, I would like ... If it is close to standard Linux check the timer resolution. ...
    (comp.arch.embedded)
  • Re: Want a 1ms tick from Linux without modifying Linux Kernel
    ... Wind River Linux 4.0 is my favorite for now. ... requires a timer, or scheduler, which is required to tick my application ... Listener paradigm to get a full-featured scheduler to dispatch events to ... modifying the linux kernel, since under GPL, having a kernel module in ...
    (comp.arch.embedded)
  • Re: Want a 1ms tick from Linux without modifying Linux Kernel
    ... Wind River Linux 4.0 is my favorite for now. ... requires a timer, or scheduler, which is required to tick my ... scheduler to dispatch events to processes at variable rates, say 5ms, ...
    (comp.arch.embedded)
  • Re: Lahman, how ya doing?
    ... That allowed one to define the scheduling in the way Timer::add_task() was invoked rather than embedding the scheduling rules in the implementation of Timer. ... They should not be concerned with sequencing their activities within the overall solution context. ... More important, given your explanation below, is that ChartRecorder should not know about the rules and policies that determine the correct sequencing in the overall flow of control. ... Just have it enforce the simple rules that multiple events on the same tick are issued in the order that they were defined. ...
    (comp.object)