Articles in this series
Given the number of threads -at least 3 of them- them have to start working until a stop signal is triggered.
At first all threads start on a waiting state and work when signaled, this signal that indicates any thread to work is triggered e...
Max and Min
To start working with arrays, we can do a simple task to find the indices of minimum and maximum elements in an array.
Given the size of the array, the program fills it with random numbers and creates n tasks according to the argument rec...
Given the size of the matrices, the program generates two matrices that are filled with random integers using a couple of threads for each matrix, after that the matrices are multiplied in parallel by using multiple threads.
Now is time for a little mix between threads and queues, so the following will happen:
A thread generates random integers and push them into the queue, if the queue is full this thread awaits.
Other threads consume this numbers from the queue, and w...
Following the work with queues, this time we will handle priority with mutex
A thread generates a tuple with the following information:
Type of task
Number for the queue
The thread pushes this numbers into the queue, and if is full a...