Skip to content
Scan a barcode
Scan
Paperback Pthreads Programming: A Posix Standard for Better Multiprocessing Book

ISBN: 1565921151

ISBN13: 9781565921153

Pthreads Programming: A Posix Standard for Better Multiprocessing

Select Format

Select Condition ThriftBooks Help Icon

Recommended

Format: Paperback

Condition: Very Good

$4.79
Save $35.20!
List Price $39.99
Almost Gone, Only 2 Left!

Book Overview

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

5 ratings

Walk before you run

With all the sophisticated tools available today such as OpenMP, this book may seem quaint. However, before grasping at concepts or just using tools without any understanding or their makeup 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 site 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 are 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 many 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)

Excellent book overall, with some minor errors

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

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!

I think it provides a good overview

I agree with the other reviews that it's not the ultimate authority on pthreads, but I think it provides a great overview from a very practical standpoint. It has lots of good discussions on when to use threads, general design priniciples of using threads, problems you will likely encounter, and discussions of performance. It also has some good examples, including an example of how to turn some non-thread-safe linked list code into thread-safe code. I really like that its brief and doesn't go into too many details -- you can read it from cover to cover. If you want more details, you will want to refer to one of the other books that the other reviewers have mentioned.

Second best book on the subject

As usual, O'Reilly have produced an excellent reference book. In a few respects, this book is preferable to Scott Norton's "Thread Time" - it has better examples, for one.But this book is not as detailed or complete as Norton, so I don't recommend it as the best choice on the subject.
Copyright © 2025 Thriftbooks.com Terms of Use | Privacy Policy | Do Not Sell/Share My Personal Information | Cookie Policy | Cookie Preferences | Accessibility Statement
ThriftBooks ® and the ThriftBooks ® logo are registered trademarks of Thrift Books Global, LLC
GoDaddy Verified and Secured