InfoQ

News

PLINQ: Parallel Programming For The CLR

Posted by Jonathan Allen on Jan 30, 2007 12:11 PM

Community
.NET
Topics
.NET Framework
Tags
PLINQ,
LINQ

While Microsoft's developer devision refines the core of LINQ for the Visual Studio 2007 release, work has already begun on the next version feaures. The one most interesting to those looking to support multi-core computer is Parallel LINQ (PLINQ). Joe Duffy's presentation at Declarative Aspects of Multicore Programming (DAMP) workshop gives a good overview of some of background and issues of LINQ and Parallel LINQ.

PLINQ uses the same syntax as LINQ, but is based on the parallel query execution techniques you would find in major database applications like SQL Server and Orcale.

Prior to LINQ, .NET developers had full control over how queries were executed. The downside to having that much control is that even the most basic search procedures required had-rolling loop and evaluation code. LINQ moves all those details down to the compiler level, essentially making them implementation details.

Since Microsoft controls the implementation of LINQ queries, it can redefine them at runtime to use parallel techniques such as partitioning and pipelining without having developers make significant changes their code.

Parallel LINQ isn't a free ticket into the land of multi-cores, there is still a lot of issues to address. The biggest one is that shared memory still has to be considered. Unlike languages designed with parallelism in mind such as T-SQL, the CLR's type system doesn't support the concept of a pure function. Or in other words, the runtime has no way to know if a function is thread-safe, without side effects, or even if it will always return the same value for a given argument.

Without this information, knowing when it is safe to use parellel techniques becomes very hard. There are on-going research projects like Spec# which seek to address this, at this time it is still pretty much wait and see.

No comments

Reply

Exclusive Content

Tapestry for Nonbelievers

A new article by I. Drobiazko and R. Zubairov introduces v. 5 of the Apache Tapestry component-oriented web framework. The tutorial shows how to create a component and covers IoC in Tapestry and Ajax.

Pete Lacey on REST and Web Services

In this interview, Burton Group consultant Pete Lacey talks to Stefan Tilkov about his disillusionment with SOAP, his opinion on REST, and addresses some of the perceived shortcomings REST vs. WS-*.

Business Natural Languages Development in Ruby

Jay Fields presents his concept of Business Natural Languages - a type of Domain Specific Languages geared towards being readable by domain experts.

Distributed Version Control Systems: A Not-So-Quick Guide Through

Adoption and interest for Distributed Version Control Systems is constantly rising. We will introduce the concept of DVCS and have a look at 3 actors in the area: git, Mercurial and Bazaar.

Segundo Velasquez and Agile as Seen Through the Customer's Eyes

Deborah Hartmann interviewed Segundo Velasquez about his experience as customer with an Agile team during the initial phase of software design of a product.

Fine Grained Versioning with ClickOnce

David Cooksey shows how to fine grained versioning to a ClickOnce deployment using an HttpHandler written with ASP.NET, making partial rollouts to a test audience much easier.

Implementing Manual Activities in Windows Workflow

Windows workflow (WF) is an excellent framework for implementing business processes, but lacks support for human activities. This article describes a completely generic approach for changing this.

Markus Voelter about Software Architecture Documentation

In this interview taken during OOPSLA 2007, Markus Voelter talks about the importance of documenting the software architecture, and gives some good and also bad examples on how it could be done.