Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Multithreading Parsers

by crenz (Priest)
on Mar 22, 2005 at 12:12 UTC ( #441431=note: print w/ replies, xml ) Need Help??


in reply to Multithreading Parsers

Don't read this. Read BrowserUK's reply. I'm wrong... but I learned something!

Just as an aside, since it hasn't been mentioned explicitly: I have no experience with AIX, but my guess is that it can only shift processes to different processors, but not threads, as a process can't run (efficiently) on two different processors. So if you use the divide & conquer strategies mentioned, make sure you fork().


Comment on Re: Multithreading Parsers
Download Code
Re^2: Multithreading Parsers
by BrowserUk (Pope) on Mar 22, 2005 at 13:27 UTC
    but my guess is that it can only shift processes to different processors, but not threads, as a process can't run (efficiently) on two different processors.

    Why do you say that?

    To quote from this AIX Programming Guide:

    On a uniprocessor system, threads execute one after another in a time-sliced manner. This contrasts with a multiprocessor system, where several threads execute at the same time, one on each available processor. Overall performance is improved by running different process threads on different processors. However, an individual program cannot take advantage of multiprocessing, unless it has multiple threads.

    Indeed, I am not aware of any flavour of *nix that supports POSIX threads that does not allow threads to run on all available cpu's? Nor am I aware of any efficiency problems inherent in doing so.

    Is this just FUD or do you know something I don't?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco.
    Rule 1 has a caveat! -- Who broke the cabal?
Re^2: Multithreading Parsers
by perlfan (Curate) on Mar 22, 2005 at 15:26 UTC
    That is why I say forget about threads here :). Additionally, if you want to figure out if you'll get any benefit out of the whole "divide and conquer" approach, check out the master's theorem.
      That is why I say forget about threads here :).

      Because you haven't got a clue what your talking about?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco.
      Rule 1 has a caveat! -- Who broke the cabal?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://441431]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2014-07-30 01:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls