I am trying to understand what is mutex and semaphore in any operating system? For this I have read some website pages but I am not able to understand clearly.
Both are concerned with restricting access to shared resources in a multiprocessing environment.
For example there are two tasks and both the tasks share the same resource i.e. CPU time. Both tasks cannot use the same resource at the same time in a single core processor.
Both are concerned with restricting access to shared resources in a multiprocessing environment.
For example there are two tasks and both the tasks share the same resource i.e. CPU time. Both tasks cannot use the same resource at the same time in a single core processor.