. Net 3.5-4.0 support for Parallel Computing

Source: Internet
Author: User
Tags visual studio 2010

In the history of computer development, the development of hardware technology, especially the increasing frequency of CPU, always brings stronger performance improvement to the software. From 386 to 586, from the competition to the Pentium, each increase in CPU frequency brings a significant increase in software performance, without any changes to the software. If some customers complain about your poor software performance, we don't have to worry about it. We only need to upgrade to a higher-frequency CPU. When the frequency of a single core CPU reaches 3G, it will encounter technical bottlenecks. The development of a single core CPU has reached a limit, and hardware vendors have to switch to a multi-core CPU, add two or more computing cores to a chip to increase the overall frequency of the chip. When the hardware increases the performance by adding the computing core, the software cannot fully improve the performance of multiple computing cores due to the impact of its architecture, sometimes the performance may be degraded. In this case, developers have to change the applicationProgramTo cope with this multi-core trend, so that your software can fully benefit from the performance improvement caused by hardware upgrades.

As the next-generation development platform, Visual Studio 2010 has increased its support for parallel operations. Microsoft is making it possible for developers to develop parallel computing efficiently and easily, no matter what they are usingCodeOr. NET Framework. This frees developers from tedious and complex multi-threaded development and puts more energy into the business logic.

    • Visual Studio ide supports a large amount of parallel computing development. Visual Studio 2010 provides a "parallel Performance Analyzer" that helps us analyze the performance bottlenecks of applications and find the areas where parallel processing and parallel processing are required, and displayed in a graphical form.
    • Support for parallel computing by unmanaged C ++ libraries and compilers
    • . NET Framework 3.5/4.0 supports a large amount of parallel computing, including Plinq and parallel language statements.

This article discusses. the Demo code of Visual Studio 3.5 beta2 training kit. let's take a look back before the discussion.. Net parallel components:

Because parallel computing breaks down a job for concurrent execution, any software development and running platform that supports parallel computing must solve the issue of mutual collaboration between these concurrent sub-tasks, such:

    • A subtask must wait for the completion of other subtasks. After multiple subtasks are completed, the next subtask (fork-join) can be executed ),
    • After a subtask is completed, the execution of multiple subtasks is automatically started.
    • Cancel a task midway through
    • ......

. Net 3.5/4.0 expands and enhances the existing base class libraries to meet the above requirements .. Net adds some new classes to the "system. Threading" namespace, and also adjusts and optimizes some existing classes. In addition, a unified cancellation model is provided to meet the common needs of canceling threads or executing tasks in the process. The biggest change is that. NET provides multiple classes closely related to parallel computing for the base class library and calls them "parallel extensions )".

. Net 3.5 released a class library in the reactive extension through devlabs to support parallel processing. The reactive extension aims to simplify the construction of asynchronous and event drivers. See infoq'sArticleMicrosoft released the reactive framework to simplify asynchronous and event-driven programming. The following. Net 3.5 example code requires downloading the reactive extension.

First, we will introduce my machine configuration, single CPU and dual-core:

The following example is from parallelbabynames of Visual Studio 2010 beta2 training kit:

. Net 3.5 running result:

. Net 4 running result:

According to the running results of the above example,. Net 4 has better performance than. Net 3.5, And. Net 3.5 and. Net 4.0 have basically the same parallel processing capability.

Visual Studio 2010 and parallel computing for developer Resources

Http://blogs.msdn.com/hale/archive/2010/03/18/visual-studio-2010-and-parallel-computing-for-developer-resources.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.