Book Image

C++ Multithreading Cookbook

By : Miloš Ljumović
Book Image

C++ Multithreading Cookbook

By: Miloš Ljumović

Overview of this book

<p>Creating multithreaded applications is a present-day approach towards programming. With the power of C++, you can easily create various types of applications and perform parallelism and optimizations in your existing work. This book is a practical, powerful, and easy-to-understand guide to C++ multithreading. You will learn how to benefit from the multithreaded approach and enhance your development skills to build better applications. This book will not only help you avoid problems when creating parallel code, but also help you to understand synchronization techniques. The end goal of the book will be to impart various multithreading concepts that will enable you to do parallel computing and concurrent programming quickly and efficiently.</p>
Table of Contents (17 chapters)
C++ Multithreading Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Implementation of processes


In modern multitasking systems, the Process Control Block (PCB) stores many different items of data, all needed for correct and efficient process management. PCB is the data structure that resides in the operating system kernel which contains the information needed to manage the process. The PCB is the representation of the process in the operating system. Though the details of these structures are system-dependent, there are some very common parts, which could be classified into three main categories:

  • Process identification data

  • Processor state data

  • Process control data

The role of the PCB is central in process management. It is accessed and/or modified by most operating system utilities, including those involved with scheduling, memory and I/O resource access, and performance monitoring. Data structuring for processes is often done in terms of PCBs. For example, pointers to other PCBs inside a PCB allow the creation of queues of processes in various scheduling states...