BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

PLINQ: Parallel Programming For The CLR

| by Jonathan Allen Follow 6 Followers on Jan 30, 2007. Estimated reading time: 1 minute |

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.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT