Flylib.com

Books Software

 
 
 

Libraries for Parallel and Distributed Programming

Libraries for Parallel and Distributed Programming

The MPICH, an implementation of MPI, the PVM library, and the Pthreads (POSIX Threads) library, are used to implement parallel programming using C++. MICO, a C++ implementation of the CORBA standard, is used to achieve distrbuted programming. The C++ Standard Library, in combination with CORBA and the Pthreads library, provides the support for agent-oriented and blackboard programming concepts that are discussed in this book.

The New Single UNIX Specification Standard

The new Single UNIX Specification Standard, Version 3, a joint effort between IEEE and the Open Group, was finalized and released in December 2001. The new Single UNIX Specification encompasses the POSIX standards and promotes portability for application programmers. It was designed to give software developers a single set of APIs to be supported by every UNIX system. It provides a reliable road map of standards for programmers who need to write multitasking and multithreading applications. In this book we rely on the Single UNIX Specification Standard for our discussions on process creations, process management, the Pthreads library, the new posix_spawn() routines, the POSIX semaphores, and FIFOs. Appendix B in this book contains excerpts from the standard that can be used as a reference to the material that we present.

Who is This Book For?

This book is written for software designers, software developers, application programmers, researchers, educators, and students who need an introduction to parallel and distributed programming using the C++ language. A modest knowledge of the C++ language and standard C++ class libraries is required. This book is not intended as a tutorial on programming in C++ or object-oriented programming. It is assumed that the reader will have a basic understanding of object-oriented programming techniques such as encapsulation, inheritance, and polymorphism. This book introduces the basics of parallel and distributed programming in the context of C++.

Development Environments Supported

The examples and programs presented in this book were developed and tested in the Linux and UNIX environments, specifically with Solaris 8, Aix, and Linux (SuSE, Red Hat). The PVM and MPI code was developed and tested on a 32-node Linux-based cluster. Many of the programs were tested on Sun Enterprise 450s. We used Sun's C++ Workshop, The Portland Group's C++ compiler, and GNU C++. Most examples will run in both the UNIX and Linux environments. In the cases where an example will not run in both environments, this fact is noted in the Program Profiles that are provided for all the complete program examples in the book.

Ancillaries

UML Diagrams

Many of the diagrams in this book use the UML (Unified Modeling Language) standard. In particular, activity diagrams, deployment diagrams, class diagrams, the state diagrams are used to describe important concurrency architectures and class relationships. Although a knowledge of the UML is not necessary, familarity is helpful. Appendix A contains an explanation and description of the UML symbols and language that we use in this book.

Program Profiles

Each complete program in the book is accompanied by a program profile. The profile will contain implementation specifics such as headers required, libraries required, compile instructions, and link instructions. The profile also includes a Notes section that will contain any special considerations that need to be taken when executing the program. Code that is not accompanied by a profile is meant for exposition purposes only.

Sidebars

We made every attempt to stay away from notation that is too theoretical for a introductory book such as this one. However, in some cases the theoretical or mathematical notation was unavoidable. In those cases we use the notation but we provide a detailed explanation of the notation in a sidebar.

Testing and Code Reliability

Although all examples and applications in this book were tested to ensure correctness, we make no warranties that the programs contained in this book are free of defects or error, are consistent with any particular standard or merchantability, or will meet your requirement for any particular application. They should not be relied upon for solving problems whose incorrect solution could result in injury to person or loss of property. The authors and publishers disclaim all liability for direct or consequential damages resulting from your use of the examples, programs, or applications present in this book.