| help | account  


Multithreaded Programming with Pthreads
View Larger Image
Bil Lewis, Daniel J. Berg
Prentice Hall, Paperback, Published December 1997, 382 pages, ISBN 0136807291
List Price: $34.95
Our Price: $18.95
You Save: $16.00 (46% Off)


FREE Shipping on Orders over $40!*
Availability: Out-Of-Stock

Be the First to Write a Review and tell the world about this title!

People who purchase this book frequently purchase:

Books on similar topics, in best-seller order:Books from the same publisher, in best-seller order:

Based on the best-selling Threads Primer, Multithreaded Programming with Pthreads gives you a solid understanding of Posix threads: what they are, how they work, when to use them, and how to optimize them. It retains the clarity and humor of the Primer, but includes expanded comparisons to Win32 and OS/2 implementations. Code examples tested on all of the major UNIX platforms are featured along with detailed explanations of how and why they use threads. In addition to scheduling, synchronization, signal handling, etc., special emphasis is placed on:
  • Cancellation: What does it mean to do bounded-time cancellation? What are the numerous details the programmer must deal with, and how do you avoid using cancellation at all?
  • Error expeditions: What do they all mean and what should you do about them?
  • Performance: How fast can a program run, and what are the limiting factors? Theoretical issues are considered and a case study for NFS is presented.
  • Hardware: A number of machine designs are examined (Sun, SGI, and DEC), focusing on issues of performance, synchronization instructions, bus design, and invalidation techniques.
  • Languages: The use of threads in other languages (Lisp, Eiffel, Smalltalk, etc.) is examined, with special emphasis on C++ and Java.
  • References: Pointers to the newsgroup, FAQs, web pages, code examples, other books, freeware tools, and commercial products are included.
  • More than anything else this is a practical book-it tells you what can and cannot be done with threads and why. In short, everything you need to know to build faster, smarter, multithreaded applications.
  • Author Bio

    BIL LEWIS, formerly with Sun Microsystems, Inc., now consults and teaches multithreaded programming. He is the co-author of Threads Primer: A Guide to Multithreaded Programming (Sun Microsystems Press/Prentice Hall).

    DANIEL J. BERG is the Chief Technology Officer for Sun Microsystems' U.S. Reseller Channel. Mr. Berg has published papers and several books on Sun technologies, including Threads Primer (with Bil Lewis) and Advanced Techniques for Java Developers (Wiley).

Table of Contents

    1. Introduction.
    2. Concepts.

      Background: Traditional Operating Systems. What Is a Thread? Kernel Interaction. The Value of Using Threads. What Kind of Programs to Thread? What About Shared Memory? Threads Standards. Performance.

    3. Foundations.

      Implementation vs. Specification. Thread Libraries. The Process Structure. Lightweight Processes. Solaris Multithreaded Model. System Calls. Signals.

    4. Lifecycle.

      Thread Lifecycle.

    5. Scheduling.

      Different Models of Kernel Scheduling. Thread Scheduling. Context Switching. When Should You Care About Scheduling?

    6. Synchronization.

      Synchronization Issues. Synchronization Variables. A Stoppable Producer/Consumer Example.

    7. Complexities.

      Complex Locking Primitives. Other Synchronization Variables. Message Queues. Cross-Process Synchronization Variables. Initialization and Destruction. Synchronization Problems.

    8. TSD.

      Thread-Specific Data. Global Variables, Constants, and Cheating.

    9. Cancellation.

      What Cancellation Is. A Cancellation Example. Using Cancellation. Cancellation Safety. Simple Polling.

    10. Signals.

      Signals in UNIX. The Solaris Implementation of Signal Handling. Don't Use Signal Handlers!

    11. Details.

      Attribute Objects. POSIX Thread Ids. Win32 Thread IDs and Thread Handles. Initializing Your Data: pthread_once(). POSIX Namespace Restrictions. Return Values and Error Reporting. Constants Comments. Pthread Futures. Pthread Extensions. Comparing the OS/2, Win32, and POSIX Libraries.

    12. Libraries.

      The Threads Library. Multithreaded Kernels. Are Libraries Safe? Stub Functions in libc. New Semantics for System Calls. Are Libraries Safe? Threads Debugger Interface. Mixing Solaris Pthreads and UI Threads. Comparisons of Different Implementations.

    13. Design.

      Making Libraries Safe and Hot. Manipulating Lists. Program Design.

    14. Languages.

      C. C++. Java. Fortran. Ada. Pascal. Smalltalk. Lisp. Eiffel. Commercial Products. Public Pthreads Implementations.

    15. Tools.

      Static Lock Analyzer. Using a Thread-Aware, Graphical Debugger. Debug Mutexes. Protocol. TNFview.

    16. Performance.

      Optimization: Objectives and Objections. CPU Time, I/O Time, Contention, Etc. Limits on Speedup. Benchmarks and Repeatable Testing. The Lessons of NFS.

    17. Hardware.

      Types of Multiprocessors. Bus Architectures. Memory Systems.

    18. Examples.

      Threads and Windows. Socket Server (Master/Slave Version). Socket Server (Producer/Consumer Version). Other Programs on the Web.

    Appendix A. Internet.

      Threads Newsgroup. Code Examples. Vendor's Threads Pages. Threads Research. The SPILT Package for UI/POSIX Compatibility. Freeware Tools. Other Pointers. The Authors on the Net.

    Appendix B. Books.

      Threads Books. Related Books.

    Appendix C. Timings.
    Appendix D. Mistakes.
    Appendix E. APIs.

      Function Descriptions. Pthread Functions. Pthread Attributes Objects. POSIX Realtime Scheduling. Mutexes. Mutex Attributes Objects. Condition Variables. Condition Variable Attributes Objects. Cancellation Functions. Thread-Specific Data Functions. Semaphores. Signal Functions. Stdio.

    Glossary.
    Index.



Forgot your password?
FAQs
Shipping Options
Returns
Your Orders
Your Account