Spin Lock vs Mutex vs Binary Semaphore vs Counting Semaphore in Operating System

  Рет қаралды 13,619

PracticalCSJourney

PracticalCSJourney

Күн бұрын

Пікірлер: 15
@ManolyaATALAY
@ManolyaATALAY 3 жыл бұрын
thanks for making this video! it cleared a lot in my head.
@Amritanjali
@Amritanjali 3 жыл бұрын
then what is use of binary semaphor??
@practicalcsjourney
@practicalcsjourney 3 жыл бұрын
Not much use as such.
@sauravnegi8858
@sauravnegi8858 9 ай бұрын
bhai notes mil sakte h ye?
@focusman8801
@focusman8801 3 жыл бұрын
if semaphore is not able to do mutual exclusion then how can it helps in process synchronization ??
@ManolyaATALAY
@ManolyaATALAY 3 жыл бұрын
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.
@sahilkalamkar5332
@sahilkalamkar5332 4 жыл бұрын
But if we initialize semaphore to a value of 1...It can be used to solve the Critical section problem right?
@practicalcsjourney
@practicalcsjourney 4 жыл бұрын
Not exactly. In semaphore, the lock can be acquired by one thread and released by another.
@inspirationalthing
@inspirationalthing 4 жыл бұрын
Can u give any c example to understand this all concept
@utsavaggarwal_ds
@utsavaggarwal_ds 5 жыл бұрын
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 ?
@practicalcsjourney
@practicalcsjourney 5 жыл бұрын
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.
@vishnusainadh7656
@vishnusainadh7656 4 жыл бұрын
can you provide your mail id ?
@practicalcsjourney
@practicalcsjourney 4 жыл бұрын
shivamm389@gmail.com
@randomyt5358
@randomyt5358 3 жыл бұрын
Bogus explaination
@premac3960
@premac3960 2 жыл бұрын
Please improve your teaching skills.
Race Condition in Operating System | DevOps/SRE Interview Questions
21:04
PracticalCSJourney
Рет қаралды 4,7 М.
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 44 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 54 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 107 МЛН
Difference between Binary Semaphores and Mutexes
6:04
CodeVault
Рет қаралды 30 М.
What are spinlocks?
7:13
Defog Tech
Рет қаралды 40 М.
Semaphore Vs. Mutex - A Clear Understanding
10:14
Shriram Vasudevan
Рет қаралды 102 М.
Semaphores
22:51
Neso Academy
Рет қаралды 514 М.
What is difference between Semaphore and Mutex
7:00
HowTo
Рет қаралды 486 М.
Part 1 of 2: Process creation in os using fork() | init process | pstree
18:45
MUTEX SEMAPHORE in an RTOS and its USE
11:34
RTOS LOGICS
Рет қаралды 10 М.
What's Spin Lock? Spin Lock Vs. Mutex.
5:07
Shriram Vasudevan
Рет қаралды 32 М.