New Parallel Demo Showing Different Patterns

Thursday, July 29, 2010 – 9:23 pm

Demo UI.

I’ve upgraded the demo demo that goes with the TechEd 2010 parallel patterns talk.

This is essentially the sample from Chapter 5 of “Parallel Programming with Microsoft .NET” with additional work on on the UI to make it more “demoable”. Notably the UI is based on one of the diagrams from the book.

It also shows additional patterns used within the same sample to enhance individual steps within the overall workflow.

The code is currently under development so you can download the latest source from my blog repository on BitBucket.

http://bitbucket.org/ademiller/blog/downloads

Eventually I’ll probably ship it on the CodePlex site along with the other book samples.

Once You Know, You Newegg

Gotchas: The Profiler Uses Processor Resources Too!

Wednesday, July 14, 2010 – 1:07 pm

profiler_beforeI was doing some work on the Parallel Programming with Microsoft .NET book yesterday. We’ve added some additional content to Appendix B to show some of the “visual patterns” that can tell you what’s wrong with your parallel code.

Here’s one of those patterns… The image on the left shows one of these patterns for an application with a load imbalance across the available cores. The vertical axis shows the number of cores being used, the horizontal axis shows time (click on the image to see a larger version). The green area shows the number of cores being used by my application.

As you can see I have a load imbalance problem. Some cores finish very quickly and are idle (grey on the graph) while others run for much longer. The overall time taken is entirely dependent on the longest running core.

And therein lies the problem. Why isn’t my application using all eight cores?! The eighth core is being used (indicated by the fact that it is colored yellow) but not by my application.

Read the rest of this entry »

Øredev, Malmö, November 2010

Thursday, July 8, 2010 – 10:47 pm

Looks like I’m going to be in Malmö in November for the Øredev Conference, 8-12 Nov.

I’m doing two talks and expect to have some copies of our book to give out.

Patterns of Parallel Programming (Thursday 10:15)

Distributed Agile at Microsoft p&p (Friday 13:10)

I might also be at TechEd in Berlin if the stars align and I decide I really want to put in the miles.

Parallel Programming with Microsoft® .NET

Thursday, July 8, 2010 – 10:12 pm

After a lot of really hard work from a lot of different people over the past month or so we now have a preliminary draft of the book available for download.

The first thing you might notice is that… We’ve changed the title.

front_cover_small

Parallel Programming with Microsoft® .NET:
Design Patterns for Decomposition and Coordination
on Multicore Architectures

Titles are tricky things. We got quite a lot of feedback that the one we had needed some improvement. We think this better reflects both the content and goals of the book.

We also added some goodies right at the end. I finally wrote the Adapting Object-Oriented Patterns piece, otherwise known as Appendix A. Stephen Toub added some additional information on visual patterns in the profiler. These can tell you when your application isn’t performing right (Appendix B).

We’ve also added authors; Colin Campbell, Ralph Johnson, Ade Miller and Stephen Toub. Writing a technical book is a communal effort. The patterns & practices group always involves both experts and the broader community in its projects. While this makes the writing process lengthier and more complex, the end result is always more relevant. The authors drove this book’s direction and developed its content.

We did get a huge amount of feedback from various different people, all of which was incorporated into the text. A special mention to Reed Copsey Jr.—who found the time in spite of illness—and Ralph Johnson’s students at University of Illinois at Urbana Champaign who workshopped the entire book chapter by chapter. The list goes on, the book’s acknowledgements will reflect the full list.

The complete preliminary draft of the book and C# sample code is now available for download.

Murder, Blood and Thread Safe Singletons

Saturday, June 19, 2010 – 7:16 pm

It’s Saturday and I’ve been working on my book on Parallel Programming, except for a brief break to go to CrossFit.

Useful Piece of Information #1: Don’t do pull-ups until your hands are trashed if you’re planning on spending the afternoon typing.

I had lots of useful replies to my tweet asking how to get blood off a keyboard, both Cyber Clean and Hydrogen Peroxide with a Q-Tip seem popular. Makes me wonder exactly what those “other people” were going to need keyboard cleaning. And by association this brings me to…

Useful Piece of Information #2: The collective noun for Crows is…

“A murder of crows”

That was easy.

Read the rest of this entry »

Patterns of Parallel Programming – TechEd Talk Online

Thursday, June 17, 2010 – 5:50 am

teched_2010_patterns_of_parallel_pro

The deck and video from my talk at TechEd 2010 are now available online.

The talk walks through many of the patterns in the book “A Guide to Parallel Programming” and uses many of the nice artwork we’ve had created for the book.

Tiberiu Covaci also gave an interactive session on patterns and parallel programming. You can view an interview with him on “Is the future of programming a parallel one?” (TechEd 2009) too!

The One Minute Commute

Wednesday, June 16, 2010 – 11:18 am

commute_book_cover Zach Grossbart has published the first few chapters of his book “The One Minute Commute” online. The chapters look very promising and I’m looking forward to reading the book as it is published.

Chapter 1 – Introduction

The Plan of The One Minute Commute
What It Takes To Work Remotely
You Are Not Your Code
Introducing The One Minute Commute

Chapter 2 – Land The Remote Job You Love

Publicize Yourself Into a Telework Job
Market Yourself Into A Remote Job

I had a couple of conversations with Zach about distributed teams a while back when I was writing my distributed development paper. He had a bunch of good ideas which I expect will be covered in the book.

A Guide to Parallel Programming – Book and Talk at TechEd

Monday, June 7, 2010 – 8:11 pm

teched_book So I finally took delivery of beta version of “A Guide to Parallel Programming”. This contains the Preface, Introduction and Chapters 2: Parallel Loops and Chapter 5: Futures.

They arrived at TechEd and I had a very sweaty time getting them from the hotel to the conference center. We ended up having to carry all twenty boxes of books down the street and into the exhibition hall.

If you aren’t at TechEd you can download the latest release, which also includes drafts of additional chapters 3 & 4.

We’re keen to get feedback on the book. You can leave a comment on my blog or post to the discussion on the CodePlex project site.

  1. Do you think the questions at then end of each chapter are useful? They’re designed to test your understanding of the material in the chapter.
  2. Do you think the preface and introduction provide enough information for readers not that familiar with parallel programming?

I’m also doing an “Ask the Architect” session today:

Architecture area of the TLC (next to the Dev Info desk), Wednesday 10:30am – 12:30pm.

You can come and talk to me about what you’re doing with parallelism and what you think of the book!

Read the rest of this entry »

A Guide to Parallel Programming – TechEd Events

Wednesday, June 2, 2010 – 4:00 am

front_cover_small I’ll also be talking about the book at TechEd in New Orleans next week. I have one talk scheduled…

ARC205 | Patterns of Parallel Programming

Room 276, Tuesday 5:00pm – 6:15pm

Multi-core and HPC technologies are rapidly moving into the computing mainstream, allowing us to develop applications with improved performance, increased responsiveness, and reduced latency. The many established design patterns in this space can help developers and architects reuse proven approaches to solving many types of concurrency problems. This talk covers many of the key patterns and gives examples of how they can be implemented using the Microsoft .NET Framework 4.0 libraries of parallelism. (Part of a virtual workshop series on Patterns of Parallel Programming; aimed at experienced software developers who are relatively new to the parallel computing space but expect it to become more important to their work.)

I’ll also be giving away hard copies of the Beta containing the Preface and chapters 1, 2 and 5 covering; The Introduction, Parallel Loops and Futures and Continuation Tasks. You can also download this content as a PDF from the CodePlex site.

I’d like to talk to people who’ve read what we’ve written so far. I’ll be chairing an informal session the following day from 10:30am – 12:30pm. Venue TBD. You can also come and see me at the patterns & practices booth in the Exhibition Hall or talk to me after my talk.

The first forty people who give me feedback on the book will receive a free copy of the final version when it ships in October.

In summary…

Opportunities to talk about parallelism and the TPL:

My Talk – Room 276, Tuesday 5:00pm – 6:15pm.

My Q&A session – Architecture area of the TLC (next to the Dev Info desk), Wednesday 10:30am – 12:30pm.

The patterns & practices Booth – Exhibition Hall, All Week.

Hope to see you in New Orleans next week!

A Guide to Parallel Programming – Drafts of Chapters 3 & 4

Monday, May 31, 2010 – 12:23 pm

front_cover_small

We’ve just dropped another two chapters and sample code to the Parallel Programming Guide to CodePlex site.

These next two draft chapters are:

Chapter 3 Parallel Tasks

Chapter 2 shows how you can use a parallel loop to apply a single operation to many data elements. This is data parallelism. This chapter explains what happens when there are distinct asynchronous operations that can run simultaneously. In this situation, you can temporarily fork a program’s flow of control with tasks that can potentially execute in parallel. This is task parallelism.

Chapter 4 Parallel Aggregation

Chapter 2 shows how to use parallel techniques that apply the same independent operation to many input values. However, not all parallel loops have loop bodies that execute independently. For example, a loop that calculates a sum does not have independent steps. All of the steps accumulate their results in a single variable that represents the sum calculated up to that point. This accumulated value is an aggregation.

This means that the Preface and Chapters 1-5 are now available online, including these new chapters in draft form. As always if you have feedback then you can put comments here or discuss it on the CodePlex site.