Wednesday, January 19, 2005

Concurrency

Yesterday I was sent an interesting article on concurrency. I have had a quick skim read of it and it is basically echoing what I have been saying over the last few months... Concurrency is the next big step in computing. Why? Multi-core CPUs.

In order to take advantage of multi-core CPUs, applications will need to be developed that use multiple threads. Multiple threads = concurrency. Concurrency = "You need to know what you are doing!" (have a read of some of the links from my site to concurrency issues such as Double Check Locking).

Having read this, it leads me to thinking, can you introduce concurrency into applications? I would agree to some degree that you can... You can offload things like loading images, saving and loading files, and background tasks., but generally the core functionality is usually single threaded. Will the offloading of "background" tasks give sufficient performance advantages, given the addition of concurrency control mechanisms? This is something that I need to do some more thinking on and will post my thoughts...

Let us consider an application example: PowerPoint: what threads could exist in this application?

  1. Load and render slides (potentially many threads, using structural exclusion to load different slides)
  2. User interface management (the GUI thread, interacted with from the threads above)
  3. Save thread (save files... requires lock on model...)
  4. Spelling and Gramma thread (interacts with changing model, and UI)

So multiple threads is possible, but this has greatly increased the complexity of the application. The model now requires appropriate critical sections, and/or locking strategies. How would this work in a team environment? Communication is the key. More developers need to know and understand concurrency, and strategies to overcome concurrency issues.

Beware Shameless Plug Below
So this bring me to the question:
Why do Advanced .NET at Swinburne?

Until recently Advanced .NET has been a subject that covered topics that most people would never work on again in their lives. This subject is hard. Most people work really really hard, and still only get a passing mark... What is the deal?

Advanced.NET deals with concurrency. This subject will help you learn about developing safe and effective concurrent applications.

No comments: