/**/ Dextutor - Page 11 of 14 - Solutions made simple

Program for Process Synchronization using mutex locks

/* Program for process synchronization using locks Program create two threads: one to increment the value of a shared variable and second to decrement the value of shared variable. Both the threads make use of locks so that only one of the threads is executing in its critical section */ #include<pthread.h>#include<stdio.h>#include<unistd.h>void *fun1();void *fun2(); int shared=1; …

Program for Process Synchronization using mutex locks Read More »