[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

General Programming Concepts: Writing and Debugging Programs

Chapter 10. Programming on Multiprocessor Systems

On a uniprocessor system, threads execute one after another in a time-sliced manner. This contrasts with a multiprocessor system, where several threads execute at the same time, one on each available processor. Overall performance is improved by running different process threads on different processors. However, an individual program cannot take advantage of multiprocessing, unless it has multiple threads.

For most users, multiprocessing is invisible, being completely handled by the operating system and the programs it runs. If desired, users may bind their processes (force them to run on a certain processor); however, this is not required, nor recommended for ordinary use. Even for most programmers, taking advantage of multiprocessing simply amounts to using multiple threads. On the other hand, kernel programmers have to deal with several issues when porting or creating code for multiprocessor systems. The following information discusses these topics.

Related Information

Chapter 9, Parallel Programming introduces major concepts concerning threads.

Chapter 11, Threads Programming Guidelines provide detailed information about programming with the threads library (libpthreads.a).

[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]