Skip to main content Accessibility help
×
Hostname: page-component-8448b6f56d-qsmjn Total loading time: 0 Render date: 2024-04-19T02:22:31.356Z Has data issue: false hasContentIssue false

7 - Shared-memory Programming

Published online by Cambridge University Press:  06 January 2017

Zbigniew J. Czech
Affiliation:
Silesia University of Technology, Gliwice, Poland
Get access

Summary

INTRODUCTION

Another basic type of parallel processing, next to message-passing computing, is shared-memory computing. As the name indicates, this type of computing assumes that programs have access to shared memory covering the whole or a part of the operating memory of a parallel computer. A single program is executed by one or more collaborating threads created and deleted dynamically. The threads executed in parallel can operate on both the shared data and private data.

In this chapter we concentrate on the principles of shared-memory programming with the use of OpenMP API (Open Multi-Processing Application Programming Interface) that works in conjunction with C/C++ and Fortran languages. The interface is defined by the collection of compiler directives, library functions, and environment variables. These elements allow users to indicate to a compiler the parts of a sequential program that can be executed in parallel. Basically, the interface is intended to create programs on shared-memory architectures (see Section 5.3). However, supported by MPI it can also be used to write parallel programs on clusters equipped with shared as well as distributed memory (see Sections 5.4.1 and

5.4.2).

The first version of the interface was developed by the OpenMP Architecture Review Board (ARB) in 1997. The board, which is still active, includes representatives of computer and software manufacturers, as well as a wide range of experts from various research institutions and universities.2 What is important, from the very beginning OpenMP received support from the leading computer companies such as Compaq, Digital, IBM, Intel, and Silicon Graphics. The producer group supporting OpenMP is constantly growing, as evidenced by creation of compilers for C,C++ and Fortran that accept the interface. The OpenMP 2.5 version (May 2005) has become a kind of standard. The work on version 3.0 was completed in May 2008, and on version 3.1 in July 2011.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2017

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×