Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Parallel system calls

by sundialsvc4 (Abbot)
on Sep 27, 2011 at 13:36 UTC ( #928086=note: print w/replies, xml ) Need Help??


in reply to Parallel system calls

I would suggest using a combination of Parallel::ForkManager and a queue.

Use the fork-manager to spawn a certain number of processes, then let each of them consume work-requests from a queue.   Or, if the requirement is simpler, let them decrement a shared variable and do so until the count reaches zero.

In general, “the number of units-of-work that are to be performed,” and “the number of parallel workers who are tasked to do the work,” are and should always remain separate.   The number of workers controls what IBM used to call the multiprogramming level of the system, and that “knob” should be independent of the workload volume.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://928086]
help
Chatterbox?
[1nickt]: Wow. I had heard about the chips on HP cartriddges but not that issue. I rejected HP's equivalent laptop becuase of build quality, very plasticky keyboard. And I believe HP is the champon of bloatware, too.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2017-03-27 13:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.