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

C

Chris

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

xhoster

Chris said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top