No video

Semaphores

  Рет қаралды 457,486

Neso Academy

Neso Academy

Күн бұрын

Пікірлер: 155
@bagos1997
@bagos1997 3 жыл бұрын
If anyone is confused from the word Semaphore know that in Greek the word Σημαφόρος (Semaphoros) means Signal-bearer. Hope that helps.
@omardumet120
@omardumet120 2 жыл бұрын
we call traffic lights "semaforos" in Spanish lol
@shivamxsingla
@shivamxsingla 2 жыл бұрын
@@omardumet120 lol
@sasankv9919
@sasankv9919 2 жыл бұрын
Thanks, this opened up lot more meaning to this concept
@manuelconte2127
@manuelconte2127 2 жыл бұрын
in italian "SEMAFORO"
@189Blake
@189Blake Жыл бұрын
@@omardumet120 Yeah, my language is Spanish and when I heard the concept it was rather logical to know what it does
@murshedaziz3742
@murshedaziz3742 2 жыл бұрын
This channel is a blessing. During my undergrad, I used to refer to your videos to clear out my doubts. Now doing the same in my postgrad. Why on earth teachers can not teach like this.
@yajie7756
@yajie7756 Жыл бұрын
Some teachers just try to talk for how long a lecture lasts...
@shreyanshgupta1587
@shreyanshgupta1587 Жыл бұрын
Capitalized Education 👍
@shamveerapan2875
@shamveerapan2875 9 ай бұрын
Cause they want to complete the portion.... they too want to make the students clear. ..but some can't because they dont know.. and many can't because they dont have much time.. they can give you only a outline...what to do???. Its out fate.. 😅😅😇😊😉
@abdelghanimoumen2524
@abdelghanimoumen2524 Жыл бұрын
This perfect mini-course is better than my college's 10 hours course
@asmaaasmaa2395
@asmaaasmaa2395 Жыл бұрын
Hahahah yep ,it's useful for the cs students
@Lyricverse116
@Lyricverse116 8 ай бұрын
True bro 😂
@elmass3662
@elmass3662 2 жыл бұрын
NESO academy really be pulling through. Thank you so much sir!
@hetaeramancer
@hetaeramancer 3 жыл бұрын
Wow a new video on OS, finally I can continue my learning on OS that has begun since 2018 LOL
@invinciblegirl4386
@invinciblegirl4386 2 жыл бұрын
😂😂
@AbhishekGupta-vu7zt
@AbhishekGupta-vu7zt 2 жыл бұрын
😂😂
@user-xb3uo6tl6w
@user-xb3uo6tl6w 6 ай бұрын
So u took 3 years to learn os huh
@ShainaSandhu
@ShainaSandhu 4 ай бұрын
​@@invinciblegirl4386😊😊
@ShainaSandhu
@ShainaSandhu 4 ай бұрын
​@@invinciblegirl4386😊😊😊😊😊
@alokendughosh7013
@alokendughosh7013 2 жыл бұрын
This presentation is too good. Understood it perfectly. Thank you so much sir❣️
@nojoodothmanal-ghamdi1026
@nojoodothmanal-ghamdi1026 2 жыл бұрын
Thank you so much the idea is clear now, I cannot express how much you helped me
@tanish_mavi
@tanish_mavi Жыл бұрын
Best explaintion of semaphoros on the entire Internet. Thank you so much sir
@rupambiswas953
@rupambiswas953 Жыл бұрын
Became a fan of this channel, it saved my degree 🙏🙏💙💙
@mihneapostoaca5044
@mihneapostoaca5044 2 жыл бұрын
You are a master,sir!Great job!
@nguyeninhan8542
@nguyeninhan8542 9 ай бұрын
this is absolutely better than my university's course
@himanshusoni1512
@himanshusoni1512 2 жыл бұрын
Djiktra himself explaining the Semaphore. Thanks
@captureit4410
@captureit4410 3 жыл бұрын
saviors for engineering students
@farahmohamed2104
@farahmohamed2104 9 ай бұрын
The session is too good. and precise Helps to understand very clearly. Thank you
@LL-oj3cs
@LL-oj3cs 2 жыл бұрын
Truly thanks from an OS final headache person
@surajbhardwaj1200
@surajbhardwaj1200 Жыл бұрын
Best explanation on KZbin.
@Account-fi1cu
@Account-fi1cu 2 жыл бұрын
Thank you!
@rohitkandula8493
@rohitkandula8493 10 ай бұрын
One an only king for Operating Systems🔥🔥🙏🙏
@kavyabanka4482
@kavyabanka4482 3 жыл бұрын
Please send memory management in you tube not only in neso fuel please release in u tube
@ahmedrateb5867
@ahmedrateb5867 4 ай бұрын
Outstanding, makes it so easy and the way it s presented is great
@dharanyuvi6951
@dharanyuvi6951 2 жыл бұрын
Legendary explanation .., thank you champ
@kerematasen399
@kerematasen399 2 жыл бұрын
Best explanation ever.
@ashishchawla9035
@ashishchawla9035 2 жыл бұрын
But as the critical section can only be accessed by one process at a time so how two processes are entering the critical section at the same time and using it in counting semaphore?
@ahmedrateb5867
@ahmedrateb5867 4 ай бұрын
Counting semaphores are a generalisation of binary semaphores, whereas binary allows a maximum of 1 process to enter the critical section, counting allows up to n where n is a positive integer
@SOWProgramming
@SOWProgramming 3 ай бұрын
Counting semaphores are used when processes need to access a resource which has n instances, so N processes can access that resource.
@medhananjay9099
@medhananjay9099 2 жыл бұрын
what an amazing explanation thankyou so much neso academy it is very heplfull !! thankyou again
@abrargadelrab8093
@abrargadelrab8093 2 жыл бұрын
well explained.
@klaik30
@klaik30 2 жыл бұрын
The point of mutex is to lock a critical section so that it is thread safe but the call for P() itself is not, right? If two processes each read the check for S they will both see that S > 0 and continue to both run S--. How is this accounted for? I dont think the video talked about this specific scenario?
@abdi.
@abdi. 2 жыл бұрын
thx dawg, gotta exam this morning. this really helped
@fullstackcourse
@fullstackcourse 4 ай бұрын
You're the best!!
@ngk442
@ngk442 Күн бұрын
Great explanation ❤
@khangpiano549
@khangpiano549 2 жыл бұрын
Thank you
@puneethj9920
@puneethj9920 3 жыл бұрын
Great video🙂
@divyasrisatyavada965
@divyasrisatyavada965 2 жыл бұрын
Wow what a explanation sir .I am very cleared about this topic after watching your video thank you so much for such a valuable information sir
@adilmughal2251
@adilmughal2251 Жыл бұрын
one of the best explanation.
@theomniking7856
@theomniking7856 Жыл бұрын
ive learnt more things from neso academy (and other youtube tutorials ) than in UNI
@wasalawyer.1179
@wasalawyer.1179 2 ай бұрын
And it is no joke
@jaikishank
@jaikishank Жыл бұрын
Excellent and crisp explanation. Thank you.
@avishkarkurkute4753
@avishkarkurkute4753 Ай бұрын
neso, you are saviour🙌
@coding_unicorn2
@coding_unicorn2 Жыл бұрын
Well explained 🧡
@darshil-oh2le
@darshil-oh2le 9 ай бұрын
Nicely Explained 👌👌
@nehasv7913
@nehasv7913 2 жыл бұрын
really awesome.
@balaganeshn4442
@balaganeshn4442 2 жыл бұрын
Thanks a lot for your clear explanation , Is there any video for MUTUX?
@fahedzidani2681
@fahedzidani2681 2 жыл бұрын
instead of using var S u use mutex
@Nilotpal_Chakravarty_
@Nilotpal_Chakravarty_ 2 жыл бұрын
Mutex locks are basically binary semaphores
@eswarpethraj9099
@eswarpethraj9099 3 жыл бұрын
In counting semaphores, if S is set to 4, then 4 processes enter the critical section at the same point of time, how it's possible because only one process can access the critical section. And what do you mean by an instance of a resource? Any example with c++ 20 code using counting semaphores.
@subbumotepalli
@subbumotepalli 2 жыл бұрын
Same doubt .if you know plz explain
@apurvkumar1808
@apurvkumar1808 2 жыл бұрын
S is set to 4 means there are 4 instances of the resource so 4 processes can enter in critical section at once.
@wasalawyer.1179
@wasalawyer.1179 2 ай бұрын
does that violate Mutual Exclusion principle?​@@apurvkumar1808
@wizardop2100
@wizardop2100 Жыл бұрын
very well explained sir.Thank you so much
@tanzimhasan4464
@tanzimhasan4464 3 жыл бұрын
Thanks for this valuable video 💗
@aboudejeber1976
@aboudejeber1976 2 жыл бұрын
Thank you sir , that's the explanation i was looking for 🌹
@Bearded_Dragon_Sir
@Bearded_Dragon_Sir 2 жыл бұрын
Thanks!
@aiqabusov6926
@aiqabusov6926 2 жыл бұрын
Great Content
@mohammadadrees5263
@mohammadadrees5263 2 жыл бұрын
Thank you sir. explained very well.
@MiniduPunsara
@MiniduPunsara 4 ай бұрын
always the best
@kailas813
@kailas813 2 жыл бұрын
The session is too good. Helps to understand very clearly. Thank you
@DopetheKid
@DopetheKid 2 жыл бұрын
SIR YOU ARE GREAT
@Lawleit_L
@Lawleit_L 10 ай бұрын
But what is the different between locks / semaphores and the other algorithms that we have seen like FCFS, RR and SJF , because all of them are synchronize and arrange the prosses.
@venkataswamykadiyam977
@venkataswamykadiyam977 3 жыл бұрын
Sir, please upload remaining videos in youtube. We can't be able to take screenshots of the lectures in neso app to revise them whenever we want...
@goldenarmer6363
@goldenarmer6363 Жыл бұрын
God level explanation💥👌
@MatheusSilva-dragon
@MatheusSilva-dragon 2 жыл бұрын
Damn! THANK YOU! You guys always help me!
@MrAmalthejus
@MrAmalthejus 2 жыл бұрын
How can a Resource have multiple instances?! What kind of Resources are you talking about?
@huhhzy
@huhhzy 8 ай бұрын
i really appreciate you
@amrrelsheikh
@amrrelsheikh 2 жыл бұрын
You didn't need to repeat "enter the critical section or use the resource" a hundred times, it was extremely disturbing, just pick one of them. But thank you, I finally understood the concept after I failed to in 2 different subjects at the uni.
@BLG120
@BLG120 5 ай бұрын
it wasnt disturbing for me. it helped me to understand thoroughly.
@mriduljain6809
@mriduljain6809 2 жыл бұрын
Amazing Explanation Sir.. Thank you so much 💓💓🥰🥰
@bishnubhusal5999
@bishnubhusal5999 2 жыл бұрын
All the videos are great, only the lacking thing is coding part.
@amanprajapati6301
@amanprajapati6301 5 ай бұрын
very valuable lacture for us thanks you 🤩
@user-ytuser
@user-ytuser Жыл бұрын
very nice explanation
@dnyaneshvarsalve2984
@dnyaneshvarsalve2984 2 жыл бұрын
very good explanation
@himansushaw4938
@himansushaw4938 Жыл бұрын
very nicely explained. Thanks
@patiencechiripanyanga7385
@patiencechiripanyanga7385 2 жыл бұрын
Well elaborated
@hyderabadi_gamerz
@hyderabadi_gamerz Жыл бұрын
Excellent video
@leducphuclong
@leducphuclong 8 ай бұрын
Thank you so much !!
@eylulmood4830
@eylulmood4830 2 жыл бұрын
why test and lock is a hardware solution? we also used a variable Lock, whereas semaphore is software solution
@vinayak186f3
@vinayak186f3 3 жыл бұрын
Why is there no while loop in signal's def. i mean if it's a binary semaphore and is already 1 won't it overflow ?
@diptabose7187
@diptabose7187 3 жыл бұрын
S never exceeds one in binary semaphore , because to access the critical section wait operation is done. And after accessing signal operation is used . As signal and wait operations are used indivisibly , Semaphore value doesn't overflow , it remains between 0 and 1.
@samarthtandale9121
@samarthtandale9121 Жыл бұрын
To prevent/protect a shared resource from being accessed by multiple processes at the same time we use Semaphore S, and wait() and signal() operations. But for wait() and signal(), again, the Semaphore is shared resource and they have critical section in them, so we have to again implement mutex for Semaphore S and so on. So, If you got what I just said, to solve a problem of mutex, we are generating another problem of mutex and that will recursively generate another and so on... So how do you solve this problem or where exactly did I go wrong?
@Mehraj_IITKGP
@Mehraj_IITKGP Жыл бұрын
You are correct that using a semaphore to protect a shared resource can introduce its own synchronization issues, particularly if multiple threads or processes need to access the semaphore itself. This can lead to a problem known as "semaphore contention," where threads or processes contend for the semaphore itself, rather than the shared resource it is protecting. To address this issue, it is important to carefully design the critical sections for the semaphore and ensure that they are as small and simple as possible. In particular, the critical section for the semaphore should be limited to the code that directly modifies the semaphore's value, such as the wait() and signal() operations. One common approach to minimizing semaphore contention is to use a variant of the semaphore known as a "spinlock." A spinlock is a type of lock that repeatedly checks the value of the semaphore in a loop until it becomes available, rather than blocking the thread or process. This can reduce the overhead of context switching and thread synchronization, particularly in high-concurrency environments. Another approach to reducing semaphore contention is to use techniques such as "reader-writer locks" or "lock-free algorithms," which are designed to allow multiple threads or processes to access a shared resource in a more fine-grained and efficient manner, without relying on traditional locks or semaphores.
@samarthtandale9121
@samarthtandale9121 Жыл бұрын
@@Mehraj_IITKGP Thank You very much for taking time to resolve my doubt !!!
@samratpatel8060
@samratpatel8060 Жыл бұрын
@@Mehraj_IITKGP wow , wrote an long ass para for solving a strangers doubt
@DonaldMurf
@DonaldMurf 2 жыл бұрын
Thank you so much for this video.
@ripudamansingh6928
@ripudamansingh6928 Жыл бұрын
sir you are the best
@bakersisters7
@bakersisters7 Жыл бұрын
Best explanation ever🤌🤌
@srushtihirve6990
@srushtihirve6990 2 жыл бұрын
I think the definition of wait() is Wait(S){ while s>= 0; s--; } in the video it is Wait(s){ while s
@JanhaviDeore
@JanhaviDeore Жыл бұрын
s
@codingwithazan2280
@codingwithazan2280 Жыл бұрын
You missed the concept i would say
@lowerbound4803
@lowerbound4803 2 жыл бұрын
How could we ensure that S will never be altered from different sources simultaneously?
@raaj7256
@raaj7256 2 жыл бұрын
It's because they're atomic. I guess they're internally atomized using test_and_set or compare_and_set, and my faculty told test_and_set and compare_and_set cannot be called at the same time, there for you can't really call them at the same time (Don't know if the "cannot be altered part" is correct though).
@lowerbound4803
@lowerbound4803 2 жыл бұрын
​@@raaj7256 Thank you for your answer!! I have to learn how atomic works.
@iyadassaadnekka329
@iyadassaadnekka329 2 жыл бұрын
Very very amazing thank you
@kusalaphameya3421
@kusalaphameya3421 8 ай бұрын
so amazing
@muhammadmaawaz1221
@muhammadmaawaz1221 7 ай бұрын
Thanks
@bimalnayak962
@bimalnayak962 Жыл бұрын
Really it's awesome
@mohammedparwes9760
@mohammedparwes9760 Жыл бұрын
Hats off boss!!!❤
@chhajedji
@chhajedji Ай бұрын
What if s=1, hence both P and V execute simultaneously and during s++ and s-- we face the original producer consumer problem and instead of s being 1, takes value 0 or 2?
@hacenezerrouk3770
@hacenezerrouk3770 Жыл бұрын
Thank You :)
@mughatoamugha9029
@mughatoamugha9029 3 жыл бұрын
🙂 hi.. holaaa... Good to be here again 😇
@shifankphoulad
@shifankphoulad 2 жыл бұрын
Nice 😊☺️👍👍
@decostarkumar2562
@decostarkumar2562 2 жыл бұрын
It's wrong. In semaphore loops are not present. To avoid busy waiting symbols are used .
@rohith2758
@rohith2758 2 жыл бұрын
Worthy video
@sudhakannan4746
@sudhakannan4746 3 жыл бұрын
Thank you sir..
@3042640426
@3042640426 2 жыл бұрын
thank you^^
@MrMaschine999
@MrMaschine999 8 ай бұрын
Why is it possible for different processes to be in the critical section for counting semaphores? I thought you sad we only want one process at a time in the critical section. Did I misunderstood something?
@uditish5531
@uditish5531 Жыл бұрын
Just perfect!!!!
@harshmishra9008
@harshmishra9008 Ай бұрын
Is there any platform to get the notes of the lectures?
@akarshta8087
@akarshta8087 7 ай бұрын
good
@amillion7582
@amillion7582 2 жыл бұрын
damn, my professor literally took months to explain this simple concept
@minidupasan1520
@minidupasan1520 2 жыл бұрын
@somethingnew3654
@somethingnew3654 2 жыл бұрын
In counting semephore..mutual exclusion is not followed..then how is it solving critical section problem?
@Abhishek-fc2cj
@Abhishek-fc2cj 2 жыл бұрын
Plz upload all lectures on youTube 🙏
@bhuvaneshwarig6517
@bhuvaneshwarig6517 Жыл бұрын
So tough:(
@aribiali3574
@aribiali3574 2 жыл бұрын
I luv u dude 💙
@user-qw9gr4cb8z
@user-qw9gr4cb8z Жыл бұрын
Are sem_signal and sem_post the same thing? I’m a bit confused
@sriharika4573
@sriharika4573 Жыл бұрын
What problem is there in critical section problem?
@Jaguar_Strike
@Jaguar_Strike 2 жыл бұрын
Explanation is good but it will be better if it is short and sweet, without wasting much time on repeating the same thing again and again.
Disadvantages of Semaphores
11:05
Neso Academy
Рет қаралды 139 М.
What is a semaphore? How do they work? (Example in C)
13:27
Jacob Sorber
Рет қаралды 293 М.
7 Days Stranded In A Cave
17:59
MrBeast
Рет қаралды 82 МЛН
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН
If Barbie came to life! 💝
00:37
Meow-some! Reacts
Рет қаралды 68 МЛН
Peterson’s Solution
21:31
Neso Academy
Рет қаралды 380 М.
The Clever Way to Count Tanks - Numberphile
16:45
Numberphile
Рет қаралды 1 МЛН
Should You Dare Criticize Kamala Harris... | Piers Morgan
12:40
Jordan B Peterson
Рет қаралды 1,9 МЛН
The Dining Philosophers Problem
20:16
Neso Academy
Рет қаралды 317 М.
Why UK 🇬🇧 is going Bankrupt? : Detailed Economic Case Study
20:37
Think School
Рет қаралды 1,5 МЛН
The Readers Writers Problem
15:32
Neso Academy
Рет қаралды 244 М.
Exploring How Computers Work
18:12
Sebastian Lague
Рет қаралды 3,4 МЛН
Test and Set Lock
19:01
Neso Academy
Рет қаралды 222 М.
Transport Layer Security (TLS) - Computerphile
15:33
Computerphile
Рет қаралды 476 М.
7 Days Stranded In A Cave
17:59
MrBeast
Рет қаралды 82 МЛН