Like rabbits left to their own devices, processing cores are breeding. But for all the proliferation of cores on desktops, in data centers and inside handheld devices, the fundamental problems for developers who have to deal with all those cores haven’t changed much.
For years, tools and frameworks have offered solutions to multi-threading, concurrency and parallelism. But unlike some other programming problems, where clear solutions have been selected already, the multicore problem remains one that is better solved through knowledge, skill and experience than through dollars and prepackaged bits. But that’s not to say there haven’t been some new developments in development.
Due to the complexity of the problems associated with multicore development, many vendors have had to be quite clever in how they offer their solutions. While there is no substitute for knowledge and experience, some companies, such as Microsoft, have found ways to get new multicore supports into their tools for developers who might not be so skilled in multicore development.
Brandon Bray, principal group program manager for .NET at Microsoft, said that there are three types of programmers for which they’ve addressed multi-core solutions. The first type of developers, which Bray said is quite small, knows how to develop multi-threaded applications, and doesn’t need much help. The second is similar, but wants concurrency to be easier. The third type is the largest, and is made up of developers who want nothing to do with multicore, multi-threading or concurrency.
For each type of these developers, Microsoft has managed to craft a way to make multicore development a little bit easier. For the first two types, .NET 4.5’s release in September included a new background garbage collector, which improved application performance thanks to the removal of garbage-collection pauses in the runtime.
“Background garbage collection does all the looking through memory while the program is running,” said Bray. “It’s making use of extra cores, and it’s not something we could have done 10 years ago because most computers only had one processor in them. It’s a default feature when people upgrade to .NET 4.5.”
.NET also includes multicore JIT, which uses data from previous application runs to optimize JIT compilation of .NET applications. This can improve startup time for long-running applications. This also uses extra cores automatically to do the compilation, thus offering developers a quicker build time.
While these two solutions are targeted at more experienced programmers, Bray said that developers disinterested in multicore can rely on .NET to offer them a faster way to do I/O and to take advantage of multicore for that: Async and Await.