Perl Multitasking Question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
A fairly recent ActiveState version of Perl is being used on Windows Vista
and XP PC type computers.

Perl Multitasking Questions:

1.  Is it possible to have a single Perl program work on more than one task
at a time?

Or, another way of doing that would be:

2.  Is it possible to have multiple separately running Perl programs share
the same data arrays (without using Perl or Windows code that is impossibly

       Complex Perl language programs are being written (by me) for use by
science researchers around the world.  The programs can involve processing
hundreds and at times even thousands of files stored on the PC hard drive.
And the programs could run much faster if they could perform multiple tasks
at the same time.

       For example, one part of a program might be doing calculations
associated with some array while a second part of the program manages
various files and gets arrays loaded and organized in the computer RAM
memory so that they will be ready for processing when the first part of the
program gets to a point where it needs them for calculations.

       A good percentage of our modern computers have dual or quad core
processors and tremendous amounts of RAM memory.  So they can easily work on
more than one task at a time.  Also, a certain amount of time is involved
with reading and writing from the computer hard drive.  And if data files
could be read into RAM memory before they were actually needed then that
could probably save a lot of time.

Re: Perl Multitasking Question

Well, the "classic" solution to this is to used shared memory.
Since you are on Windows of course you can't use a real SysV IPC type
solution(i.e. IPC::Shareable) but you can use this
Which will do the trick. You need to read some docs but I would
say that this is not at all "impossibly complicated". :)

Quoted text here. Click to load it

Re: Perl Multitasking Question

Quoted text here. Click to load it

       Thanks for the information.  I took a quick look at the module and
plan to look at it in more detail later.

       Using shared memory was actually the an option that was discussed a
while back in one of the Windows Newsgroups.  The goal with that particular
effort was to learn how to create a shared memory area that both Perl and
the Gnuplot plotting program could use to exchange information.  But at the
time, developing the necessary Windows code appeared to be too complicated.
I am only an intermediate level programmer.


       An effort is underway to create a Web site where a variety of
humanitarian projects would be worked on.  I am presently holding
discussions with a group that I am hoping will initially serve as the
official "owner" of the Web site and domain name.  I could easily create
such a Web site and pay for the cost of running it myself.  So funding for
it won't be a problem.

       Science experts would be doing the actual research at the site.
However, if the Web site development effort is a success we will probably
try to locate some experienced computer programmers who could help with both
developing computer code that would run on home computers, with developing
CGI code for use on Web site computers, and with developing regular HTML and
perhaps PHP code etc. for individual Web pages.  Scientist researchers
including myself very often don't have the necessary programming skills to
be able to do all of those types of things.

Regards to all,


Site Timeline