[Barrelfish] [Barrelfish-users] Design question

C K Kashyap ckkashyap at gmail.com
Mon Feb 15 15:53:04 MET 2010


Thanks for the clarification Timothy,

I have some follow on questions -

Q1. Are there any theoretical limitations to the kinds of C targets that
could be generated with FoF like DSL backend?

Q2. If the answer to Q1 is no, then are there situations where the "C" code
would be more readable or verifiable than the logic implemented in DSL?

My earlier email posts were assuming a "no" for Q1. I've done multiple
implementations of x86 based monolithic kernels - my own in asm, my own in
C, port of Linux 0.01 and linux 1.0 to the new gcc (bootable by GRUB). I
eventually figured out some of the inherent weaknesses of monolithic kernels
and started exploring Minix - I've been able to do part of the port of Minix
build system to Linux using gcc and nasm(again boot using grub).

In the beginning, reading the spec of x86 processors, various supporting
chips like timer 8254, PIC - 8259A etc and writing C code for them was a
source of unlimited excitement  for me. Later however, I began to realize
that doing the translation from the spec to C was an utterly mechanical
task! This is one of the lines of thinking that led me to  search for DSL,
Haskell OS as keywords on google that got me Barrelfish.

Another line of thought, I believe more important one, is that some of the
main benefits of microkernels could be combined with the benefits of
monolithic kernel using the DSL approach. One of the key benefits of
microkernes is its modularity, not talking about re-incarnation of servers
capability (I think, relying on being able to restart servers is not a good
idea), I am talking about the independently verifiable components. So, in
theory, we could have a set of N components written in M DSL's (or perhaps
just one DSL) and all of them output a set of N c files that get compiled
and linked into one big executable monolithic kernel.

Anyway, all this was based on my assumption about Q1. I'd appreciate it very
much if you could help me understand it better if the answer to Q1 is yes.

Regards,
Kashyap

On Mon, Feb 15, 2010 at 4:07 PM, Timothy Roscoe <troscoe at inf.ethz.ch> wrote:

> Filet-o-Fish is an embedding of a subset of C into Haskell; it's heavily
> geared towards generating code from DSLs rather than general-purpose C.  As
> said, I suspect some of our DSLs may converge, but we have no plans to
> abandon C as the main language.
>
>  -- Timothy Roscoe
>
> C K Kashyap wrote:
>
>> Hi Timothy,
>> If I understand right FoF is a model for "C" and that one could describe
>> his/her intent in FoF in a concise manner and corresponding "C" could be
>> generated. Could the commonalities under various dirs under arch  have been
>> abstracted into a DSL?
>>
>> Can we not have all the source code in DSL's alone?
>>
>> Regards,
>> Kashyap
>>
>> On Thu, Feb 11, 2010 at 8:02 AM, Timothy Roscoe <troscoe at inf.ethz.ch<mailto:
>> troscoe at inf.ethz.ch>> wrote:
>>
>>
>>    Hi Kashyap,
>>
>>    I'm not sure what you mean - in general you need to have some general
>>    purpose language to glue everything together.  Our use of DSLs is very
>>    pragmatic: we generally use one when we think there's a chance it will
>>    make our like easier.  There is a chance some will converge (both
>>    Mackerel and Hamlet need to specify physical data layout, for
>>    example), but we'll always have C.
>>
>>     -- Timothy Roscoe
>>
>>    At Tue, 9 Feb 2010 15:48:45 +0530, C K Kashyap <ckkashyap at gmail.com
>>    <mailto:ckkashyap at gmail.com>> wrote:
>>     > Hi folks,
>>     >
>>     > I was a little surprised to see s o much of C code in the source
>>    base. Is the
>>     > plan to eventually have code only in DSEL's?
>>     >
>>     > --
>>     > Regards,
>>     > Kashyap
>>
>>
>>
>>
>> --
>> Regards,
>> Kashyap
>>
>


-- 
Regards,
Kashyap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20100215/5c169325/attachment.html


More information about the Barrelfish-users mailing list