Updated: July 13, 2020 (December 17, 2007)

  Sidebar

Why Parallelism Is Hard

My Atlas / Sidebar

278 wordsTime to read: 2 min

If parallelism is so important to application performance, why don’t more developers use it? The answer is that allowing different portions of an application to run simultaneously introduces new levels of complexity for developers, and they get little help from most OSs, including Windows.

Some of the technical issues developers face when writing parallel applications include the following:

Shared writeable data. The most common problem developers face is coordinating access to shared data, data that will be accessed by several processors in parallel. Developers must identify sections of code that access shared data (known as critical sections) and add code to coordinate that access. Poorly coordinated applications can exhibit seemingly random behavior (a problem known as a race condition) when the results of an operation rely on precise timing of the blocks of code involved and what other tasks might be modifying the data or using processor time simultaneously.

Concurrent errors. When a block of code encounters an error, Windows (and the .NET Framework) halt the offending code and generate an error event (an exception). The exception is then routed to an exception handler—a special block of code designed to examine the error and determine the proper course of action. But when multiple sections of code are running at once, multiple exceptions can be generated simultaneously. Developers must ensure that their exception handlers can properly handle such situations.

Atlas Members have full access

Get access to this and thousands of other unbiased analyses, roadmaps, decision kits, infographics, reference guides, and more, all included with membership. Comprehensive access to the most in-depth and unbiased expertise for Microsoft enterprise decision-making is waiting.

Membership Options

Already have an account? Login Now