I am trying to understand difference between mutex and semaphore in any operating system
For example, we have two treads T1 and t2, which are sharing the ame resources. Both T1 and T2 can't share resource at same time. If T1 is using resource then T2 has to wait or if If T2 is using resource then T1 has to wait
I understand that both restrics the resource but I don't understand clearly difference between them ?