Parallel and Distributed Programming Using C++

Cameron Hughes, Tracey Hughes

  • 出版商: Addison Wesley
  • 出版日期: 2003-09-04
  • 定價: $1,880
  • 售價: 9.0$1,692
  • 語言: 英文
  • 頁數: 720
  • 裝訂: Hardcover
  • ISBN: 0131013769
  • ISBN-13: 9780131013766
  • 相關分類: C++ 程式語言
  • 立即出貨(限量)

買這商品的人也買了...

商品描述

Parallel and Distributed Programming Using C++ provides an up-close look at how to build software that can take advantage of multiprocessor computers. Simple approaches for programming parallel virtual machines are presented, and the basics of cluster application development are explained. Through an easy-to-understand overview of multithreaded programming, this book also shows you how to write software components that work together over a network to solve problems and do work.

Parallel and Distributed Programming Using C++ provides an architectural approach to parallel programming for computer programmers, software developers, designers, researchers, and software architects. It will also be useful for computer science students.

  • Demonstrates how agents and blackboards can be used to make parallel programming easier
  • Shows object-oriented approaches to multitasking and multithreading
  • Demonstrates how the UML is used to document designs that require parallel or distributed programming
  • Contains the new POSIX/UNIX IEEE Standard for the Pthreads library

Table of Contents

Preface.


1. The Joys of Concurrent Programming.

What is Concurrency? The Benefits of Parallel Programming. The Benefits of Distributed Programming. The Minimal Effort Required. The Basic Layers of Software Concurrency. No Keyword Support for Parallelism in C++. Programming Environments for Parallel and Distributed Programming. Summary—Toward Concurrency.



2. The Challenges of Parallel and Distributed Programming.

The Big Paradigm Shift. Coordination Challenges. Sometimes Hardware Fails and Software Quits. Too Much Parallelization or Distribution Can Have Negative Consequences. Selecting a Good Architecture Requires Research. Different Techniques for Testing and Debugging are Required. The Parallel or Distributed Design Must Be Communicated. Summary.



3. Dividing C++ Programs into Multiple Tasks.

Process: A Definition. Anatomy of a Process. Process States. Process Scheduling. Context Switching. Creating a Process. Terminating a Process. Process Resources. What are Asynchronous and Synchronous Processes? Dividing the Program into Tasks. Summary.



4. Dividing C++ Programs into Multiple Threads.

Threads: A Definition. The Anatomy of a Thread. Thread Scheduling. Thread Resources. Thread Models. Introduction to the Pthread Library. The Anatomy of a Simple Threaded Program. Creating Threads. Managing Threads. Thread Safety and Libraries. Dividing Your Program into Multiple Threads. Summary.



5. Synchronizing Concurrency between Tasks.

Coordinating Order of Execution. Synchronizing Access to Data. What are Semaphores? Synchronization: An Object-Oriented Approach. Summary.



6. Adding Parallel Programming Capabilities to C++ through the PVM.

The Classic Parallelism Models Supported by PVM. The PVM Library for C++. The Basic Mechanics of the PVM. Accessing Standard Input (stdin) and Standard Output (stdout) within PVM Tasks. Summary.



7. Error Handling, Exceptions, and Software Reliability.

What is Software Reliability? Failures in Software Layers and Hardware Components. Definitions of Defects Depend on Software Specifications. Recognizing Where to Handle Defects versus Where to Handle Exceptions. Software Reliability: A Simple Plan. Using Map Objects in Error Handling. Exception Handling Mechanisms in C++. Event Diagrams, Logic Expressions, and Logic Diagrams. Summary.



8. Distributed Object-Oriented Programming in C++.

Decomposition and Encapsulation of the Work. Accessing Objects in Other Address Spaces. The Anatomy of a Basic CORBA Consumer. The Anatomy of a CORBA Producer. The Basic Blueprint of a CORBA Application. The Naming Service. A Closer Look at Object Adapters. Implementation and Interface Repositories. Simple Distributed Web Services Using CORBA. The Trading Service. The Client/Server Paradigm. Summary.



9. SPMD and MPMD Using Templates and the MPI.

Work Breakdown Structure for the MPI. Using Template Functions to Represent MPI Tasks. Simplifying MPI Communications. Summary.



10. Visualizing Concurrent and Distributed System Design.

Visualizing Structures. Visualizing Concurrent Behavior. Visualizing the Whole System. Summary.



11. Designing Components That Support Concurrency.

Taking Advantage of Interface Classes. A Closer Look at Object-Oriented Mutual Exclusion and Interface Classes. Maintaining the Stream Metaphor. User-Defined Classes Designed to Work with PVM Streams. Object-Oriented Pipes and fifos as Low-Level Building Blocks. Framework Classes Components for Concurrency. Summary.



12. Implementing Agent-Oriented Architectures.

What are Agents? What is Agent-Oriented Programming? Basic Agent Components. Implementing Agents in C++. Multiagent Systems. Summary.



13. Blackboard Architectures Using PVM, Threads, And C++ Components.

The Blackboard Model. Approaches to Structuring the Blackboard. The Anatomy of a Knowledge Source. The Control Strategies for Blackboards. Implementing the Blackboard Using CORBA Objects. Implementing the Blackboard Using Global Objects. Activating Knowledge Sources Using Pthreads. Summary.



Appendix A.

Class and Object Diagrams. Interaction Diagrams. State Diagrams. Package Diagrams.



Appendix B.


Bibliography.


Index.

商品描述(中文翻譯)

《使用C++進行並行和分散式編程》提供了一個近距離觀察如何構建能夠利用多處理器計算機的軟件。本書介紹了編程並行虛擬機的簡單方法,並解釋了集群應用程序開發的基礎知識。通過對多線程編程的易於理解的概述,本書還向您展示如何編寫能夠在網絡上協同解決問題和完成工作的軟件組件。

《使用C++進行並行和分散式編程》提供了一種面向計算機程序員、軟件開發人員、設計師、研究人員和軟件架構師的並行編程的架構方法。對於計算機科學學生也很有用。

本書演示了如何使用代理和黑板來使並行編程更加容易,展示了面向對象的多任務和多線程方法,演示了如何使用UML來記錄需要並行或分散式編程的設計,包含了新的POSIX/UNIX IEEE標準的Pthreads庫。

《目錄》

《前言》

1. 並發編程的樂趣

什麼是並發性?並行編程的好處。分散式編程的好處。所需的最小努力。軟件並發的基本層次。C++中並行性的關鍵字支持。並行和分散式編程的編程環境。總結-邁向並發性。

2. 並行和分散式編程的挑戰

巨大的範式轉變。協調挑戰。有時硬件失敗和軟件退出。過多的並行化或分散化可能帶來負面影響。選擇一個好的架構需要進行研究。需要不同的測試和調試技術。必須傳達並行或分散式設計。總結。

3. 將C++程序分為多個任務

進程:定義。進程的結構。進程狀態。進程調度。上下文切換。創建進程。終止進程。進程資源。什麼是異步和同步進程?將程序分為任務。總結。

4. 將C++程序分為多個線程

線程:定義。線程的結構。線程調度。線程資源。線程模型。介紹Pthread庫。簡單線程程序的結構。創建線程。管理線程。線程安全和庫。將程序分為多個線程。總結。

5. 在任務之間同步並發性

協調執行順序。同步訪問數據。什麼是信號量?同步:面向對象的方法。總結。

6. 通過PVM為C++添加並行編程能力

PVM支持的經典並行模型。C++的PVM庫。PVM的基本機制。在PVM任務中訪問標準輸入(stdin)和標準輸出(stdout)。總結。

7. 錯誤處理、異常和軟件可靠性

什麼是軟件可靠性?軟件層和硬件組件中的故障。缺陷的定義取決於軟件規格。識別在哪裡處理缺陷與在哪裡處理異常。軟件可靠性:一個簡介。