shared memory - Minix

This is a discussion on shared memory - Minix ; Hello there, Is there a way to share memory between applications under minix ? I heard there's been changes in the memory management in minix 3... What I'd need is something like the POSIX functions shmat/shmdet/etc. Are they implemented ? ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: shared memory

  1. shared memory

    Hello there,

    Is there a way to share memory between applications under minix ? I
    heard there's been changes in the memory management in minix 3...
    What I'd need is something like the POSIX functions shmat/shmdet/etc.
    Are they implemented ?
    I found an old message on this newsgroup stating that minix has some
    kind of memory sharing using local tables. If this is the solution,
    does anyone can tell me more about it ?

    Thanks in advance,

    Cedric


  2. Re: shared memory

    All,

    > Is there a way to share memory between applications under minix ? I
    > heard there's been changes in the memory management in minix 3...
    > What I'd need is something like the POSIX functions shmat/shmdet/etc.
    > Are they implemented ?


    Fraid not, as there is no VM implementation yet. You could share memory
    using segments, but application programs can't do this and you can't
    address them from C directly, so it's more trouble than it's worth.

    In all cases that the system needs to "share" data (e.g. an FS needs
    data form drivers), it's copied using a kernel call. Again, application
    programs don't get to do this, however.

    =Ben



  3. Re: shared memory


    > Fraid not, as there is no VM implementation yet. You could share memory
    > using segments, but application programs can't do this and you can't
    > address them from C directly, so it's more trouble than it's worth.


    Damn.
    I wanted to extend minix with a new server to test some new OS
    technique I have in mind. But this relies heavily on shared memory
    between applications, which sounds unfeasible !

    Being an OS hobbyist I'm not afraid of doing dirty things like
    creating a segment in the GDT/LDT. But if application programs can't
    do this, this won't help me !

    I heard that minix-vmd had a VM implementation. Maybe I'd be better
    starting from minix-vmd rather than "standard" minix ?
    (btw I thought minix3 included all of minix-vmd's wonders ?!?)

    >
    > In all cases that the system needs to "share" data (e.g. an FS needs
    > data form drivers), it's copied using a kernel call. Again, application
    > programs don't get to do this, however.


    Again, that still won't help me.
    Anyway, thank you Ben for helping )

    Cedric


  4. Re: shared memory

    In article <1173278698.771562.59290@n33g2000cwc.googlegroups.c om>,
    wrote:
    >I heard that minix-vmd had a VM implementation. Maybe I'd be better
    >starting from minix-vmd rather than "standard" minix ?


    Unfortunately, Minix-vmd also lacks shared memory.

    >(btw I thought minix3 included all of minix-vmd's wonders ?!?)


    No, Minix 3 is based on Minix 2. (Otherwise, Minix 3 would have VM :-)


    --
    That was it. Done. The faulty Monk was turned out into the desert where it
    could believe what it liked, including the idea that it had been hard done
    by. It was allowed to keep its horse, since horses were so cheap to make.
    -- Douglas Adams in Dirk Gently's Holistic Detective Agency

  5. Re: shared memory

    Ben Gras wrote:
    [...]
    > Fraid not, as there is no VM implementation yet. You could share memory
    > using segments, but application programs can't do this and you can't
    > address them from C directly, so it's more trouble than it's worth.


    It should be quite simple to put together a CSP threading model for Minix ---
    threads communicate via message passing rather than shared memory, so they can
    live in separate address spaces. (CSP can produce more robust applications,
    too.) Has anyone thought about doing this?

    ....although without the ability to modify the size of each process' heap, the
    utility on desktop systems is still rather limited.

    --
    ┌── dg*cowlark.com ─── http://www.cowlark.com ──────────────── ──
    │ "Wizards get cranky, / Dark days dawn, / Riders smell manky, / The road
    │ goes on. / Omens are lowering, / Elves go West; / The Shire needs
    │ scouring, / You may as well quest." - John M. Ford

+ Reply to Thread