Chapter 22Parallel Programming Using Threads

DOI: 10.1201/9781003257981-22

Multi-core processors are everywhere in desktops, supercomputers, and mobile phones. If a program is written to take advantage of these multiple cores, the program can run faster than on a single core. If a program is written for multiple cores, then the program can be referred to as a parallel program. If a program is not written for multiple cores, then it is called a sequential program. All programs in this book so far are sequential programs. This chapter provides an introduction to writing parallel programs using threads.

22.1 Parallel Programming

There are many ways to write parallel programs. A parallel program performs multiple operations at the same time. ...

Get Intermediate C Programming, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.