Multicore Application Programming: for Windows, Linux, and Oracle Solaris
- By Darryl Gove
- Published Nov 9, 2010 by Addison-Wesley Professional. Part of the Developer's Library series.
- Copyright 2011
- Dimensions: 7" x 9"
- Pages: 480
- Edition: 1st
- ISBN-10: 0-321-71137-8
- ISBN-13: 978-0-321-71137-3
- eBook (Watermarked)
- ISBN-10: 0-321-71140-8
- ISBN-13: 978-0-321-71140-3
Register your product to gain access to bonus material or receive a coupon.
Product Author Bios
Darryl Gove is a senior principal software engineer in the Oracle Solaris Studio compiler team. He works on the analysis, parallelization, and optimization of both applications and benchmarks. Darryl has a master’s degree and a doctorate in operational research from the University of Southampton, UK. He is the author of the books Solaris Application Programming (Prentice Hall, 2008) and The Developer’s Edge (Sun Microsystems, 2009), as well as a contributor to the book OpenSPARC Internals (lulu.com, 2008). He writes regularly about optimization and coding and maintains a blog at www.darrylgove.com.
Write High-Performance, Highly Scalable Multicore Applications for Leading Platforms
Multicore Application Programming is a comprehensive, practical guide to high-performance multicore programming that any experienced developer can use.
Author Darryl Gove covers the leading approaches to parallelization on Windows, Linux, and Oracle Solaris. Through practical examples, he illuminates the challenges involved in writing applications that fully utilize multicore processors, helping you produce applications that are functionally correct, offer superior performance, and scale well to eight cores, sixteen cores, and beyond.
The book reveals how specific hardware implementations impact application performance and shows how to avoid common pitfalls. Step by step, you’ll write applications that can handle large numbers of parallel threads, and you’ll master advanced parallelization techniques. You’ll learn how to
- Identify your best opportunities to use parallelism
- Share data safely between multiple threads
- Write applications using POSIX or Windows threads
- Hand-code synchronization and sharing
- Take advantage of automatic parallelization and OpenMP
- Overcome common obstacles to scaling
- Apply new approaches to writing correct, fast, scalable parallel code
Multicore Application Programming isn’t wedded to a single approach or platform: It is for every experienced C programmer working with any contemporary multicore processor in any leading operating system environment.
6 of 6 people found the following review helpful
Amazon Verified Purchase(What's this?)
This review is from: Multicore Application Programming: for Windows, Linux, and Oracle Solaris (Developer's Library) (Paperback)Here is an author who is not only the consummate expert we expect when we buy such a book, but is likewise both an excellent writer and teacher. Technical material is presented in perfectly sized and easy to digest chunks, you will find no academic puffery here. Code examples are painstakingly minimal, so as to be easily and immediately grasped and to complement the text, rather than interrupt it. Would that more technical texts were presented this well, a real gem here.
5 of 6 people found the following review helpful
Very good book with an odd Solaris bias,
Amazon Verified Purchase(What's this?)
This review is from: Multicore Application Programming: for Windows, Linux, and Oracle Solaris (Developer's Library) (Paperback)Notice that the title contains "for Windows, Linux, and Oracle(r) Solaris" not "for Microsoft(r) Windows, Linux, and Oracle(r) Solaris". The author works for Oracle (via Sun). This results in an odd and at times distracting bias in the text. For example, in Chapter 1, the UltraSPARC T2 (aka niagara2) is used as the example modern processor instead of say the Intel CoreI7 (aka nehalem, westmere). Then there are many references to the Sun Studio compiler and specific compiler options. Yes, gcc and icc are covered although often after Sun Studio. The coverage of Oracle/Sun in this book does not match current market share, and sadly probably does not match future market share.
Bias aside, this is a very good book on practical multicore programming. Read the other two (as of this writing) reviews. They lay it on a bit thick, but I basically agree. My one gripe is that the author is overly fond of automatic parallelization and Sun Studio's autopar. Having used a Sun... Read more
1 of 1 people found the following review helpful
Great overview of a broad topic,
This review is from: Multicore Application Programming: for Windows, Linux, and Oracle Solaris (Developer's Library) (Paperback)Browsing through this book at the local bookstore, I found it to be a suitable road map for learning how to program multicore systems. There are several topics and technologies in this subject, and the book covers them broadly. I say this because the reader has to pursue each topic in depth through other resources. These are highlighted in the references section. (For example, to learn POSIX threads programming, I've followed through by studying Robbins and Robbins' "UNIX System Programming" and Kerrisk's "The Linux Programming Interface". As both these in turn point to Butenhof's book, I'll probably follow the trail there too ...) Thorough details on such things as NPTL, to the niggler's delight, are found beyond Gove's book.
"Multicore Application Programming" is useful for the aspiring system programmer.
› See all 4 customer reviews...
Online Sample Chapter
Table of Contents
About the Author xxi
Chapter 1: Hardware, Processes, and Threads 1
Examining the Insides of a Computer 1
The Motivation for Multicore Processors 3
The Characteristics of Multiprocessor Systems 18
The Translation of Source Code to Assembly Language 21
Chapter 2: Coding for Performance 31
Defining Performance 31
Understanding Algorithmic Complexity 33
How Structure Impacts Performance 39
The Role of the Compiler 60
Identifying Where Time Is Spent Using Profiling 74
How Not to Optimize 80
Performance by Design 82
Chapter 3: Identifying Opportunities for Parallelism 85
Using Multiple Processes to Improve System Productivity 85
Multiple Users Utilizing a Single System 87
Improving Machine Efficiency Through Consolidation 88
Using Parallelism to Improve the Performance of a Single Task 92
Parallelization Patterns 100
How Dependencies Influence the Ability Run Code in Parallel 110
Identifying Parallelization Opportunities 118
Chapter 4: Synchronization and Data Sharing 121
Data Races 121
Synchronization Primitives 126
Deadlocks and Livelocks 132
Communication Between Threads and Processes 133
Storing Thread-Private Data 141
Chapter 5: Using POSIX Threads 143
Creating Threads 143
Compiling Multithreaded Code 151
Process Termination 153
Sharing Data Between Threads 154
Variables and Memory 175
Multiprocess Programming 179
Reentrant Code and Compiler Flags 197
Chapter 6: Windows Threading 199
Creating Native Windows Threads 199
Methods of Synchronization and Resource Sharing 208
Wide String Handling in Windows 221
Creating Processes 222
Atomic Updates of Variables 238
Allocating Thread-Local Storage 240
Setting Thread Priority 242
Chapter 7: Using Automatic Parallelization and OpenMP 245
Using Automatic Parallelization to Produce a Parallel Application 245
Using OpenMP to Produce a Parallel Application 256
Ensuring That Code in a Parallel Region Is Executed in Order 285
Collapsing Loops to Improve Workload Balance 286
Enforcing Memory Consistency 287
An Example of Parallelization 288
Chapter 8: Hand-Coded Synchronization and Sharing 295
Atomic Operations 295
Operating System–Provided Atomics 309
Lockless Algorithms 312
Chapter 9: Scaling with Multicore Processors 333
Constraints to Application Scaling 333
Hardware Constraints to Scaling 352
Operating System Constraints to Scaling 369
Multicore Processors and Scaling 380
Chapter 10: Other Parallelization Technologies 383
GPU-Based Computing 383
Language Extensions 386
Alternative Languages 399
Clustering Technologies 402
Transactional Memory 407
Chapter 11: Concluding Remarks 411
Writing Parallel Applications 411
Parallel Code on Multicore Processors 414
The Future 416
Download the sample pages (includes Chapter 3 and Index)
This book includes free shipping!
This book includes free shipping!
Get access to thousands of books and training videos about technology, professional development and digital media from more than 40 leading publishers, including Addison-Wesley, Prentice Hall, Cisco Press, IBM Press, O'Reilly Media, Wrox, Apress, and many more. If you continue your subscription after your 30-day trial, you can receive 30% off a monthly subscription to the Safari Library for up to 12 months. That's a total savings of $199.