Pthreads Programming: A POSIX Standard for Better Multiprocessing (O'Reilly Nutshell) | 
enlarge | Authors: Bradford Nichols, Dick Buttlar, Jacqueline Proulx Farrell Publisher: O'Reilly Media, Inc. Category: Book
Buy New: $86.13
New (2) Used (9) from $19.99
Avg. Customer Rating: 11 reviews Sales Rank: 189369
Media: Paperback Edition: 1 Number Of Items: 1 Pages: 286 Shipping Weight (lbs): 1.1 Dimensions (in): 9.1 x 7 x 0.8
ISBN: 1565921151 Dewey Decimal Number: 004 EAN: 9781565921153 ASIN: 1565921151
Publication Date: September 1, 1996 Availability: Usually ships in 1-2 business days Shipping: International shipping available Condition: Book is brand new, and has never been opened. Thousands of satisfied customers!
|
| Also Available In:
|
| Similar Items:
|
| Editorial Reviews:
Product Description Computers are just as busy as the rest of us nowadays. They have lots of tasks to do at once, and need some cleverness to get them all done at the same time. That's why threads are seen more and more often as a new model for programming. Threads have been available for some time. The Mach operating system, the Distributed Computer Environment (DCE), and Windows NT all feature threads. One advantage of most UNIX implementations, as well as DCE, is that they conform to a recently ratified POSIX standard (originally 1003.4a, now 1003.1c), which allows your programs to be portable between them. POSIX threads are commonly known as pthreads, after the word that starts all the names of the function calls. The standard is supported by Solaris, OSF/1, AIX, and several other UNIX-based operating systems. The idea behind threads programming is to have multiple tasks running concurrently within the same program. They can share a single CPU as processes do, or take advantage of multiple CPUs when available. In either case, they provide a clean way to divide the tasks of a program while sharing data. A window interface can read input on dozens of different buttons, each responsible for a separate task. A network server has to accept simultaneous calls from many clients, providing each with reasonable response time. A multiprocessor runs a number-crunching program on several CPUs at once, combining the results when all are done. All these kinds of applications can benefit from threads. In this book you will learn not only what the pthread calls are, but when it is a good idea to use threads and how to make them efficient (which is the whole reason for using threads in the first place). The authors delves into performance issues, comparing threads to processes, contrasting kernel threads to user threads, and showing how to measure speed. He also describes in a simple, clear manner what all the advanced features are for, and how threads interact with the rest of the UNIX system. Topics include: - Basic design techniques
- Mutexes, conditions, and specialized synchronization techniques
- Scheduling, priorities, and other real-time issues
- Cancellation
- UNIX libraries and re-entrant routines
- Signals
- Debugging tips
- Measuring performance
- Special considerations for the Distributed Computing Environment (DCE)
|
| Customer Reviews: Read 6 more reviews...
Walk before you run September 15, 2008 With all the sophisticated tools available today such as OpenMP, this book may seem quaint. However before grasping at concepts or just using tools with out any understanding or their make up it would be wise to add this to your learning curve.
This book gives a good basic understanding of Pthreads. Of course you will later have to apply it to the real world but as a learning tool this is pretty darn good. The website or path on the sight has changed since publication; but the examples are still there. Because I am using AIX it does take a little time to convert from a gcc format to an AIX format. Then a little more time to apply AIX specific advantages.
As you go from the front of the book to the end the samples get added to and new concepts become available. There are plenty of diagrams for the visual learner. I personally found the signal handling of great use.
Any way this book is not the end-all, be-all, of threads but it sure cleared a lot of concepts up for me.
1.Why Pthreads 2.Designing threaded programs 3.Synchronizing Pthreads 4.Managing Pthreads 5.Pthreads and UNIX 6.practical Considerations
Using OpenMP: Portable Shared Memory Parallel Programming (Scientific and Engineering Computation)
Good for learning the basics but incomplete for modern multithreading programming August 16, 2007 This book does a nice job for describing the pthread API. When I have read this book, my multithread programming experience was mainly with Win32 threads and reading this book was my first exposure to the condition synchronization objects. With the help of this book, it has been a breeze to learn how to use conditions. What is missing from this book written 10 years ago, which is also missing in all multithread books that I have read of that era, is coverage on issues with parallel processing. If all you have to do with threads is to launch a background job while keeping UI responsive or asynchronous I/O on a single core processor, you will be fine with this book.
However, if you try to crunch an array of data with multiple threads each processing their own chunk of the array, you could fall into cache line alignment problems even if your threads does not access the same memory locations. Those problems are platform dependant. I have written such a program that was working wonderfully well with a Sparc station and a PowerPC based station but once ported to a x86 architecture, the program was actually becoming slower than the single thread version. It is very hard to get it right. You have to be careful about the array alignment in memory and where the boundaries of the chunks of data that you assign to threads are. What will happen if 2 threads located on 2 different processors access to the same cache line is that one processor will have to flush that cache line back to the main memory and the other processor will have to fetch the values back from the main memory to its cache. The overhead of this is so huge that processing the array from a single thread could be faster.
I still have to find a book that addresses these problems. I expect it to come soon with dual and quad core processors becoming mainstream but this is not this book.
Excellent book overall, with some minor errors June 24, 2006 1 out of 2 found this review helpful
This is the best Pthreads book. The writing style is conversational, very easy to read and interlaced with code examples. The reader will progressively learn the subject, building on the accumulated knowledge. Coverage of multi-theading concepts is very complete. There are some excellent diagrams.
Despite the publication date, this book is still very much relevant, because the Pthreads standard has not undergone any substantive change since then.
There are the usual O'Reilly book problems: a few typos and some errors in the example source code. The source code errors will cause problems for inexperienced programmers (they may think they, not the bad code, are the cause of the problems). There are a few places where a more complete explanation would have been nice. Despite these problems, overall the book is excellent. Don't take my word for it, compare it to other Pthreads books and you'll immediately see the difference.
Enjoy!
Adrien Lamothe
Excelent book to get you started with Pthreads April 21, 2005 2 out of 7 found this review helpful
The book along with the code examples provided in O'reilly's web site provide an excelent starting point to the Pthreads programmer.
It's not a reference book, and don't ask me why I rated it 5 stars,
It also presents Pthreads and multithreading in a passionate way as if to convince the reader that multithreading is the way to go.
And it is!
o'reilly should be embarrased!! September 28, 2002 2 out of 9 found this review helpful
I read the book a number of years ago to learn pthreads. I found numerous errors in the examples -- speaking at work to a colleague I recall we laughed at this book -- It was such a disaster.I may read the book again (over the last few years I learned a lot about pthreads) and give a careful analysis of it. I had a first printing -- there were gobs of errata on Oreilly's site -- maybe they put in enough corrections so the examples run -- but I'm amazed how shoddy the first printing was. Stay away from it...
|
|
|