Multi-Core Programming: Increasing Performance through Software Multithreading

Chapter 5: Threading APIs

Previous chapters introduced the basic principles behind writing concurrent applications. While describing every thread package available today is beyond the scope of this book, it is important to illustrate the aforementioned principles with practical examples. This chapter will provide an overview of several popular thread packages used by developers today.

Threading APIs for Microsoft Windows

Since the advent of Windows NT, Microsoft has enabled application developers to write multi-threaded software applications. Advances in processor technology have allowed Microsoft to add additional capabilities, evolving its programming interface to support more and more advanced threading operations. As a result, the Microsoft threading APIs have become a powerful tool for writing multi-threaded applications running on Windows.

Historically, native Windows applications have been written in C/C++ using Microsoft's Win32 or MFC APIs. However, many new applications are being developed using Microsoft's .NET platform and associated common language runtime (CLR). This chapter examines writing multi-threaded applications using both programming techniques.

Win32/MFC Thread APIs

The Win32/MFC API provides developers with a C/C++ interface for developing Windows applications. While there are a large number of developers moving to a managed code development environment, understanding the Win32/MFC model is important for several reasons:

  • Performance. Applications that run in a managed runtime environment run on a software virtual machine. Managed code is compiled to virtual machine op-codes. These op-codes are then translated, at runtime, to native processor instructions. A number of optimizations minimize this overhead. However, native applications run directly on the processor; the overhead of translating virtual...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Microprocessor and IC Programmers, Compilers, and Debuggers
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.