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
in thread Perl and parallel processors by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.