[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Can Lua run within the real-time kernel?
- From: Francisco Olarte <folarte@...>
- Date: Wed, 16 Sep 2020 13:41:53 +0200
On Wed, Sep 16, 2020 at 1:21 PM 孙世龙 sunshilong <sunshilong369@gmail.com> wrote:
> >will physical damage or monetary loss occur if you miss a deadline, are
> >your deadlines measured in microseconds?
> Basically, soft real-time is needed.
You can try to trade speed for jitter if code is fast enough. I mean,
I have a system which is somehow realtime, I process messages in lua
in response to VoIP call events. I can take a couple milliseconds, and
normally finish in a hundreds of microseconds. I experimented by
running a collection after each message, the mean handling time was
higher but deviation was lower ( as I had a network of long lived
objects implementing the handlers and a bunch of data generated to
handle the message and expiring after handling ) ( I can try to dig
out the code, but I zapped it many lua versions ago as collection
pauses where very small and I didn't want to maintain the extra code
).
Francisco Olarte.