Muutke küpsiste eelistusi

E-raamat: Introduction to Parallel Programming

(University of San Francisco, USA)
  • Formaat: PDF+DRM
  • Ilmumisaeg: 17-Feb-2011
  • Kirjastus: Morgan Kaufmann Publishers In
  • Keel: eng
  • ISBN-13: 9780080921440
  • Formaat - PDF+DRM
  • Hind: 64,14 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: PDF+DRM
  • Ilmumisaeg: 17-Feb-2011
  • Kirjastus: Morgan Kaufmann Publishers In
  • Keel: eng
  • ISBN-13: 9780080921440

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Designed as a course for college freshmen in computer science programs, this volume presents the basic functions of parallel computing for beginner level programmers. Noting that many computer science curricula never explore the potential processing power available in most modern personal computer's multi-core processors, this text provides accessible information on using MPI, Pthreads and OpenMP, three popular muti-thread APIs, combined with basic C programming, to teach students about maximizing performance across processing cores when their applications require more computational power. The work includes numerous illustrations and code examples and access to additional online resources is provided. While written for beginning programmers this volume provides a concise introduction to the topic that would be of interest to higher level students or professionals that have not received specific instruction on parallel programming. Annotation ©2011 Book News, Inc., Portland, OR (booknews.com)

Arvustused

"Pacheco succeeds in introducing the reader to the key issues and considerations in parallel programming. The simplicity of the examples allows the reader to focus on parallel programming aspects rather than application logic. Including both MPI and Pthreads/OpenMP is a good way to illustrate the differences between message passing and shared-memory programming models. The discussions about analyzing the scalability and efficiency of the resulting parallel programs present a key aspect of developing real parallel programs. Finally, working through the same examples using all three facilities helps make this even more concrete." --W. Hu, ComputingReviews.com

"This is a well-written book, appropriately targeted at junior undergraduates. Being easily digestible, it makes the difficult task of parallel programming come across a lot less daunting than I have seen in other texts. Admittedly, it is light on theory; however, the most memorable lessons in parallel programming are those learned from mistakes made. With over 100 programming exercises, learning opportunities abound." --Bernard Kuc, ACMs Computing Reviews.com

"With the coming of multicore processors and the cloud, parallel computing is most certainly not a niche area off in a corner of the computing world. Parallelism has become central to the efficient use of resources, and this new textbook by Peter Pacheco will go a long way toward introducing students early in their academic careers to both the art and practice of parallel computing." --Duncan Buell, Department of Computer Science and Engineering, University of South Carolina

"An Introduction to Parallel Programming illustrates fundamental programming principles in the increasingly important area of shared memory programming using Pthreads and OpenMP and distributed memory programming using MPI. More importantly, it emphasizes good programming practices by indicating potential performance pitfalls. These topics are presented in the context of a variety of disciplines including computer science, physics and mathematics. The chapters include numerous programming exercises that range from easy to very challenging. This is an ideal book for students or professionals looking to learn parallel programming skills or to refresh their knowledge." --Leigh Little, Department of Computational Science, The College at Brockport, The State University of New York

"An Introduction to Parallel Programming is a well written, comprehensive book on the field of parallel computing. Students and practitioners alike will appreciate the relevant, up-to-date information. Peter Pachecos very accessible writing style combined with numerous interesting examples keeps the readers attention. In a field that races forward at a dizzying pace, this book hangs on for the wild ride covering the ins and outs of parallel hardware and software." --Kathy J. Liszka, Department of Computer Science, University of Akron

"Parallel computing is the future and this book really helps introduce this complicated subject with practical and useful examples." --Andrew N. Sloss FBCS, Consultant Engineer, ARM, Author of ARM System Developers Guide

Muu info

The first true undergraduate text in parallel programming, covering OpenMP, MPI, and Pthreads
Preface xv
Acknowledgments xviii
About the Author xix
Chapter 1 Why Parallel Computing?
1(14)
1.1 Why We Need Ever-Increasing Performance
2(1)
1.2 Why We're Building Parallel Systems
3(1)
1.3 Why We Need to Write Parallel Programs
3(3)
1.4 How Do We Write Parallel Programs?
6(2)
1.5 What We'll Be Doing
8(1)
1.6 Concurrent, Parallel, Distributed
9(1)
1.7 The Rest of the Book
10(1)
1.8 A Word of Warning
10(1)
1.9 Typographical Conventions
11(1)
1.10 Summary
12(1)
1.11 Exercises
12(3)
Chapter 2 Parallel Hardware and Parallel Software
15(68)
2.1 Some Background
15(3)
2.1.1 The von Neumann architecture
15(2)
2.1.2 Processes, multitasking, and threads
17(1)
2.2 Modifications to the von Neumann Model
18(11)
2.2.1 The basics of caching
19(1)
2.2.2 Cache mappings
20(2)
2.2.3 Caches and programs: an example
22(1)
2.2.4 Virtual memory
23(2)
2.2.5 Instruction-level parallelism
25(3)
2.2.6 Hardware multithreading
28(1)
2.3 Parallel Hardware
29(18)
2.3.1 SIMD systems
29(3)
2.3.2 MIMD systems
32(3)
2.3.3 Interconnection networks
35(8)
2.3.4 Cache coherence
43(3)
2.3.5 Shared-memory versus distributed-memory
46(1)
2.4 Parallel Software
47(9)
2.4.1 Caveats
47(1)
2.4.2 Coordinating the processes/threads
48(1)
2.4.3 Shared-memory
49(4)
2.4.4 Distributed-memory
53(3)
2.4.5 Programming hybrid systems
56(1)
2.5 Input and Output
56(2)
2.6 Performance
58(7)
2.6.1 Speedup and efficiency
58(3)
2.6.2 Amdahl's law
61(1)
2.6.3 Scalability
62(1)
2.6.4 Taking timings
63(2)
2.7 Parallel Program Design
65(5)
2.7.1 An example
66(4)
2.8 Writing and Running Parallel Programs
70(1)
2.9 Assumptions
70(1)
2.10 Summary
71(6)
2.10.1 Serial systems
71(2)
2.10.2 Parallel hardware
73(1)
2.10.3 Parallel software
74(1)
2.10.4 Input and output
75(1)
2.10.5 Performance
75(1)
2.10.6 Parallel program design
76(1)
2.10.7 Assumptions
76(1)
2.11 Exercises
77(6)
Chapter 3 Distributed-Memory Programming with MPI
83(68)
3.1 Getting Started
84(10)
3.1.1 Compilation and execution
84(2)
3.1.2 MPI programs
86(1)
3.1.3 MP I_I nit and MP I_Finalize
86(1)
3.1.4 Communicators, MP I_Comm_size and MP I_Comm_rank
87(1)
3.1.5 SPMD programs
88(1)
3.1.6 Communication
88(1)
3.1.7 MPI_Send
88(2)
3.1.8 MPI_Recv
90(1)
3.1.9 Message matching
91(1)
3.1.10 The status_p argument
92(1)
3.1.11 Semantics of MPI_Send and MPI_Recv
93(1)
3.1.12 Some potential pitfalls
94(1)
3.2 The Trapezoidal Rule in MPI
94(3)
3.2.1 The trapezoidal rule
94(2)
3.2.2 Parallelizing the trapezoidal rule
96(1)
3.3 Dealing with I/O
97(4)
3.3.1 Output
97(3)
3.3.2 Input
100(1)
3.4 Collective Communication
101(15)
3.4.1 Three-structured communication
102(1)
3.4.2 MP I_Reduce
103(2)
3.4.3 Collective vs. point-to-point communications
105(1)
3.4.4 MPI_All reduce
106(1)
3.4.5 Broadcast
106(3)
3.4.6 Data distributions
109(1)
3.4.7 Scatter
110(2)
3.4.8 Gather
112(1)
3.4.9 Allgather
113(3)
3.5 MPI Derived Datatypes
116(3)
3.6 Performance Evaluation of MPI Programs
119(8)
3.6.1 Taking timings
119(3)
3.6.2 Results
122(3)
3.6.3 Speedup and efficiency
125(1)
3.6.4 Scalability
126(1)
3.7 A Parallel Sorting Algorithm
127(9)
3.7.1 Some simple serial sorting algorithms
127(2)
3.7.2 Parallel odd-even transposition sort
129(3)
3.7.3 Safety in MPI programs
132(2)
3.7.4 Final details of parallel odd-even sort
134(2)
3.8 Summary
136(4)
3.9 Exercises
140(7)
3.10 Programming Assignments
147(4)
Chapter 4 Shared-Memory Programming with Pthreads
151(58)
4.1 Processes, Threads, and Pthreads
151(2)
4.2 Hello, World
153(6)
4.2.1 Execution
153(2)
4.2.2 Preliminaries
155(1)
4.2.3 Starting the threads
156(1)
4.2.4 Running the threads
157(1)
4.2.5 Stopping the threads
158(1)
4.2.6 Error checking
158(1)
4.2.7 Other approaches to thread startup
159(1)
4.3 Matrix-Vector Multiplication
159(3)
4.4 Critical Sections
162(3)
4.5 Busy-Waiting
165(3)
4.6 Mutexes
168(3)
4.7 Producer-Consumer Synchronization and Semaphores
171(5)
4.8 Barriers and Condition Variables
176(5)
4.8.1 Busy-waiting and a mutex
177(1)
4.8.2 Semaphores
177(2)
4.8.3 Condition variables
179(2)
4.8.4 Pthreads barriers
181(1)
4.9 Read-Write Locks
181(9)
4.9.1 Linked list functions
181(2)
4.9.2 A multi-threaded linked list
183(4)
4.9.3 Pthreads read-write locks
187(1)
4.9.4 Performance of the various implementations
188(2)
4.9.5 Implementing read-write locks
190(1)
4.10 Caches, Cache Coherence, and False Sharing
190(5)
4.11 Thread-Safety
195(3)
4.11.1 Incorrect programs can produce correct output
198(1)
4.12 Summary
198(2)
4.13 Exercises
200(6)
4.14 Programming Assignments
206(3)
Chapter 5 Shared-Memory Programming with OpenMP
209(62)
5.1 Getting Started
210(6)
5.1.1 Compiling and running OpenMP programs
211(1)
5.1.2 The program
212(3)
5.1.3 Error checking
215(1)
5.2 The Trapezoidal Rule
216(4)
5.2.1 A first OpenMP version
216(4)
5.3 Scope of Variables
220(1)
5.4 The Reduction Clause
221(3)
5.5 The parallel for Directive
224(8)
5.5.1 Caveats
225(2)
5.5.2 Data dependences
227(1)
5.5.3 Finding loop-carried dependences
228(1)
5.5.4 Estimating π
229(2)
5.5.5 More on scope
231(1)
5.6 More About Loops in OpenMP: Sorting
232(4)
5.6.1 Bubble sort
232(1)
5.6.2 Odd-even transposition sort
233(3)
5.7 Scheduling Loops
236(5)
5.7.1 The schedule clause
237(1)
5.7.2 The static schedule type
238(1)
5.7.3 The dynamic and guided schedule types
239(1)
5.7.4 The runtime schedule type
239(2)
5.7.5 Which schedule?
241(1)
5.8 Producers and Consumers
241(10)
5.8.1 Queues
241(1)
5.8.2 Message-passing
242(1)
5.8.3 Sending messages
243(1)
5.8.4 Receiving messages
243(1)
5.8.5 Termination detection
244(1)
5.8.6 Startup
244(1)
5.8.7 The atomic directive
245(1)
5.8.8 Critical sections and locks
246(2)
5.8.9 Using locks in the message-passing program
248(1)
5.8.10 Critical directives, atomic directives, or locks?
249(1)
5.8.11 Some caveats
249(2)
5.9 Caches, Cache Coherence, and False Sharing
251(5)
5.10 Thread-Safety
256(3)
5.10.1 Incorrect programs can produce correct output
258(1)
5.11 Summary
259(4)
5.12 Exercises
263(4)
5.13 Programming Assignments
267(4)
Chapter 6 Parallel Program Development
271(82)
6.1 Two n-Body Solvers
271(28)
6.1.1 The problem
271(2)
6.1.2 Two serial programs
273(4)
6.1.3 Parallelizing the n-body solvers
277(3)
6.1.4 A word about I/O
280(1)
6.1.5 Parallelizing the basic solver using OpenMP
281(3)
6.1.6 Parallelizing the reduced solver using OpenMP
284(4)
6.1.7 Evaluating the OpenMP codes
288(1)
6.1.8 Parallelizing the solvers using pthreads
289(1)
6.1.9 Parallelizing the basic solver using MPI
290(2)
6.1.10 Parallelizing the reduced solver using MPI
292(5)
6.1.11 Performance of the MPI solvers
297(2)
6.2 Tree Search
299(36)
6.2.1 Recursive depth-first search
302(1)
6.2.2 Nonrecursive depth-first search
303(2)
6.2.3 Data structures for the serial implementations
305(1)
6.2.4 Performance of the serial implementations
306(1)
6.2.5 Parallelizing tree search
306(3)
6.2.6 A static parallelization of tree search using pthreads
309(1)
6.2.7 A dynamic parallelization of tree search using pthreads
310(5)
6.2.8 Evaluating the pthreads tree-search programs
315(1)
6.2.9 Parallelizing the tree-search programs using OpenMP
316(2)
6.2.10 Performance of the OpenMP implementations
318(1)
6.2.11 Implementation of tree search using MPI and static partitioning
319(8)
6.2.12 Implementation of tree search using MPI and dynamic partitioning
327(8)
6.3 A Word of Caution
335(1)
6.4 Which API?
335(1)
6.5 Summary
336(5)
6.5.1 Pthreads and OpenMP
337(1)
6.5.2 MPI
338(3)
6.6 Exercises
341(9)
6.7 Programming Assignments
350(3)
Chapter 7 Where to Go from Here
353(4)
References 357(4)
Index 361
Peter Pacheco received a PhD in mathematics from Florida State University. After completing graduate school, he became one of the first professors in UCLAs Program in Computing,” which teaches basic computer science to students at the College of Letters and Sciences there. Since leaving UCLA, he has been on the faculty of the University of San Francisco. At USF Peter has served as chair of the computer science department and is currently chair of the mathematics department.His research is in parallel scientific computing. He has worked on the development of parallel software for circuit simulation, speech recognition, and the simulation of large networks of biologically accurate neurons. Peter has been teaching parallel computing at both the undergraduate and graduate levels for nearly twenty years. He is the author of Parallel Programming with MPI, published by Morgan Kaufmann Publishers.