Hi everyone!
I have a task that needs to be made in C in Linux. I use Kubuntu.
This is the task:
Process (coordinator) creates 5 working process (pool of processes). The working processes are waiting to be awakened by the coordinator, perform a job and wait again. The coordinator transmits tag (integer) to the first process and it wakes it up. The awakened first process adds 1 to the tag and transmit it to the next process, as it signals the coordinator. The coordinator awakens the next process, which performs same actions etc. The tag should pass through each process 10 times and then the coordinator should visualize its contents. Use signals for the signalization of the processes, and for the tag (marker) use channels.
Solve the problem also with threads by selecting the most appropriate way of communication.
Any ideas? I'm absolutely clueless about this.
Thanks in advance!