Transactional memory with .NET

Posted: (EET/GMT+2)

 

Programming for concurrency and parallel applications is hard. Of course, this is partially because of the right tools, but nonetheless having the correct mindset to develop applications for the latest multi-core processors will continue to require extensive effort for at least five to ten year.

Now, one of the biggest potential helpers to aid developers in writing concurrent applications is transactional memory http://en.wikipedia.org/wiki/Transactional_memory. If you've worked with almost any SQL databases, you are surely familiar with transactions. The basic idea of transactional memory is the same: you define which operations should be atomic, and the runtime (etc.) handles the rest.

For C# and .NET developers, there's now something new and interesting. Called STM.NET, all C# coders can use this new preview library and set of tools to investigate the promise of transactional memory. This package can be thought as of being an add-on to the current .NET 4.0 Beta 1. Says the STM.NET documentation:

"Transactional memory is considered a promising technology by the academic community and is repeatedly brought up as a welcome technology for the upcoming wave of applications which scale on modern multi-core hardware."

If this sounds interesting to you, be sure and go download the package today. It's available on MSDN DevLabs. Other interesting cookings at the DevLabs currently include Code Contracts (stay tuned for an intro later) and Axum, which is related to STM.NET.