This is a post in which you will get the basic knowledge about the parallel programming concept. In this post we going to use the OpenMP model. This program is implemented in the C Language. Basically this programs demonstrates how the thread gets executed in different Cores of the processor. In this case, this program is executed in a Quad Core CPU, so it displays 4 threads from 0-3.
Here the threads are executed randomly on each cores on the basics of their availability. This method by which threads get their processor can be known in detail by googling about ready queue.
#pragma omp parallel
printf("Thread Is running at %dth processorn",x);
Comment them here !
Latest posts by Bikash Panda (see all)
- Automatic project structure/git creation in Windows - January 27, 2019
- ESP32 LoRaWAN Node using Arduino - December 31, 2018
- Wi-FI Remote for MI TV using ESP8266 - November 15, 2018