Chapter 5. Parallelization and Threading Enhancements

Availability: Framework 4—Some Functionality in 3.5 with Parallel Extensions CTP

Until recently, CPU manufactures regularly released faster and faster processors. Speed increases, however, have all but ground to a halt due to various issues such as signal noise, power consumption, heat dissipation, and non-CPU bottlenecks.

No doubt these issues will be resolved in the future, but in the meantime manufacturers are instead concentrating on producing processors with multiple cores. Multicore processors can process sections of code in parallel, resulting in some calculations being performed more quickly and thus increasing application performance. To take full advantage of multicore machines, however, code has to be designed to be run in parallel.

A number of years ago, Microsoft foresaw the importance that multicore processors would come to play and started developing the parallel extensions. In .NET 4.0, Microsoft built on this earlier work and integrated it into the core framework, enabling developers to parallelize their code in an easy and consistent way. Because this is the first mainstream release, it's probably wise to expect to see some minor tweaks and API changes in the future.

Although the parallelization enhancements make writing code to run in parallel much easier, don't underestimate the increasing complexity that parallelizing an application can bring. Parallelization shares many of the same issues you might have experienced when creating multithreaded applications. You must take care when developing parallel applications to isolate code that can be parallelized.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.106.237