Another GSOC application

André Keller Abadie akabadie at gmail.com
Thu Mar 27 00:50:22 UTC 2008


Hi Joel

> Although I think i-Logix Rhapsody and Rose Rational support would
> be great for RTEMS, they are for commercial products and I do not
> think that would be in the spirit of the SOC.

I see your point, it does make sense!

> It is a good project and having the option to configure a pool of 1 or
> more server
> threads is a good idea. It could be application configurable.
>
> For that matter, you might be able to extract the notion of a thread
> pool into something
> the user could provide plugins to for the specifics of the message
> processor function.
> Does that make sense?
>
> Threads asynchronously queue requests, check on them, server pulls
> requests out
> and processes them. The queuing, checking, and server pool
> infrastructure is
> basically independent of what the actual job is. In C++, this would be
> a good place
> for a class with an abstract function to override. But in C, we have to
> resort to
> indirect function calls and providing sizeof structures.

You mean the user will provide callback functions? From wikipedia:
"A potential problem is that stack depth can grow unmanageably, as an
extremely common thing to do when one I/O is finished is to schedule
another. If this should be satisfied immediately, the first callback is not
'unwound' off the stack before the next one is invoked. Systems to prevent
this (like 'mid-ground' scheduling of new work) add complexity and
reduce performance. The separation of textual (code) and time (event) flows
provides fertile ground for errors."

Callback functions are widely (and reasonably) used in event-driven
programming, nevertheless it is far more usual to see people using
select/poll/aio_error loops.

Either way, it might be interesting to work on both ideas and deliver both
features.

The server threads should be started on system init, right?
I'll make it user configurable through CONFIGURE_AIO_SERVER_THREADS
(default=0)

To implement the callback feature, the aiocb structure will include a few
more items (including a sizeof field). Any suggestions on how I can dispatch
the callback functions? Or they'll be called within the server thread?

Now I'll start writing my proposal, i'd be glad if some of you could help me
review it afterwards.

Thanks in advance,

André
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20080326/a9ef3358/attachment-0001.html>


More information about the users mailing list