I'm running a multi-threaded C program (process?) , making use of semaphores & pthreads. The threads keep interacting, blocking, waking & printing prompts on stdout continuously, without any human intervention. I ...
How would you complete this scheme and how many semaphores would you use to obtain
a) ABCD ACBD sequence
b) ABCD ABDC sequence
using these two processes (consider using pseudocode es: wait(s1) signal(s1) ...