[RFC] Ideas for ChibiOS/RT 3.0

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
Dmytro
Posts: 98
Joined: Sun Oct 07, 2012 11:49 am

Re: [RFC] Ideas for ChibiOS/RT 3.0

Postby Dmytro » Thu May 02, 2013 9:17 pm

I propose to generate C++ interfaces automatically. Probably it's possible to reuse doxygen comments.
Also it would be possible to generate interfaces for any scripting language that might run on top of chibios.

User avatar
Giovanni
Site Admin
Posts: 13063
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 757 times
Been thanked: 636 times
Contact:

Re: [RFC] Ideas for ChibiOS/RT 3.0

Postby Giovanni » Thu May 02, 2013 9:33 pm

Interesting but not simple.

Probably it would be possible to create an XML description of a module interface and then compile it in a target language with calls to the module automatically generated.

Giovanni

Dmytro
Posts: 98
Joined: Sun Oct 07, 2012 11:49 am

Re: [RFC] Ideas for ChibiOS/RT 3.0

Postby Dmytro » Thu May 02, 2013 9:44 pm

In this case it's better to use SIDL. There are multiple SIDL compilers available.

Alberto
Posts: 4
Joined: Tue Apr 09, 2013 5:14 pm

Re: [RFC] Ideas for ChibiOS/RT 3.0

Postby Alberto » Fri May 03, 2013 6:06 pm

What about fixed priority real-time support (rate monotonic) with a cpu reservation server like Sporadic server?

User avatar
Giovanni
Site Admin
Posts: 13063
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 757 times
Been thanked: 636 times
Contact:

Re: [RFC] Ideas for ChibiOS/RT 3.0

Postby Giovanni » Fri May 03, 2013 6:24 pm

Nice idea, but probably it would be too complex for a small system, wouldn't it?

Giovanni

Alberto
Posts: 4
Joined: Tue Apr 09, 2013 5:14 pm

Re: [RFC] Ideas for ChibiOS/RT 3.0

Postby Alberto » Fri May 03, 2013 6:37 pm

I don't think so, just take a look at projects like Nano-RK or Erika (there is also Hartik).
In the past I have extended Keil RTX with an EDF scheduler, a Constant Bandwidth Server and SRP protocol, and it works pretty well on a cortex-m.
A fixed priority scheduler is easier to implement, and should be straightforward to implement on ChibiOs.

User avatar
Giovanni
Site Admin
Posts: 13063
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 757 times
Been thanked: 636 times
Contact:

Re: [RFC] Ideas for ChibiOS/RT 3.0

Postby Giovanni » Fri May 03, 2013 6:47 pm

ChibiOS already has a fixed priority scheduler, not sure if you mean something else from how I understand it.

Giovanni

Alberto
Posts: 4
Joined: Tue Apr 09, 2013 5:14 pm

Re: [RFC] Ideas for ChibiOS/RT 3.0

Postby Alberto » Fri May 03, 2013 7:10 pm

I'm talking about hard real-time with a fixed priority scheduler like Rate Monotonic (because its easier to implement on a non real-time fixed priority kernel like ChibiOS than a dynamic priority scheduler like EDF), and soft real-time support through a cpu reservation server like Sporadic server.

User avatar
Giovanni
Site Admin
Posts: 13063
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 757 times
Been thanked: 636 times
Contact:

Re: [RFC] Ideas for ChibiOS/RT 3.0

Postby Giovanni » Fri May 03, 2013 7:18 pm

I think you can already do rate monotonic scheduling with ChibiOS, it is just matter of how you assign priorities to the threads which are already fixed priority and preemptive.

And how ChibiOS would be non-realtime? I am missing something here.

Giovanni

Alberto
Posts: 4
Joined: Tue Apr 09, 2013 5:14 pm

Re: [RFC] Ideas for ChibiOS/RT 3.0

Postby Alberto » Fri May 03, 2013 7:48 pm

Well, as you pointed out, ChibiOS it's actually a deterministic real-time OS, but it's not a soft or hard real-time os, and that is what I mean.
The definition of Real-Time OS it's a bit tricky..
An RTOS that can usually or generally meet a deadline is a soft real-time OS, but if it can meet a deadline deterministically it is a hard real-time OS.
Basically I can assign priorities to the threads based on rate monotonic policy, and easily implement periodic tasks, but now the problem is that is proved that all works with these limitations:

• all tasks are periodic and noninteracting
• deadlines are always at the end of the period
• there are no interrupts
• rate monotonic priorities are assigned
• there is zero context switch overhead
• tasks do not suspend themselves

What is missing to make this system usable is an extensions to the basic rate monotonic theory to support at least:

• nonzero task switching times
• preperiod deadlines
• interrupts and non-rate-monotonic priorities
• task interactions
• aperiodic tasks
• mode change
• basic resource reservation

Assign priorities to the threads is just not enough for a hard/soft real-time OS.
Sorry if I'm not that clear, I'm not an expert :)


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 6 guests