[9fans] Glendix? - Plan9

This is a discussion on [9fans] Glendix? - Plan9 ; On Tue, Nov 13, 2007 at 01:30:24PM +0000, John Stalker wrote: > > I picked this idea from the GSoC07 Wiki page: porting the Plan 9 > > userspace to the Linux kernel. > For your own sanity I would ...

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 21 to 35 of 35

Thread: [9fans] Glendix?

  1. Re: [9fans] Glendix?

    On Tue, Nov 13, 2007 at 01:30:24PM +0000, John Stalker wrote:
    > > 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.


    > You should be able to run both
    > native and plan9 binaries, unmodified, side by side if you do things
    > right.


    Isn't there also an "emulator" for Linux binaries on the
    same arch (nearly always x86 if we think in binaries).

    Another thing is, if you could get NetBSD to look like plan9,
    maybe you would get this Glendix on all (or even some) of the
    hw architectures the "world's most portable operating system"
    supports!

    --
    To know what you prefer, instead of humbly saying Amen
    to what the world tells you you ought to prefer,
    is to have kept your soul alive.
    -- Robert Louis Stevenson

  2. Re: [9fans] Glendix?

    > Isn't there also an "emulator" for Linux binaries on the
    > same arch (nearly always x86 if we think in binaries).


    Yes, and also SVR4, HPUX, BSDI, SCO, Solaris, Irix, Ultrix,
    and Amiga Unix binaries. They aren't, strictly speaking,
    emulators, though. The idea is that exec determines the
    type of the binary and then when the process makes a syscall
    the kernel sends it to the appropriate handler for that ABI.
    There is a mechanism for making each ABI see a slightly
    different view of the file system so the binaries see an
    environment more like the one they are expecting.

    See: http://www.netbsd.org/docs/compat.html

    > Another thing is, if you could get NetBSD to look like plan9,
    > maybe you would get this Glendix on all (or even some) of the
    > hw architectures the "world's most portable operating system"
    > supports!


    Yes, it would allow you to run plan9 binaries on a toaster, if
    you port kencc to the TS-7200 architecture.
    --
    John Stalker
    School of Mathematics
    Trinity College Dublin
    tel +353 1 896 1983
    fax +353 1 896 2282

  3. Re: [9fans] Glendix?

    > 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.


    As Forsyth says, this may not be such a great final-year project,
    especially if you have only two months in which to do the work.

    That said again, I don't think any of the three strategies above would
    really make Linux feel like Plan 9. For example, I should be able to
    "9fs sources" and then run the Unix ls or the Gnome file browser
    or whatever on /n/sources and have it work.

    To really make it feel like Plan 9, you'd first want to write a binary
    format driver (in Linux) for Plan 9's a.out binaries. Then you can
    load Plan 9 binaries directly. That much is pretty simple.

    Next, you'd want to implement the Plan 9 system calls as an "alternate
    personality" for the Linux kernel, to be used when running the Plan 9
    binaries. Some of the system calls are fairly easy -- open, read, write,
    close, stat, wstat -- but bind / mount will require:

    - per-process name spaces accessible to normal users
    (CLONE_NEWNS is only available to root, but you can
    probably reuse some or all of the code)

    - letting normal users do 9p mounts anywhere in their
    own name space (can probably use v9fs here)

    Also rfork, notes, etc. will require a little bit of work,
    but they're straightforward.

    Once you've got that, then the icing on the cake would be doing
    things like writing a /net for Linux and then rewriting the socket
    calls to do user space file operations on /net. Then you could
    do things like

    import othermachine /net
    firefox

    Also the missing /proc files and so on.

    Russ


  4. Re: [9fans] Glendix?

    > As Forsyth says, this may not be such a great final-year project,
    > especially if you have only two months in which to do the work.


    he's got 4 months but my suggestion was therefore to go for something
    that `should' take 2 (or 3 at most) on the grounds that the time required
    usually increases. sadly.


  5. Re: [9fans] Glendix?

    On Nov 13, 2007 6:22 PM, John Stalker wrote:
    > Yes, it would allow you to run plan9 binaries on a toaster, if
    > you port kencc to the TS-7200 architecture.


    no need to port anything. plan9 runs on ts7200 native.

  6. Re: [9fans] Glendix?

    > 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


    I love that post, but I don't think s/UNIX/Plan 9/g is valid, we are
    not talking about microkernels here, and see also Inferno.

    uriel

  7. Re: [9fans] Glendix?

    > > 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

    >
    > I love that post, but I don't think s/UNIX/Plan 9/g is valid, we are
    > not talking about microkernels here, and see also Inferno.


    i'm not saying it can't be done. osx is *nix run as an application on
    a bastardized mach kernel. but "microkernel" is an empty nonsequitor.

    what i am saying is that the glue layer is going to be huge. and like
    mach needed to be compromized to run osx well, linux will need to
    be hacked to run plan 9 well.

    and personally, i don't see the appeal. you've been the most vocal
    opponent of layering goo like this.

    - erik

  8. Re: [9fans] Glendix?

    > what i am saying is that the glue layer is going to be huge. and like
    > mach needed to be compromized to run osx well, linux will need to
    > be hacked to run plan 9 well.
    >


    imho that work would be more well applied if directed to porting or
    driver writing or something.
    iru

  9. Re: [9fans] Glendix?

    > 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


    the converse does not always hold.

    - erik

  10. Re: [9fans] Glendix?

    I agree. Trying to do this in 4 months will end up as one of the too
    many unfinished Plan9 related projects.

    Lucho

    On Nov 13, 2007 9:42 AM, Charles Forsyth wrote:
    > > As Forsyth says, this may not be such a great final-year project,
    > > especially if you have only two months in which to do the work.

    >
    > he's got 4 months but my suggestion was therefore to go for something
    > that `should' take 2 (or 3 at most) on the grounds that the time required
    > usually increases. sadly.
    >
    >


  11. Re: [9fans] Glendix?

    > 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.


    The thing about grunge work is it always takes far longer
    than you think it would. Besides, when you enter the real
    world you will have plenty of grunge work to do. Why get a
    head start on it?!

    > > if you aim to finish in about 2 months, you should be done in time in 4, wi

    > th 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 cli

    > ent
    > > for the same service.)


    I will second that. You can use any remaining time for all
    sorts of things -- there is always something more to do.

    Long ago a famous engineer/painter/architect/sculptor said
    "Art is never finished, only abandoned". It is the same with
    final year projects. What matters is the quality of what is
    done. So pick a small canvas and paint a still life!

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


    Call whatever you build glendix. Most s/w projects have silly
    names. Not plan9 of course.

  12. Re: [9fans] Glendix?

    On Nov 13, 2007 5:05 AM, Gorka Guardiola wrote:
    > See THNX by rminnich, an lguest port of plan 9 with drawterm using framebuffers.
    > It is very close to what you want.


    Actually, an early version of P9P for Windows, 9pm, is closer to
    Anant's idea. See .

    --Joel

  13. Re: [9fans] Glendix?

    On Nov 13, 2007 9:29 AM, Anant Narayanan wrote:
    > Or perhaps Plan 9 wants to be single all his (her?) life


    See :

    "Under the Unix's tutelage, the Plan 9 grew to be a beautiful young
    maid herself. She had far fewer suitors than the Unix had once
    enjoyed, since she was competing with the Unix imitators. Even so, a
    small but faithful group of savants admired her, dazzled by the grace
    and civility the Unix had taught her."

    (Thanks, Russ!)
    --Joel

  14. Re: [9fans] Glendix?

    On Nov 13, 2007 9:19 AM, erik quanstrom wrote:
    >
    > > > 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

    > >
    > > I love that post, but I don't think s/UNIX/Plan 9/g is valid, we are
    > > not talking about microkernels here, and see also Inferno.

    >
    > i'm not saying it can't be done. osx is *nix run as an application on
    > a bastardized mach kernel. but "microkernel" is an empty nonsequitor.


    Not quite. The mac os x kernel is XNU which stands for XNU's Not
    Unix. It might have mach inside, but the unix is in there too.

    I used to run Mac OS X on my own custom kernels back in 2001 for "fun".

    Dave

  15. Re: [9fans] Glendix?

    On Nov 13, 2007 9:44 AM, Latchesar Ionkov wrote:
    > I agree. Trying to do this in 4 months will end up as one of the too
    > many unfinished Plan9 related projects.


    yep, We have too many of those.

    We could use help in making THNX a really solid environment, if anyone
    is interested.

    There are a bunch of half-finished projects in Plan 9, and it would
    make sense to go toward finishing them, rather than starting another
    half-finished project.

    Sorry to be discouraging. But part of learning is seeing the
    difference between "works sometimes" and "finished project". The rule
    is true: 80% of the work is in the last 20% of the project. Or worse.

    ron

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2