Truck Month Best Books of the Month Shop Women's Maxi Dresses Shop Women's Maxi Dresses Shop Women's Cloud Drive Photos nav_sap_cbcc_6_fly_beacon Blur Amazon Fire Phone, now available unlocked Amazon Fire TV Beauty Sale Mother's Day Gifts in Home and Kitchen Shop all services Learn More Fifty Shades of Grey Fifty Shades of Grey Fifty Shades of Grey $25 Off Fire HD 6 Kids Edition Kindle Paperwhite Today's Deals in Music Spring Running Event Star Wars Store
PThreads Programming: A POSIX Standard for Better Multipr... and over one million other books are available for Amazon Kindle. Learn more
Qty:1
  • List Price: $39.99
  • Save: $11.18 (28%)
FREE Shipping on orders over $35.
In Stock.
Ships from and sold by Amazon.com.
Gift-wrap available.
PThreads Programming: A P... has been added to your Cart
Used: Like New | Details
Sold by selg
Condition: Used: Like New
Comment: Softcover. Clean and tight. No markings. Eligible for Amazon's Prime and Super Saver shipping programs!
Access codes and supplements are not guaranteed with used items.
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 2 images

PThreads Programming: A POSIX Standard for Better Multiprocessing (A Nutshell handbook) Paperback – September 8, 1996

ISBN-13: 978-1565921153 ISBN-10: 1565921151 Edition: 1st

Buy New
Price: $28.81
36 New from $11.58 59 Used from $0.03
Amazon Price New from Used from
Kindle
"Please retry"
Paperback
"Please retry"
$28.81
$11.58 $0.03
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student


Get Up to 80% Back When You Sell Us Your Books
$28.81 FREE Shipping on orders over $35. In Stock. Ships from and sold by Amazon.com. Gift-wrap available.

Frequently Bought Together

PThreads Programming: A POSIX Standard for Better Multiprocessing (A Nutshell handbook) + Programming with POSIX Threads
Price for both: $78.87

Buy the selected items together
NO_CONTENT_IN_FEATURE

Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Product Details

  • Series: A Nutshell handbook
  • Paperback: 286 pages
  • Publisher: O'Reilly Media; 1 edition (September 11, 1996)
  • Language: English
  • ISBN-10: 1565921151
  • ISBN-13: 978-1565921153
  • Product Dimensions: 7 x 0.6 x 9.2 inches
  • Shipping Weight: 1.1 pounds (View shipping rates and policies)
  • Average Customer Review: 4.0 out of 5 stars  See all reviews (17 customer reviews)
  • Amazon Best Sellers Rank: #730,902 in Books (See Top 100 in Books)
  •  Would you like to update product info, give feedback on images, or tell us about a lower price?


Editorial Reviews

From the Publisher

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)

From the Back Cover

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 becoming a new model for programming. Microsoft Windows NT, the Distributed Computing Environment (DCE), and many UNIX-based operating systems support threads. One advantage of most UNIX and DCE implementations 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. The POSIX threads standard, commonly known as Pthreads, is supported by most UNIX-based operating systems. With threads programming, multiple tasks run concurrently within the same program. They can share a single CPU as processes do or take advantage of multiple CPUs when available. They provide a clean way to divide the tasks of a program while sharing data. In this book you will learn when to use threads and how to make them efficient. The book delves into performance issues, comparing threads to processes, contrasting kernel threads to user threads, and showing how to measure speed. It describes in a simple, clear manner what all the advanced features are for and how threads interact with the rest of the UNIX system.

Customer Reviews

I was able to make use of some of the example code to reshape into my own code framework.
Mitchell J. Mcconnell
All the concepts are explained very nicely and it also explains the tadeoffs between processes/user level thread/kernel level thread.
slk
Of course, you will later have to apply it to the real world but as a learning tool, this is pretty darn good.
bernie

Most Helpful Customer Reviews

26 of 28 people found the following review helpful By From_Plano_TX on June 23, 1999
Format: Paperback
The strength of this book is it's brevity: 233 pp of text plus appendices. But the code samples are incomplete (fragments). You'll be able to get an idea of how pthreads work and the methods available, but you'll have a very hard time if you need to actually write code. There is an error on p.126. If you want to write code, get "Programming with POSIX Threads" by David Butenhof. It has complete code examples and is not that much longer: 305 pp of text plus appendices. But I did find this Nichols book helpful when I was curious about pthreads. I commend O'Reilly for the nice illustrations in this book -- above average. They helped convey concepts.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
18 of 19 people found the following review helpful By A Customer on January 4, 1999
Format: Paperback
Of the 4 I've read on the topic, this is a good book but my personal preference (based on how the information was presented, the relevance of coding examples, etc.) is for the Butenhof Pthreads book (excellent) or the Lewis, et. al. Multithreaded Programming book (also very good).
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
16 of 17 people found the following review helpful By Dan Crevier on September 22, 2000
Format: Paperback
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.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
6 of 6 people found the following review helpful By A Customer on January 3, 1998
Format: Paperback
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.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
12 of 15 people found the following review helpful By Gregorio on May 7, 2001
Format: Paperback
The short code snippets are horrible. If the author wants to save money and space by using code snippets, it should be checked and checked again for accuracy. There are numerous errors in the code. For example, on page 80, there is an example of condition variable usage. However, there are no function prototypes! This is just one of numerous obvious ommissions. Trust me, there are non-obvious errors too. If you're looking for an overview, this will do you fine. However, if you're looking for some decent code examples to look at, I'd suggest Butenhof's book instead.
Multi-threaded programming is difficult enough, why make it harder for yourself?
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
2 of 2 people found the following review helpful By bernie HALL OF FAMETOP 500 REVIEWERVINE VOICE on September 15, 2008
Format: Paperback Verified Purchase
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)
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
3 of 4 people found the following review helpful By David Rajaratnam on September 15, 2001
Format: Paperback
I found it too be an excellent overview. Its treatment of the issues associated with threads and signals I think was especially useful. My only complaint is with the Quick Reference in Appendix C. The reference provides no description of possible function call errors. While I admit the errors are dependant on the particular Pthreads implementation, however there are a core number of errors that would be common throughout all, or at least most, implementations. The point is if you are to do any actual programming, which I presume is the reason for a reference of function calls, you need to know what return values to expect. Providing no reference would have been better then providing a useless one.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
2 of 3 people found the following review helpful By Olivier Langlois on August 15, 2007
Format: Paperback
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.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Most Recent Customer Reviews


What Other Items Do Customers Buy After Viewing This Item?

Set up an Amazon Giveaway

Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
PThreads Programming: A POSIX Standard for Better Multiprocessing (A Nutshell handbook)
This item: PThreads Programming: A POSIX Standard for Better Multiprocessing (A Nutshell handbook)
Price: $28.81
Ships from and sold by Amazon.com