jump to navigation

Inching Our Way to Multicore Programming November 2, 2012

Posted by Peter Varhol in Software development.
Tags: , ,
trackback

I cut my programming teeth on Lisp and Smalltalk, in the mid to late 1980s.  They were never mainstream languages, certainly, but at the time I liked to do things that didn’t necessarily follow conventional wisdom.  I don’t think I was able to fully appreciate the essential strengths of either language, but the experience taught me a lot about the late 1990s and beyond trend of managed languages.

Today, most development seems to be done with managed languages; that is, languages that manage memory themselves, rather than place that burden on the programmer.  This includes Java, C#, and most functional languages.

Today, managed languages and multicore processors seem to be a marriage made in heaven.  One of the disadvantages of these languages is that while automatic memory allocation is fast, deallocation and reclamation is slow.  That process, known as garbage collection, has to go through each memory pointer and determine if it is still in active use.  Worse, garbage collection is a process, so on a single-core system the application has to halt while it

On the .NET Framework 4.5, Microsoft has enabled the garbage collection process to run on a separate core from other processes.  While this may make garbage collection less exacting (I won’t get into the details), it means that other running processes won’t have to pause for the Framework to reclaim memory.

.NET also includes multicore JIT (just-in-time) compilation, which uses data from previous application runs to optimize JIT compilation of .NET applications.  This has the potential to be really exciting and useful.  Because .NET language assemblies aren’t compiled until they’re loaded for execution, now there is the potential for things such as predictive JIT compilation on alternative cores.  Once again, application performance will benefit.

We will all be multicore programmers eventually, but it’s a start when our frameworks and languages help us get there.

Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: