perl variables allocated in shared memory - feasible/possible/done already?

Discussion in 'Perl Misc' started by Chris, Feb 3, 2007.

  1. Chris

    Chris Guest

    Hi All,

    I'd like to run several processes on a single machine, and have the
    first one create a perl variable which gets stored in shared memory,
    then the rest to be able to read and write to this same shared
    variable.

    I have not seen any modules that do this - which I put down to the
    likelihood that this is probably an "internals" kind of problem,
    possibly needing me to mess with perl source?

    Does anyone reading this have knowledge or experience with the
    mechanism perl uses to allocate storage for variables, and if so - do
    you know if it would be feasible to implement, and if so, whether it
    would need me to edit the perl source, or if it might be doable via xs
    or some other "conventional" way?

    Extreme performance is my goal, so solutions requiring anything slow
    will not be appropriate.

    Selected scalars, lists, and hashes will all need to be stored.

    I code in Linux, but can also do Windows or Mac if needs be, and yes -
    I know the shared memory facilities between these are immensely
    different :-(

    I'm greatful for any/all hints/tips! If for some reason you can't reply to
    the group, reply to pobox.com with christopher@ on the front.
     
    Chris, Feb 3, 2007
    #1
    1. Advertising

  2. Chris

    Guest

    "Chris" <> wrote:
    > Hi All,
    >
    > I'd like to run several processes on a single machine, and have the
    > first one create a perl variable which gets stored in shared memory,
    > then the rest to be able to read and write to this same shared
    > variable.
    >
    > I have not seen any modules that do this - which I put down to the
    > likelihood that this is probably an "internals" kind of problem,
    > possibly needing me to mess with perl source?


    IPC::Shareable
    IPC::ShareLite
    IPC::SharedCache

    >
    > Does anyone reading this have knowledge or experience with the
    > mechanism perl uses to allocate storage for variables, and if so - do
    > you know if it would be feasible to implement, and if so, whether it
    > would need me to edit the perl source, or if it might be doable via xs
    > or some other "conventional" way?
    >
    > Extreme performance is my goal, so solutions requiring anything slow
    > will not be appropriate.


    Um, Perl itself is requires something slow--the whole overhead of the perl
    run time and its umpteen levels of indirection. If extreme performance
    is your goal, program in C.

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , Feb 3, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe Fallon
    Replies:
    3
    Views:
    787
    =?Utf-8?B?Z3V5?=
    Jul 16, 2004
  2. Imran Aziz
    Replies:
    1
    Views:
    559
    Stefan
    Aug 22, 2005
  3. Robert Maas, see http://tinyurl.com/uh3t

    Idea for auto-validating text field, done already or not?

    Robert Maas, see http://tinyurl.com/uh3t, Jun 11, 2005, in forum: Java
    Replies:
    4
    Views:
    451
    Dale King
    Jun 28, 2005
  4. Kjell Arne Johansen

    How do I know if memory is already allocated?

    Kjell Arne Johansen, Sep 1, 2003, in forum: C++
    Replies:
    8
    Views:
    405
    Kjell Arne Johansen
    Sep 2, 2003
  5. Replies:
    5
    Views:
    662
    Matt Wharton
    Dec 9, 2004
Loading...

Share This Page