laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
There are two types of multiprocessing architecture: one where the programmer has to specifically schedule jobs on different machines and one where a configurable operating system chooses the processor based usually on a load-balancing algorithm.
We need to know which type of architecture and even more detail such as the operating system and how it achieves multiprocessing (virtual in a network or is it a Cray or an equivalent HP or Sun Unix/Linux purpose-built multiprocessing computer) before we can advise fully, although Parallel::ForkManager is an example of an implementation where the operating system chooses the processor without needing scheduling from the programmer. Further, it isn't clear whether you already have a specific exercise to carry out or whether you also need us to dream up a functional example for you. The most useful and simple example I can think of comes from my own commercial experience: you have a group of a few hundred accounts each with tens of thousands of entries for today. Given that you have a farm of 64 linux PCs connected together as a virtual multiprocessing machine, calculate today's profit or loss for the group of accounts as quickly as possible (a.k.a "end of day" accounting - in real investment banking it isn't so simple because of complex pricing rules but can be made dirt simple for an exercise). Update, i.e. in the simplified case, an entry has an account number say 001-500, a unique transaction id, a debit/credit flag and an amount greater >= 0.0. Share the accounts among the processors to produce P/L per account and a grand total P/L value.
__________________________________________________________________________________
^M Free your mind!
In reply to Re: Perl and parallel processors
by Moron
|
|