[CCC DEV] Reimplement or reuse?

Matt Jadud matt at jadud.com
Thu Sep 22 13:26:21 BST 2011


Hi all,

(I originally sent this directly to Carl, and then realized I violated
a practice of open software development: transparency. The point of
the list is that everyone can know what is going on.)

We've started to study the CCSP runtime. It is... more opaque than the
TVM, perhaps because a fair bit of work is lifted up into tranx86.
That aside, it looks like the work-stealing scheduler lives in sched.c
in a fairly clean form.

This led us to start wondering: is it a better software engineering
approach to begin with your code, and work on adapting it into the TVM
runtime? Or, is there a simpler formulation of the wait-free
work-stealing algorithm that would be more appropriate for the TVM? As
we look at your code, we realize that there is quite a bit going on:
things are HOT or TEPID, and a lot of basic accounting and linking
work to maintain all of the structures that are opportunities for
error if we start from scratch.

Our goal is a platform-portable implementation of this algorithm.
Zach's motivation is to learn more about C, scheduling, and the work
involved in bringing software to an embedded target... hence, our
formulation of this project. What would you advise in this context?
Port and adapt existing code? Start clean? Find someone else to bother
with our questions? ;)

If anyone else has comments along these lines (and Fred had suggested
something similar off-list, but that was to port CCSP in its entirety,
I think), please feel free to chime in.

Cheers,
Matt



More information about the developers mailing list