Object‐Orientated Multithreading Using C++

Assembly Automation

ISSN: 0144-5154

Article publication date: 1 March 1999

216

Citation

Hughes, C. and Hughes, T. (1999), "Object‐Orientated Multithreading Using C++", Assembly Automation, Vol. 19 No. 1, pp. 77-78. https://doi.org/10.1108/aa.1999.19.1.77.2

Publisher

:

Emerald Group Publishing Limited


Aimed at anyone who requires an object‐oriented approach to developing multithreaded applications, this book is set out in a clear and logical manner, enabling the reader to quickly understand the requirements, problems and implications of object‐oriented implementations of multithreaded code.

Chapter 1 explains the importance of threads and multithreading and the role which they play in today’s programming environments. A high level overview of C++ classes is given, with various types of classes and their uses briefly explained. Although the book requires no previous experience with threads, it is assumed that the reader has at least a modest familiarity with C++. An understanding of techniques such as encapsulation, inheritance, and polymorphism is also required. Ultimately chapter 1 introduces application frameworks, and thus the concepts of concurrency and multithreading.

In chapters 2 and 3, the anatomy of processes and threads (light weight processes) is explored. Process information blocks, process states and priorities, context switching and process interaction with hardware and software resources are all covered. The parent‐child relationships of spawned processes are clearly explained, together with process creation and termination. From these two chapters the reader will understand why multiple asynchronous threads are able to effect a performance increase, over single threaded code.

The basic concepts of multithreading, multitasking and multiprocessing, and on to to the finer points of thread interaction, co‐operation and communication are all covered in chapters 4 to 9. Various points and methods, including process dependencies, scheduling strategies, pipes, synchronisation semaphores and mutual exclusion are investigated.

Using the background theory covered in the previous chapters, the book starts to build some real threading objects. Chapters 10 and 11 deal with the practical implementation of the points raised in the proceeding sections and code examples are developed. This is followed in chapter 12 by the important topic of testing multithreaded applications. Various categories of potential problems are identified and a number of testing methodologies are discussed, together with object‐orientated specific tactics.

An appendix contains the entire POSIX 1.003c thread management specifications and an accompanying floppy disk contains all class implementations covered by the text. The disk also includes listings and descriptions of the APIs for thread creation, destruction and management.

With clear explanations, useful examples and a suitable depth of discussion, this is suitable for anyone wishing to expand their C++ programming knowledge to include object orientated implementations of threaded code.

Related articles