Our Properties: Gamasutra GameCareerGuide IndieGames Indie Royale GDC IGF Game Developer Magazine GAO
My Message close
Contents
The Transition to Concurrency
 
 
Printer-Friendly VersionPrinter-Friendly Version
 
Latest News
spacer View All spacer
 
February 10, 2012
 
Analyst questions validity of unusual January NPD results [3]
 
DICE 2012: Blizzard's Pearce on World Of Warcraft's launch hangover
 
DICE 2012: Insomniac's Price on Quality Of Life, ditching the 'Loser' badge [2]
spacer
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
February 10, 2012
 
Sony Computer Entertainment America LLC
Audio Tools Engineer
 
Sony Computer Entertainment America LLC
World Wide Studios Technical Product Manager
 
Sony Computer Entertainment America LLC
Senior Software Application Engineer
 
Sony Computer Entertainment America LLC
Senior Gamer Insights Specialist
 
High 5 Games
Technical Artist
 
Airtight Games
Art Director
spacer
Latest Features
spacer View All spacer
 
February 10, 2012
 
arrow Principles of an Indie Game Bottom Feeder [18]
 
arrow Postmortem: CyberConnect 2's Solatorobo: Red the Hunter [1]
 
arrow Jerked Around by the Magic Circle - Clearing the Air Ten Years Later [39]
 
arrow Building the World of Reckoning [4]
 
arrow SPONSORED FEATURE: TwitchTV - How to Build Community Around Your Game in 2012 [13]
 
arrow Happy Action, Happy Developer: Tim Schafer on Reimagining Double Fine [9]
 
arrow Building an iOS Hit: Phase 1 [11]
 
arrow Postmortem: Appy Entertainment's SpellCraft School of Magic [5]
spacer
Latest Blogs
spacer View All     Post     RSS spacer
 
February 10, 2012
 
Audio Passes: Success Through Layering
 
What the current RPG can learn from Diablo 1
 
Double Fine's Kickstarter Windfall: Will Patronage Supplant Traditional Game Publishing? [5]
 
The Principles of Game Monetization
 
Did DoubleFine Just break the publishing model for good? [12]
spacer
About
spacer Editor-In-Chief/News Director:
Kris Graft
Features Director:
Christian Nutt
Senior Contributing Editor:
Brandon Sheffield
News Editors:
Frank Cifaldi, Tom Curtis, Mike Rose, Eric Caoili, Kris Graft
Editors-At-Large:
Leigh Alexander, Chris Morris
Advertising:
Jennifer Sulik
Recruitment:
Gina Gross
 
Feature Submissions
 
Comment Guidelines
Sponsor
Features
  The Transition to Concurrency
by Kristian Dupont Knudsen [Programming]
Post A Comment Share on Twitter Share on Facebook RSS
 
 
April 5, 2007 Article Start Page 1 of 4 Next
 

Introduction

Concurrency is going to be crucial in the near future. The talk has been going for years, but now that Intel and AMD are actually starting to move that way too, you know there is something about it. A tremendous amount of articles such as this have been written on the subject lately, so I am not going to reiterate the evidence. Instead, I want to talk about what we are going to do - right now.

If you're a C++ programmer, you have surely been exposed to semaphore-based concurrency. Mutices and other kinds of locks are currently the most popular way of doing concurrency, despite the fact that it is one of the most difficult to use.


Furthermore, people often use them in a way that yields poor performance. Although you should not discard them completely, using semaphores should definitely not be the first and only option you consider when writing concurrent code.

Erlang and Friends

There are many ways to approach concurrency. Choosing an apt programming language is one. Erlang is a functional programming language designed specifically for concurrent programming.

Functional languages in general have the capability to excel in the concurrency area. A functional language such as OCaml is already famous for its optimizing compiler which makes it a language that is not just capable of achieving great performance - it actually does. This should make OCaml an obvious choice for concurrent programming.

But Why Change Language?

If you are interested in performance, chances are you are writing server code, embedded code or maybe game code like I am. And if that is the case, chances are that you are writing C or C++, and you are probably skeptical about other languages. In the end, they're all Turing-complete, right? So what could any language offer that you can't simulate?

Well you're right of course - there is nothing you can't achieve by simulating it. You can use or come up with design patterns that help you with everything. After all, design patterns are often described as language features that haven't (yet) been implemented. You can write object oriented code in C, simulating inheritance and virtual methods and everything but at the cost of increased complexity. Simulating functional programming in C is a pain. With C++ it is a slightly more bearable pain, but a pain nevertheless.

But even if you accept the fact that there may be better suited languages for the task, you may not have that option. No programmer is an island - you have to work with other programmers, you probably have management to respond to and changing languages is not a trivial decision. Plus, for many platforms, the C++ compiler is the only thing available.

At Flux Studios, we have been using C# for some scripting, assuming that Microsoft would provide support for the Xbox. Though they probably will, it seems unlikely that C++/CLI will be supported in the near future, which pretty much breaks the deal for C#.

(If your target platform is the VM of Java or .NET however, you could experiment with one of these hybrid languages: Scala, Nemerle or F#. They look quite interesting yet not too alien to Java or C# programmers).

Initiatives such an OpenMP may actually bring C++ somewhat up to the challenge, but even with that in your toolbox, you are best off understanding some of these paradigms that are well suited for concurrency.

 
Article Start Page 1 of 4 Next
 
Comments


none
 
Comment:
 




UBM Techweb
Game Network
Game Developers Conference | GDC Europe | GDC Online | GDC China | Gamasutra | Game Developer Magazine | Game Advertising Online
Game Career Guide | Independent Games Festival | Indie Royale | IndieGames

Other UBM TechWeb Networks
Business Technology | Business Technology Events | Telecommunications & Communications Providers

Privacy Policy | Terms of Service | Contact Us | Copyright © UBM TechWeb, All Rights Reserved.