Is there any difference between the following two variables:
Mutex m;
Semaphore s = 1;
I think they are the same but in a video I am watching about a formula to the reader/writer problem, it says to use 5
semaphores, each of them starting at the value of 1
. I find that interesting because I thought if you have a semaphore at the value of 1
, then you would just use a mutex.