Skip to Content
PThreads Programming
book

PThreads Programming

by Dick Buttlar, Jacqueline Farrell, Bradford Nichols
September 1996
Intermediate to advanced content levelIntermediate to advanced
286 pages
7h 11m
English
O'Reilly Media, Inc.
Content preview from PThreads Programming

Chapter 1. Why Threads?

In this chapter:

When describing how computers work to someone new to PCs, it’s often easiest to haul out the old notion that a program is a very large collection of instructions that are performed from beginning to end. Our notion of a program can include certain eccentricities, like loops and jumps, that make a program more resemble a game of Chutes and Ladders than a piano roll. If programming instructions were squares on a game board, we can see that our program has places where we stall, squares that we cross again and again, and spots we don’t cross at all. But we have one way into our program, regardless of its spins and hops, and one way out.

Not too many years ago, single instructions were how we delivered work to computers. Since then, computers have become more and more powerful and grown more efficient at performing the work that makes running our programs possible. Today’s computers can do many things at once (or very effectively make us believe so). When we package our work according to the traditional, serial notion of a program, we’re asking the computer to execute it close to the humble performance of a computer of yesterday. If all ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming with POSIX ® Threads

Programming with POSIX ® Threads

David R. Butenhof

Publisher Resources

ISBN: 9781449364724Supplemental ContentErrata Page