parallel processing - सीपीयू को समानांतर करने के लिए वर्तमान सबसे अच्छे विकल्प क्या हैं

original title: "parallel processing - What are the current best options for parallelizing a CPU-intensive .NET app?"


This is an open-ended question. What approaches should I consider?

यह एक ओपन एंडेड प्रश्न है। मुझे किन दृष्टिकोणों पर विचार करना चाहिए?

यह अनुवाद के बाद का सारांश है, अगर आपको पूरा अनुवाद देखने की आवश्यकता है, तो कृपया 'अनुवाद' आइकन पर क्लिक करें

सभी उत्तर
  • Translate

    Your first step is to find and understand the parallelism in your problem. It is really easy to write multi-threaded code that performs no better than the single-threaded code it replaces. "Patterns for Parallel Programming" (Amazon) is a great introduction to the key concepts.

    Once you have a workable design, start reading the articles in the "Concurrency" topic in the MSDN Magazine archives (link), particularly anything written by Jeff Richter. Those will give you the nuts and bolts stuff on the threading constructs specific to Windows and .NET. (The multi-threading section in Richter's "CLR via C# (Amazon)is short, but very insightful - highly recommended.)

  • Translate

    There are some parallel extensions to .NET that are currently in testing and available at Microsoft's Parallel Computing Developer Center. They have a few interesting items that you would expect like Parallel foreach and a parallel version of LINQ called PLINQ. Some of the best information about the extensions is on Channel 9.

  • Moses Lee

    I think we could also include non-.NET-specific approaches to parallel processing if those are among the best options to consider.

  • Translate


    If you want to branch outside of .NET there has been a lot of discussion about Intel's Threading Building Blocks which is a parallel library for C++.

  • Translate

    There are many options and the best solution will depend on the nature of the problem you are trying to solve. If you are trying to solve an embarassingly parallel problem then dividing and parallelising the tasks will be trivial. In that case the challenge will come in distributing and managing the data used.

    Some suggestions would be: