thanks for making this video! it cleared a lot in my head.
@Amritanjali3 жыл бұрын
then what is use of binary semaphor??
@practicalcsjourney3 жыл бұрын
Not much use as such.
@sauravnegi88589 ай бұрын
bhai notes mil sakte h ye?
@focusman88013 жыл бұрын
if semaphore is not able to do mutual exclusion then how can it helps in process synchronization ??
@ManolyaATALAY3 жыл бұрын
as far as I know #1 it is an older model, #2: they can actually do the mutual exclusion at kernel level but keeping track of threads all over the place can be heinous work. You need additional methods to support the synchronization. Still, its lock system works to some extent, with TSL instructions in the case of multi-core systems. TSL lock provides protection to semaphores. Though, I should note that my knowledge is completely theoretic on my part. There might be better details in Tanenbaum's OS book.
@sahilkalamkar53324 жыл бұрын
But if we initialize semaphore to a value of 1...It can be used to solve the Critical section problem right?
@practicalcsjourney4 жыл бұрын
Not exactly. In semaphore, the lock can be acquired by one thread and released by another.
@inspirationalthing4 жыл бұрын
Can u give any c example to understand this all concept
@utsavaggarwal_ds5 жыл бұрын
So u mean to say , if u use mutex as a solution then the waiting process will sleep till the process exit CS, but it does not have any impact on the total execution time. right ?
@practicalcsjourney5 жыл бұрын
In case of mutex, the waiting process will sleep and it will have impact on total running time since context switch is involved when any process sleeps. After context switch, processor will be able to run some other process. So, its kind of tradeoff.