[9fans] Glendix? - Plan9

This is a discussion on [9fans] Glendix? - Plan9 ; Hi All, I picked this idea from the GSoC07 Wiki page: porting the Plan 9 userspace to the Linux kernel. I am aware that Plan9Port is something very close to the goal, but I think we can eliminate all of ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 35

Thread: [9fans] Glendix?

  1. [9fans] Glendix?

    Hi All,

    I picked this idea from the GSoC07 Wiki page: porting the Plan 9
    userspace to the Linux kernel.

    I am aware that Plan9Port is something very close to the goal, but I
    think we can eliminate all of the GNU and X dependencies and have a pure
    Linux/Plan9 setup. Why Linux? Simply because it supports a wide-range of
    hardware, is one of the most documented free kernels out there, and
    already has the support of many developers.

    I think there are 3 ways in which we can do this:

    1) Modify the Linux kernel to present a 9P interface to itself (too
    hard, almost like re-writing several important parts of the kernel)
    2) Modify the Plan 9 userspace to work with POSIX (Yuck, and Plan9Port
    already does this)
    3) Create a custom INIT process which will be responsible for providing
    all the "plan 9 kernelish" features that userspace programs expect (for
    eg. providing the /net directory), so that all of them can run unmodified.

    I am of the opinion that (3) is the best way to go about it. With the
    KenCC port to Linux (a result of Kris' work for this year's summer of
    code), we can generate ELF executables. Recompiling all of Plan 9's
    userspace should then do the trick, if we get the INIT process right.

    Am I on the right track?

    --
    Anant

    P.S. I will be doing this project as a final-year undergraduate thesis
    at my university, which means I will have time and resources to attempt
    this - about 4 months of it

  2. Re: [9fans] Glendix?

    On Nov 13, 2007 10:28 AM, Anant Narayanan wrote:
    > Am I on the right track?
    >


    See THNX by rminnich, an lguest port of plan 9 with drawterm using framebuffers.
    It is very close to what you want.
    --
    - curiosity sKilled the cat

  3. Re: [9fans] Glendix?

    > Am I on the right track?

    especially if it's a final-year project, i'd pick something
    that's more than a demonstration of endurance.


  4. Re: [9fans] Glendix?

    Actually, I suspect THNX is completely different from what he wants.
    As far as I know THNX doesn't run any plan9 userspace on linux.

    What might be more useful is to use Inferno to provide things like
    /net and /draw as an start (mounted over v9fs) (and perhaps later on
    replace
    them with custom userspace servers.

    uriel

    On Nov 13, 2007 11:05 AM, Gorka Guardiola wrote:
    > On Nov 13, 2007 10:28 AM, Anant Narayanan wrote:
    > > Am I on the right track?
    > >

    >
    > See THNX by rminnich, an lguest port of plan 9 with drawterm using framebuffers.
    > It is very close to what you want.
    > --
    > - curiosity sKilled the cat
    >


  5. Re: [9fans] Glendix?

    On Nov 13, 2007 11:14 AM, Uriel wrote:
    > Actually, I suspect THNX is completely different from what he wants.
    > As far as I know THNX doesn't run any plan9 userspace on linux.
    >


    No, it runs proper Plan 9 using linux as drivers. Which is *exactly*
    what he asked for.

    > What might be more useful is to use Inferno to provide things like


    Why would that be?.

    > /net and /draw as an start (mounted over v9fs) (and perhaps later on
    > replace
    > them with custom userspace servers.
    >
    > uriel
    >


    You still have X under at least, unless there is a frambuffer version
    of inferno I am not aware of. Anyway, inferno is not Plan 9 even
    if it looks very similar if you squint.

    X means loads of other stuff it depends on which have already been trimmed out
    of THNX.

    --
    - curiosity sKilled the cat

  6. Re: [9fans] Glendix?

    > I am aware that Plan9Port is something very close to the goal, but I
    > think we can eliminate all of the GNU and X dependencies and have a pure
    > Linux/Plan9 setup. Why Linux? Simply because it supports a wide-range of
    > hardware, is one of the most documented free kernels out there, and
    > already has the support of many developers.


    you could do this, but i think it would end up being quite unsatisfactory,
    as you'd surely end up wanting to use aspects of linux other than its drivers.

    so you might get more hardware support, but you'd lose all the userspace
    code, so would it really end up that much more capable?

  7. Re: [9fans] Glendix?

    Hi,

    > so you might get more hardware support, but you'd lose all the userspace
    > code, so would it really end up that much more capable?


    I don't understand what "lose all the userspace code" means. The
    objective of the exercise is to enable Plan 9's userspace to work
    unmodified on Linux.

    It boils down to Linux's drivers/schedulers/et.al. but Plan 9's
    programming environment. You'd still use /net to do network programming,
    use libdraw and not X, so to the programmer the fact that the
    distribution is running the Linux kernel is not known.

    Performance-wise, I see how it would be a bad idea; since read/write to
    /net will ultimately result in a socket-like call, so there would be a
    overhead.

    --
    Anant

  8. Re: [9fans] Glendix?

    On Nov 13, 2007 11:47 AM, Anant Narayanan wrote:
    > Hi,
    >
    > > so you might get more hardware support, but you'd lose all the userspace
    > > code, so would it really end up that much more capable?

    >
    > I don't understand what "lose all the userspace code" means. The
    > objective of the exercise is to enable Plan 9's userspace to work
    > unmodified on Linux.


    I still think being able to run lunix programs in the same environment
    would be quite useful (and not too hard, you could use namespaces
    to build a more 'lunix friendly' environment inside glendix).
    Otherwise it would not be too different from running native plan9
    inside a VM as Gorka pointed out. (And that is is IMHO what makes THNX
    not particularly useful, that it adds very little over just running
    Plan 9 on qemu, or vmware, or whatever.

    > It boils down to Linux's drivers/schedulers/et.al. but Plan 9's
    > programming environment. You'd still use /net to do network programming,
    > use libdraw and not X, so to the programmer the fact that the
    > distribution is running the Linux kernel is not known.
    >
    > Performance-wise, I see how it would be a bad idea; since read/write to
    > /net will ultimately result in a socket-like call, so there would be a
    > overhead.


    If that is an issue you could eventually swap inferno for an in-kernel
    /net server (using the new 9p server bits of v9fs).

    The beauty of the approach is that it works nicely in steps, and if
    you want to do that change later on you wont need to change anything
    else.

    uriel

  9. Re: [9fans] Glendix?

    > Hi,
    >
    > > so you might get more hardware support, but you'd lose all the userspace
    > > code, so would it really end up that much more capable?

    >
    > I don't understand what "lose all the userspace code" means. The
    > objective of the exercise is to enable Plan 9's userspace to work
    > unmodified on Linux.
    >
    > It boils down to Linux's drivers/schedulers/et.al. but Plan 9's
    > programming environment. You'd still use /net to do network programming,
    > use libdraw and not X, so to the programmer the fact that the
    > distribution is running the Linux kernel is not known.
    >
    > Performance-wise, I see how it would be a bad idea; since read/write to
    > /net will ultimately result in a socket-like call, so there would be a
    > overhead.
    >
    > --
    > Anant


    what an unholy marrage!

    what happens when you're tracking a bug? do you give up when
    it enters linux? how do you configure hardware if you're not
    going to use the linux machinery?

    why are linux schedulers interesting?

    i think that rather than the best of both worlds, you'd end up
    with the worst of both. all the joys of linux administration and
    yet no (insert favorite browser here).

    - erik

  10. Re: [9fans] Glendix?

    > I picked this idea from the GSoC07 Wiki page: porting the Plan 9
    > userspace to the Linux kernel.


    For your own sanity I would suggest that you consider a NetBSD base
    rather than a Linux base. You get most of the portability and you
    get a much better thought out binary emulation layer. It's also
    a lot less ugly, which will matter a lot as you need to read and
    modify a fair amount of code. You should be able to run both
    native and plan9 binaries, unmodified, side by side if you do things
    right. You should even be able to run NetBSD apps in X on one virtual
    terminal and plan9 apps, of which there are sadly very few, in rio
    on another virtual terminal.

    --
    John Stalker
    School of Mathematics
    Trinity College Dublin
    tel +353 1 896 1983
    fax +353 1 896 2282

  11. Re: [9fans] Glendix?

    > what an unholy marrage!

    I'm not sure marriage is ever holy...

    > what happens when you're tracking a bug? do you give up when
    > it enters linux? how do you configure hardware if you're not
    > going to use the linux machinery?
    >
    > why are linux schedulers interesting?
    >
    > i think that rather than the best of both worlds, you'd end up
    > with the worst of both. all the joys of linux administration and
    > yet no (insert favorite browser here).


    Well, the goal is to try to get the best of both worlds: plan9 user
    space environment and administration while taking advantage of linux
    dirvers and allowing lunix programs to run inside a sandbox
    (namespace).

    Admittedly how one deals with udev and other such linux userspace
    monsters might be tricky, but I think that is the whole point, to
    replace such things with saner Plan 9-based solutions.

    Think of it as an exercises on how a linux distribution would look
    like if they had learned something from Plan 9.

    And while there are similarities with THNX, I think it is also quite
    different, as far as understand it, the only way to run linux apps on
    thnx is via VNC, which seems far from ideal (and you are still having
    a lunix environment outside the plan9 environment).

    In any case, I'm not sure I see the point of all this arguments before
    not a single line of code has been written (and much less released),
    the more people we have bringing plan9 technologies to the world the
    better.

    uriel

  12. Re: [9fans] Glendix?

    > allowing lunix programs to run inside a sandbox (namespace).

    how do you do that?

  13. Re: [9fans] Glendix?

    > In any case, I'm not sure I see the point of all this arguments before
    > not a single line of code has been written (and much less released),
    > the more people we have bringing plan9 technologies to the world the
    > better.


    well, perhaps. in this case, however, he's looking for a student project,
    and one that's essentially a load of grunge work isn't a good choice.

    > I picked this idea from the GSoC07 Wiki page: porting the Plan 9
    > userspace to the Linux kernel.


    it might or might not have been a good gsoc project, but i don't think
    it's the best choice for a final year project, even if you're in Engineering not CS.
    (the aims are often quite different for gsoc projects than for a final-year project.)

    if you're looking for something plan9-related, i'd pick an application area
    of interest to you that looks as though it could benefit from applying plan 9's
    techniques, mechanisms, etc., and apply them in an implementation.
    if you aim to finish in about 2 months, you should be done in time in 4, with write-up.
    a modular project is always good, so if you've actually got spare time
    at the end, you can add another component. (for instance, if the project
    is split into 9p server and 9p clients, you can add a different type of client
    for the same service.)

    the aim is to show plan 9 doing something simpler,
    more flexibly, faster/easier (in development time or effort) than some existing
    implementation, just because of name spaces and concurrent programming (say).
    on the other hand you're not doing original research, so implementing or
    reimplementing an existing idea should be fine — it's an exercise.
    usually it's very helpful if non-specialists can assess the result.

    it's just my experience dealing with undergraduate projects in the past.


  14. Re: [9fans] Glendix?

    On Nov 13, 2007 10:47 PM, roger peppe wrote:
    > > allowing lunix programs to run inside a sandbox (namespace).

    >
    > how do you do that?


    Linux has private namespaces (see CLONE_NEWNS in clone(2)), they're
    just not used by standard linux tools afaik.
    -sqweek

  15. Re: [9fans] Glendix?

    > Admittedly how one deals with udev and other such linux userspace
    > monsters might be tricky, but I think that is the whole point, to
    > replace such things with saner Plan 9-based solutions.


    i see two problems with this.

    1. linux interfaces change all the time, requiring constant linux tinkering.
    2. covering up the linux interface will always be imperfect. you won't
    be able to ignore it's existance and i think you underestimate the amount
    of glue code required. p9p succeedes because it refuses to do this.

    i am reminded by a line from the labs' response to ast's usenix posting
    - UNIX can be successfully run as an application program
    `Run' perhaps, `successfully' no. Name a product that succeeds
    by running UNIX as an application.

    s/UNIX/Plan 9/g

    - erik

    reference: http://groups.google.com/group/comp....8d4a31d5c1aac7

  16. Re: [9fans] Glendix?

    >
    > You still have X under at least, unless there is a frambuffer version
    > of inferno I am not aware of. Anyway, inferno is not Plan 9 even
    > if it looks very similar if you squint.


    There is or at least was a framebuffer linux version of inferno to my
    recollection.>

  17. Re: [9fans] Glendix?

    On Tue, 13 Nov 2007 07:25:39 -0700, David Leimbach
    wrote:

    >
    > There is or at least was a framebuffer linux version of inferno to my
    > recollection.>


    There is one :-). Now the implementation of the linux framebuffer support
    can be found in the archive of inferno mailing list, but I going to make a
    project inferno-fb on code.google.com and upload the sources.


    --
    Best regards,
    santucco

  18. Re: [9fans] Glendix?

    Hi,

    > what happens when you're tracking a bug? do you give up when
    > it enters linux? how do you configure hardware if you're not
    > going to use the linux machinery?


    >From a very theoretical perspective, using a different userspace with

    the Linux kernel shouldn't be all that difficult. I'm not sure how much
    tied a traditional Linux userspace is to the kernel, so I don't the
    answers to your questions.

    > why are linux schedulers interesting?


    Well, to be honest, I haven't looked at the Plan 9 schedulers; so
    amongst the ones that we have seen so far, Linux has the most
    interesting set of schedulers (purely from a classroom perspective).

    > i think that rather than the best of both worlds, you'd end up
    > with the worst of both. all the joys of linux administration and
    > yet no (insert favorite browser here).


    So, the best of both worlds would mean the Plan 9 kernel and the GNU
    userspace? Or perhaps Plan 9 wants to be single all his (her?) life

    --
    Anant


  19. Re: [9fans] Glendix?

    > Admittedly how one deals with udev and other such linux userspace
    > monsters might be tricky, but I think that is the whole point, to
    > replace such things with saner Plan 9-based solutions.


    Off the top of my head, I don't think coming with a file-system approach
    to dynamic devices would be that hard; say for example a notification
    that a USB drive has just been plugged in and automounting it...

    Can this already be done in Plan 9?

    --
    Anant


  20. Re: [9fans] Glendix?

    > well, perhaps. in this case, however, he's looking for a student project,
    > and one that's essentially a load of grunge work isn't a good choice.


    I don't think grunge work is bad if the result is usable. Hence, what I
    am trying to evaluate via the discussion is whether the result is
    something that can actually be used by developers.

    > it might or might not have been a good gsoc project, but i don't think
    > it's the best choice for a final year project, even if you're in Engineering not CS.
    > (the aims are often quite different for gsoc projects than for a final-year project.)


    Incidentally, I am pursuing Computer Engineering - but syllabi can be
    easily mistaken for a CS course, there's no difference.

    > if you're looking for something plan9-related, i'd pick an application area
    > of interest to you that looks as though it could benefit from applying plan 9's
    > techniques, mechanisms, etc., and apply them in an implementation.
    > if you aim to finish in about 2 months, you should be done in time in 4, with write-up.
    > a modular project is always good, so if you've actually got spare time
    > at the end, you can add another component. (for instance, if the project
    > is split into 9p server and 9p clients, you can add a different type of client
    > for the same service.)


    Thanks, I'll look some more and see if I can find more ideas.
    (Trouble is, I already registered glendix.org )

    --
    Anant

+ Reply to Thread
Page 1 of 2 1 2 LastLast