RDN Express Blog

Blog archive

Microsoft Adds Atomic Blocks to .NET 4

On Monday Microsoft released an enhanced version of .NET Framework 4 Beta 1 called STM.NET that enables software transactional memory. The project, which originated in Microsoft Research Cambridge, provides a mechanism that improves isolation of shared states in concurrency without degrading performance.

Available on MSDN DevLabs for C# programmers, the "experimental" STM.NET "frees developers from worrying about the mechanics of fine-grained locking and synchronization in multithreaded applications by providing transactional semantics for reading and writing to memory," says DevDiv's Senior Vice President Soma "S" Somasegar in a blog posting. He goes on to explain how STM.NET works:

"The .NET Framework's just-in-time compiler rewrites the code within an atomic block to use transactional memory. As a result, a significant amount of .NET code works without changes, including code that uses locks. STM.NET also provides integration with System.Transactions so you can coordinate your atomic memory operations with existing transactional resource managers like MSMQ."

Even though it's an experimental version of .NET 4 Beta 1, STM.NET requires Visual Studio 2008 and Windows XP or Vista (x-32-bit only). It cannot run on machines with VS 2010 Beta 1 installed. The STM-enabled version of .NET is for C# programmers only, primarily due to the small project team, according to STM program manager Dana Groff. You can read more about what STM.NET offers above and beyond .NET 4 Beta 1 in Groff's blog about the STM.NET version 1.0 release.

According to a statement about the project on the MSDN DevLabs Web site:

"The goal is to be able to exploit concurrency by using components written by experts and consumed by application programmers who can then compose together these components using STM."

Microsoft is looking for developer feedback on this technology. Learn more about STM programming and download the STM.NET-enabled version of .NET 4 Beta 1 here.

What's your take on concurrency and parallel programming in .NET 4 so far? Express your views below or drop me a line at [email protected]

Posted by Kathleen Richards on 07/30/2009


comments powered by Disqus

Featured

Subscribe on YouTube