Master your Minecraft
 
 

Special Offers see all

Enter to WIN a $100 Credit

Subscribe to PowellsBooks.news
for a chance to win.
Privacy Policy

Tour our stores


    Recently Viewed clear list


    Best Books of the Year | December 8, 2014

    Tracey T.: IMG Best Cookbooks of 2014



    As the cookbook buyer for Powell's Books, I am the lucky one who gets to choose every new cookbook that comes into our stores. This means I have a... Continue »

    spacer
Qualifying orders ship free.
$60.25
List price: $64.99
New Trade Paper
Ships in 1 to 3 days
Add to Wishlist
available for shipping or prepaid pickup only
Available for In-store Pickup
in 7 to 12 days
Qty Store Section
4 Remote Warehouse Software Engineering- Programming and Languages

More copies of this ISBN

Programming with Posix Threads (Addison-Wesley Professional Computing)

by

Programming with Posix Threads (Addison-Wesley Professional Computing) Cover

 

Synopses & Reviews

Publisher Comments:

With this practical book, you will attain a solid understanding of threads and will discover how to put this powerful mode of programming to work in real-world applications.

The primary advantage of threaded programming is that it enables your applications to accomplish more than one task at the same time by using the number-crunching power of multiprocessor parallelism and by automatically exploiting I/O concurrency in your code, even on a single processor machine. The result: applications that are faster, more responsive to users, and often easier to maintain. Threaded programming is particularly well suited to network programming where it helps alleviate the bottleneck of slow network I/O.

 

This book offers an in-depth description of the IEEE operating system interface standard, POSIXAE (Portable Operating System Interface) threads, commonly called Pthreads. Written for experienced C programmers, but assuming no previous knowledge of threads, the book explains basic concepts such as asynchronous programming, the lifecycle of a thread, and synchronization. You then move to more advanced topics such as attributes objects, thread-specific data, and realtime scheduling. An entire chapter is devoted to "real code," with a look at barriers, read/write locks, the work queue manager, and how to utilize existing libraries. In addition, the book tackles one of the thorniest problems faced by thread programmers-debugging-with valuable suggestions on how to avoid code errors and performance problems from the outset.

 

Numerous annotated examples are used to illustrate real-world concepts. A Pthreads mini-reference and a look at future standardization are also included.

Synopsis:

With this practical book, you will attain a solid understanding of threads and will discover how to put this powerful mode of programming to work in real-world applications.

The primary advantage of threaded programming is that it enables your applications to accomplish more than one task at the same time by using the number-crunching power of multiprocessor parallelism and by automatically exploiting I/O concurrency in your code, even on a single processor machine. The result: applications that are faster, more responsive to users, and often easier to maintain. Threaded programming is particularly well suited to network programming where it helps alleviate the bottleneck of slow network I/O.

This book offers an in-depth description of the IEEE operating system interface standard, POSIXAE (Portable Operating System Interface) threads, commonly called Pthreads. Written for experienced C programmers, but assuming no previous knowledge of threads, the book explains basic concepts such as asynchronous programming, the lifecycle of a thread, and synchronization. You then move to more advanced topics such as attributes objects, thread-specific data, and realtime scheduling. An entire chapter is devoted to "real code," with a look at barriers, read/write locks, the work queue manager, and how to utilize existing libraries. In addition, the book tackles one of the thorniest problems faced by thread programmers-debugging-with valuable suggestions on how to avoid code errors and performance problems from the outset.

Numerous annotated examples are used to illustrate real-world concepts. A Pthreads mini-reference and a look at future standardization are also included.

0201633922B04062001

About the Author

David R. Butenhof, a recognized Pthreads authority, was deeply involved in the creation of the IEEE POSIX standard as well as the X/Open threading extensions, which were fast-tracked into X/Open XSH5 (UNIX98). An engineer at Digital Equipment Corporation, he was the lead architect and developer of Digital's own threading architecture and designed and implemented much of the Pthreads interfaces on Digital UNIX 4.0.

0201633922AB04062001

Table of Contents

List of Example Programs.

Preface.

Intended Audience.

About the Author.

Acknowledgments.

1. Introduction.

The "Bailing Programmers".

Definitions and Terminology.

Asynchronous.

Concurrency.

Uniprocessor and Multiprocessor.

Parallelism.

Thread Safety and Reentrancy.

Concurrency Control Functions.

Asynchronous Programming is Intuitive...

. . . Because Unix is Asynchronous.

. . . Because the World is Asynchronous.

About the Examples in This Book.

Asynchronous Programming, by Example.

the Baseline, Synchronous Version.

A Version Using Multiple Processes.

A Version Using Multiple Threads.

Summary.

Benefits of Threading.

Parallelism.

Concurrency.

Programming Model.

Costs of Threading.

Computing Overhead.

Programming Discipline.

Harder to Debug.

To Thread or Not to Thread?

POSIX Thread Concepts.

Architectural Overview.

Types and Interfaces.

Checking for Errors.

2. Threads.

Creating and Using Threads.

The Life of a Thread.

Creation.

Startup.

Running and Blocking.

Termination.

Recycling.

3. Synchronization.

Invariants, Critical Sections, and Predicates.

Mutexes.

Creating and Destroying a Mutex.

Locking and Unlocking a Mutex.

Nonblocking Mutex Locks.

Using Mutexes for Atomicity.

Sizing a Mutex to Fit the Job.

Using More Than One Mutex.

Lock Hierarchy.

Lock Chaining.

Condition Variables.

Creating and Destroying a Condition Variable.

Waiting on a Condition Variable.

Waking Condition Variable Waiters.

One Final Alarm Program.

Memory Visibility Between Threads.

4. A Few Ways to Use Threads.

Pipeline.

Work Crew.

Client/Server.

5. Advanced Threaded Programming.

One-Time Initialization.

Attributes Objects.

Mutex Attributes.

Condition Variable Attributes.

Thread Attributes.

Cancellation.

Deferred Cancelability.

Asynchronous Cancelability.

Cleaning Up.

Thread-Specific Data.

Creating Thread-Specific Data.

Using Thread-Specific Data.

Using Destructor Functions.

Realtime Scheduling.

POSIX Realtime Options.

Scheduling Policies and Priorities.

Contention Scope and Allocation Domain.

Problems With Realtime Scheduling.

Priority-Aware Mutexes.

Priority Ceiling Mutexes.

Priority Inheritance Mutexes.

Threads and Kernel Entities.

Many-to-One (User Level).

One-to-One (Kernel Level).

Many-to-Few (Two Level).

6. Posix Adjusts to Threads.

Fork.

Fork Handlers.

Exec.

Process Exit.

Stdio.

Flockfile and Funlockfile.

Getchar_Unlocked and Putchar_Unlocked.

Thread-Safe Functions.

User and Terminal Identification.

Directory Searching.

String Token.

Time Representation.

Random Number Generation.

Group and User Database.

Signals.

Signal Actions.

Signal Masks.

Pthread_Kill.

Sigwait and Sigwaitinfo.

Sigev_Thread.

Semaphores: Synchronizing With a Signal-Catching Function.

7. "Real Code".

Extended Synchronization.

Barriers.

Read-Write Locks.

Work Queue Manager.

But What About Existing Libraries?

Modifying Libraries to Be Thread-Safe.

Living With Legacy Libraries.

8. Hints to Avoid Debugging.

Avoiding Incorrect Code.

Avoid Relying on "Thread Inertia".

Never Bet Your Mortgage on a Thread Race.

Cooperate to Avoid Deadlocks.

Beware of Priority Inversion.

Never Share Condition Variables Between Predicates.

Sharing Stacks and Related Memory Corrupters.

Avoiding Performance Problems.

Beware of Concurrent Serialization.

Use the Right Number of Mutexes.

Too Many Mutexes Will Not Help.

Never Fight Over Cache Lines.

9. Posix Threads Mini-Reference.

POSIX 1003.1cn1995 Options.

POSIX 1003.1cn1995 Limits.

POSIX 1003.1cn1995 Interfaces.

Error Detection and Reporting.

Use of Void* Type.

Threads.

Mutexes.

Condition Variables.

Cancellation.

Thread-Specific Data.

Realtime Scheduling.

Fork Handlers.

Stdio.

Thread-Safe Functions.

Signals.

Semaphores.

10. Future Standardization.

X/Open Xsh5 [Unix98].

POSIX Options for XSH5.

Mutex Type.

Set Concurrency Level.

Stack Guard Size.

Parallel I/O.

Cancellation Points.

POSIX 1003.1j.

Barriers.

Read-Write Locks.

Spinlocks.

Condition Variable Wait Clock.

Thread Abort.

Posix 1003.14.

Bibliography.

Thread Resources on the Internet.

Index. 0201633922T04062001

Product Details

ISBN:
9780201633924
Author:
Butenhof, David
Publisher:
Addison-Wesley Professional
Author:
Butenhof, David R.
Location:
Reading, Mass. :
Subject:
Programming Languages - General
Subject:
Programming - General
Subject:
Programming
Subject:
Operating Systems - UNIX
Subject:
Operating Systems - General
Subject:
Computer programming
Subject:
Threads (computer programs)
Subject:
POSIX
Subject:
Threads
Subject:
Software Engineering - Programming and Languages
Copyright:
Edition Description:
Trade paper
Series:
Addison-Wesley professional computing series
Series Volume:
no. 2
Publication Date:
May 1997
Binding:
TRADE PAPER
Grade Level:
Professional and scholarly
Language:
English
Illustrations:
Yes
Pages:
400
Dimensions:
9.22x7.48x.87 in. 1.49 lbs.

Other books you might like

  1. Unix Network Programming 2ND Edition...
    Used Hardcover $55.00
  2. Unix Network Programming Networking... Used Hardcover $40.00
  3. Posix Programmer's Guide Used Trade Paper $18.50
  4. Kids Knitting: Projects for Kids of...
    Used Hardcover $6.50
  5. Data Structures and Algorithms With... Used Hardcover $138.50
  6. Design Patterns: Elements of...
    Used Hardcover $31.00

Related Subjects

Computers and Internet » Operating Systems » General
Computers and Internet » Operating Systems » Unix » Linux
Computers and Internet » Operating Systems » Unix » Unix Administration
Computers and Internet » Operating Systems » Unix » Unix and Linux Programming
Computers and Internet » Software Engineering » Programming and Languages
Science and Mathematics » Astronomy » General

Programming with Posix Threads (Addison-Wesley Professional Computing) New Trade Paper
0 stars - 0 reviews
$60.25 In Stock
Product details 400 pages Addison-Wesley Professional - English 9780201633924 Reviews:
"Synopsis" by , With this practical book, you will attain a solid understanding of threads and will discover how to put this powerful mode of programming to work in real-world applications.

The primary advantage of threaded programming is that it enables your applications to accomplish more than one task at the same time by using the number-crunching power of multiprocessor parallelism and by automatically exploiting I/O concurrency in your code, even on a single processor machine. The result: applications that are faster, more responsive to users, and often easier to maintain. Threaded programming is particularly well suited to network programming where it helps alleviate the bottleneck of slow network I/O.

This book offers an in-depth description of the IEEE operating system interface standard, POSIXAE (Portable Operating System Interface) threads, commonly called Pthreads. Written for experienced C programmers, but assuming no previous knowledge of threads, the book explains basic concepts such as asynchronous programming, the lifecycle of a thread, and synchronization. You then move to more advanced topics such as attributes objects, thread-specific data, and realtime scheduling. An entire chapter is devoted to "real code," with a look at barriers, read/write locks, the work queue manager, and how to utilize existing libraries. In addition, the book tackles one of the thorniest problems faced by thread programmers-debugging-with valuable suggestions on how to avoid code errors and performance problems from the outset.

Numerous annotated examples are used to illustrate real-world concepts. A Pthreads mini-reference and a look at future standardization are also included.

0201633922B04062001

spacer
spacer
  • back to top

FOLLOW US ON...

     
Powell's City of Books is an independent bookstore in Portland, Oregon, that fills a whole city block with more than a million new, used, and out of print books. Shop those shelves — plus literally millions more books, DVDs, and gifts — here at Powells.com.