[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Can Lua run within the real-time kernel?
- From: 孙世龙 sunshilong <sunshilong369@...>
- Date: Wed, 16 Sep 2020 21:29:27 +0800
Hi, Tim McCracken
>>Can Lua run within the real-time kernel?
>>Does anybody do such a test?
>>Is it possible to run Lua scripts on the controller for real-time control?
>Do you truly want to run it "within" the kernel, or use it for a wrapper around the kernel?
Sorry for misleading you.
I doubt whether Lua could run on the real-time kernel or not. Did you
achieve it?
Should I run on a real-time OS if I intend to run Lua scripts on the
controller for real-time control?
Best regards
Sunshilong
On Wed, Sep 16, 2020 at 9:08 PM Tim McCracken <Tim.McCracken@utelety.com> wrote:
>
>
> Can Lua run within the real-time kernel?
> Does anybody do such a test?
>
> Is it possible to run Lua scripts on the controller for real-time control?
>
> Do you truly want to run it "within" the kernel, or use it for a wrapper around the kernel?
>
> The real time kernels I have worked with are pretty complete and rarely need anything added within the kernel for real time control itself. As someone else pointed out garbage collection will make the kernel non-deterministic. However, you can leave the "hard" real time tasks coded in 'C' while providing a Lua thin wrapper around the kernel API (and other APIs such as network) and thereby support "soft" real time tasks that are written in Lua. A pretty good hybrid solution that I experimented with sometime ago. There are a number of commercial products that use this solution to provide end user programmability on a closed source product.
>
> ________________________________
> From: 孙世龙 sunshilong <sunshilong369@gmail.com>
> Sent: Tuesday, September 15, 2020 8:39 PM
> To: Lua mailing list <lua-l@lists.lua.org>
> Subject: Can Lua run within the real-time kernel?
>
> Hi,
>
> Can Lua run within the real-time kernel?
> Does anybody do such a test?
>
> Is it possible to run Lua scripts on the controller for real-time control?
>
> Best regards
> Sunshilong