26

Creating Multi-threaded and Parallel Applications for Computational Finance

26.1 INTRODUCTION AND OBJECTIVES

In this chapter we give an introduction to the design and implementation of multi-threaded and parallel applications in .NET. The goal is to define a process that will allow us to discover parallelism and concurrency in applications and then to implement these applications using a combination of parallel design patterns and the .NET features introduced in Chapters 24 and 25. In particular, we pay attention to the following topics:

  • A1: Discovering potential concurrency by using data and task decomposition. We design the application as a set of loosely coupled concurrent tasks.
  • A2: We refine and elaborate the tasks from step A1 by determining which parallel design patterns are most suitable for the job at hand. The criteria for choosing the most appropriate patterns are efficiency, scaleability and maintainability.
  • A3: Having decided which combination of patterns to use, the next question is to determine how to implement them in C#.
  • A4: Implement a solution; measure the performance and accuracy of the solution. Revise steps A1 to A3 and modify the design if the solution does not satisfy the requirements.

It is impossible to discuss all of the above attention areas in equal detail in this book but we try to delineate the necessary steps in the process. The parallel design patterns mentioned in this book are discussed in detail in Mattson, Sanders and Massingill 2005. ...

Get C# for Financial Markets now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.