Wrapping Up DevWeek 2014

Sunday, April 6, 2014

I have landed from London six hours ago after a wonderful week at DevWeek. Three talks and a workshop made for a pretty busy schedule, but I still had time to enjoy London, with its unusually sunny weather. What's New in C++ 11 My first talk, at 9:30am in the morning, attracted a small audience of C++ developers. C++ 11 is a very extensive new standard, and if you read code developed in the modern C++ style, you might think it has nothing to do with your favorite language of the 1990's. Indeed, I tried to illustrate the major...

Uneven Work Distribution and Oversubscription

Wednesday, October 23, 2013

A few days ago I was teaching our Win32 Concurrent Programming course and showed students an experiment with the std::thread class introduced in C++ 11. The experiment is designed to demonstrate how to partition work across multiple threads and coordinate their execution, and the work to partition is simply counting the number of primes in a certain interval. You can find the whole benchmark here. The heart of the code is the parallelize_count function, below: void parallelize_count(unsigned nthreads, unsigned begin, unsigned end) {     std::vector<std::thread> threads;     unsigned...
no comments

Talks from DevConnections 2013: Advanced Debugging with WinDbg and SOS, Task and Data Parallelism, and Garbage Collection Performance Tips

Thursday, October 10, 2013

I'm falling behind in documenting all my travels this fall :-) In the beginning of the month I flew out to Vegas for IT/DevConnections, which was my second Las Vegas conference this year. I've been there for just 48 hours, but it was enough time to deliver three talks, meet fellow speakers, and even have a few meaningful chats with attendees about the future of .NET and production debugging techniques. You can find my presentations below -- the last couple of slides of each presentations have some additional references and books that might be useful if you want to expand...

Lock vs. Mutex

Friday, July 12, 2013

Here’s a quick brainteaser for you. Suppose you really want to find all the prime numbers in a certain range, and store them in a List<uint>. And also suppose that you want to parallelize that calculation to make it as quick as possible. You then need to synchronize access to the list so that it’s not corrupted by add operations performed in multiple threads. Would it be better to use a C# lock (CLR Monitor) or a Windows mutex to protect the list of primes? Parallel.For(2, 400000, n => { ...

DevReach 2012: Task and Data Parallelism

Friday, October 5, 2012

Thanks for attending my DevReach session on task and data parallelism! We discussed the APIs available to you in the Task Parallel Library and how to avoid common pitfalls and squeeze performance from seemingly difficult to parallelize algorithms. Among the topics we covered: Measuring concurrency using the Visual Studio Concurrency Visualizer Extracting parallelism from recursive algorithms Symmetric data processing and uneven work distribution Dependency management with continuations Synchronization avoidance with aggregation and creative solutions...
no comments

HTML5 Web Workers: Classic Message Passing Concurrency

Sunday, February 5, 2012

Most concurrency frameworks I write about on this blog consist of numerous layers of abstraction. Consider the Task Parallel Library, for instance: it’s a wrapper on top of the .NET Thread Pool, which is a wrapper on top of Windows threads. This cruft of low-level abstraction layers forces certain expectations from the newer libraries – namely, they must allow direct access to shared state, provide synchronization mechanisms, volatile variables, atomic synchronization primitives, … It seems that JavaScript (HTML5) with its Web Workers standard enjoys the lack of abstraction cruft for threading in the JavaScript world. Because there are...

The Future of Microprocessors—Must Read for Developers

Sunday, June 5, 2011

Long-time readers of this blog know that I really don’t like rehashing someone else’s thoughts and linking to material that isn’t my own. However, the ACM article The Future of Microprocessors (S. Borkar, A. Chien) warrants an exception to this rule. If you can afford the time (approx. 2 hours), I strongly recommend that you read the article instead of my somewhat incoherent ramblings below. If you’re looking for an executive summary highlighting some of the biggest challenges and likely solutions and are willing to sacrifice accuracy or presentation, read on :-) Moore’s Law and related observations...
no comments

A SELA Course Is Born: Parallel Programming in .NET 4.0, and a 20% Discount

Monday, March 21, 2011

I alluded to the existence of a parallel programming course in my previous post about the SDP. This three-day course, Parallel Programming in .NET 4.0 , was born a few weeks ago following intense work by Bnaya Eshet and yours truly. The syllabus can be broken roughly into the following: Introduction to processes, threads, and the thread pool Explicit (task) parallelism—creating and managing tasks and continuations Implicit (data) parallelism—parallelizing loops and LINQ queries Synchronization mechanisms, including lock-free code, memory models, thread-local storage, and kernel synchronization...

SDP 2011—Wrapping Up and Session Materials

It’s been a busy couple of months! The SELA Developer Practice, SELA’s annual conference for .NET developers, has taken place on March 13-16 in SELA’s offices and the Crowne Plaza hotel in Tel-Aviv. Dear conference attendees: thanks for being there! I personally appreciate your coming to the sessions, mingling with the speakers, telling us your pain points and participating in active discussions. I hope to see you again next year, and if there’s any feedback you have or tips for us to improve the conference, please feel free to use the comments or the contact form. I...
no comments

Sela Open House: Design and Architecture of Concurrent Applications

Friday, November 12, 2010

Yesterday I delivered another Sela Open House in Haifa (kudos to Philips MS for hosting this session). The subject was “Design and Architecture of Concurrent Applications”, and indeed much to my surprise I managed to avoid firing up WinDbg or writing lots of code, and instead talk about high-level principles. Some of the things we covered: Hardware trends—the increasing number of processors means new challenges such as eliminating false sharing, reducing synchronization to a minimum, coping with NUMA architectures Types of concurrent applications—partitioning, pipeline Trends...
no comments