Multithreading is a major part of parallel programming used almost everywhere but it needs to be ...
Multithreading is a major part of parallel programming used almost everywhere but it needs to be implemented effectively to make it useful. There are many ways to implement multithreading in any language. In this paper we show how multithreading can be implemented easily with the use of basic concepts like static variables, etc and then we show how different threads can communicate and interact with each other using the same concepts.Method shown in this paper is similar to how the OS handles multiple processes. We will demonstrate the selective activation of Threads and also demonstrating the execution of the threads sequentially. We also discuss intra-thread communication using static variables. Thus the difficult concept of synchronization and the “join()” method is both replicated and simplified using the basic methods. Finally we present a data structure to depict multiprocessing in a small application using the above discussed concepts.