Writing a Custom Message Block – Part 1: Introduction

The Asynchronous Agents Library within the Concurrency Runtime provides a set of basic message blocks which can be used to create a message passing network. In most cases, these blocks have sufficient enough flexibility and can be composed together to provide all the necessary functionality for your message-passing network. However, there are cases in which…

0

The concurrent_queue Container in VS2010

Now that Visual Studio Beta2 has been available for a few weeks (see Rick’s earlier blog post) I hope you’ve had a chance to experiment with one or both of the concurrent containers that were introduced:  concurrent_queue<T> and concurrent_vector<T>.  These two containers are lock-free, and are used to avoid synchronization bottlenecks in parallel algorithms.  As…

4

Debugging PPL in Visual Studio 2010

As you know from our previous posts, Visual Studio 2010 comes with great support for the task-based programming model and multi-threaded applications. Even though Daniel uses managed code in his examples, all the content he created for the Parallel Tasks and Parallel Stacks windows applies to C++ code too. Find out about all the links…

0

Concurency::parallel_for and Concurrency::parallel_for_each

Marko Radmilac, Senior Developer for Microsoft’s Concurrency Runtime, offers the following discussion of parallel iteration in the Concurrency Runtime: Let me say up front that this is my first blog, so I apologize if my writing format does not match what people have come to expect from a blog. I do hope, however, that this…

25

Sample Message Blocks priority_buffer, bounded_buffer, and alternator

Recently, I created 3 new sample message blocks that complement the Agents Library’s existing set and provide additional functionality. The three message blocks I selected to write, priority_buffer, bounded_buffer, and alternator, were based on customer feedback and to improve support for certain scenarios. Each of these sample message blocks behave similar to unbounded_buffer and the…

2

Resource Management in Concurrency Runtime – Part 3

In my previous blog post, I talked about the dynamic migration concept of the Concurrency Runtime’s (ConcRT) Resource Manager (RM). Today I will be demonstrating that concept in action and will focus on its performance characteristics. A Demonstration of Dynamic Migration The scenario that we are going to use to demonstrate the resource manager’s dynamic…

0

Code Samples for the Concurrency Runtime, Agents Library and Parallel Pattern Library updated for Beta2

We’ve posted an update to our sample pack at http://code.msdn.com/concrtextras for Visual Studio 2010 Beta2 . The newest thing is this drop of the sample pack are the three new header files in the ConcRTExtras folder.  Here’s what these files contain: ppl_extras.h contains additional stl style parallel algorithms like parallel_accumulate, parallel_partial_sum, parallel_transform, parallel_all_of, parallel_any_of, parallel_none_of…

1

What’s new in Beta 2 for the Concurrency Runtime, Parallel Pattern Library and Asynchronous Agents Library

Last week Visual Studio 2010 Beta was released for download. Since Beta1, the team has been pretty busy adding enhanced functionality to make you more productive at expressing parallelism in your applications and improving the quality and performance of our runtime and programming models. Here’s a guide to what’s new in Beta2: we’ve added 2…

2

Resource Management in Concurrency Runtime – Part 2

In my previous blog post, I talked about key concepts of the Concurrency Runtime’s (ConcRT) resource manager, starting with a definition of a resource. I then explained why an application might be composed of a number of scheduler instances. Eventually I mentioned how the resource manager helps in resource allocation to the schedulers in order…

0

Asynchronous Agents Library – Intro to Message Blocks

In my previous post I talked about the agent class. Now I will introduce the Agents Library’s message blocks, how to use them, and the fundamentals of what they do. I will cover some basics that apply to all of the message blocks, introduce the messaging APIs, and then specifically explain three blocks: unbounded_buffer, overwrite_buffer,…

6