The Bounded Buffer Problem

  Рет қаралды 320,332

Neso Academy

Neso Academy

Күн бұрын

Пікірлер: 77
@venkateshpatil7109
@venkateshpatil7109 11 ай бұрын
Thanks
@cloudjumper725
@cloudjumper725 2 ай бұрын
To make the code a bit clearer, I would suggest renaming "empty" semaphore to "free_slots" and "full" semaphore to "taken_slots". Makes it easier to understand what this code does and to memorize the fact that wait() performs a decrement operation while signal() increments the value. Othervise quality lesson, as always. Thanks.
@harekrishna4584
@harekrishna4584 2 жыл бұрын
our teacher recommends ur channel as she herself learns here lmaooo
@EnigmaAI-88
@EnigmaAI-88 Жыл бұрын
😂😂😂
@yashaswininag3783
@yashaswininag3783 Жыл бұрын
Because it is recommended in VTU syllabus.. You people are unbelievable.. No gratitude towards anyone
@ChitragaarAshokaraju
@ChitragaarAshokaraju 3 ай бұрын
Same
@Playtimetales65
@Playtimetales65 16 күн бұрын
​Why show gratitude we are spending lakhs and they don't even know how to explain anything properly. So we end up referring channels on KZbin​@@yashaswininag3783
@ChandanKSwain
@ChandanKSwain 2 жыл бұрын
Explanation level is outstanding. It makes too easy to grasp...
@maanyamuthamma3577
@maanyamuthamma3577 10 ай бұрын
You deserve an award for doing this 🎉🎉
@aquadap219
@aquadap219 Жыл бұрын
i watched the past 6 videos of process synchronization and theyre amazing videos thank you!
@rupambiswas953
@rupambiswas953 2 жыл бұрын
Thanks for saving my semester exam 🙏🙏💙💙
@mamathaav4627
@mamathaav4627 Жыл бұрын
Your teaching method is really good.keep on going sir.😊
@ganesh_hulagur
@ganesh_hulagur 3 жыл бұрын
Bruh your videos are really help full Plzz do upload remaining topics like *The reader -writer problem *The Dining philosophers problems #monitors etc🙏
@adelgado0723
@adelgado0723 3 жыл бұрын
I think this is a version of the reader-writer problem
@lakshyakanjani2313
@lakshyakanjani2313 3 ай бұрын
Dekh le upload hogyi hai
@lakshyakanjani2313
@lakshyakanjani2313 3 ай бұрын
​@@adelgado0723 ramayan khatam hogyi ye puchra ram ji kon the 🤦
@ghaziabadw3494
@ghaziabadw3494 2 жыл бұрын
thank you so so much for saving me at this last moment
@erenmedia2336
@erenmedia2336 Ай бұрын
Thank you. You are a true savior.
@Irina-k2p3m
@Irina-k2p3m 26 күн бұрын
أمري ياوردة في الدار 🌷 يازهر الليلك يا غار🌷 توج قلبي حتى صار🌷 لك يأمي🌷 أمي مهما عمري طال🌷 بدعاها يرتاح البال 🌷أيام الخير شلال من رضى أمي 🌷
@jameysiddiqui6910
@jameysiddiqui6910 2 жыл бұрын
This is basic discussion which is good, please can you explain the scenario where producer and consumer can work in paralell.
@kayakMike1000
@kayakMike1000 2 жыл бұрын
I don't think you really need semaphores and mutexes for this. The producer and consumer could be operating in parallel through some threading mechanism. Assuming there's only one consumer and one producer, we could have a read pointer "chase" the "writer" pointer. the consumer thread isn't allowed to change anything other than it's own read pointer, and we also assume that if the previous element in the buffer has already been consumed. If the consumer measures the read and write pointers to be identical, then the consumer doesn't use that value untill the write pointer is different. If the read and write pointers are different, the consumer consumes the data, then increments its read pointer to point at the next element in the buffer. Now the producer has a write pointer that will increment if the next element in the buffer is not where the read pointer is pointing to. The idea here is the read pointer always chases the write pointer, you could even do this with a ring buffer... With this scheme, the buffer is "empty" when everything has been read, and the read pointer and write pointer point at the same thing. The buffer is full if the write pointer can't advance because the next pointer is where the read pointer actually is..
@j4jeev678
@j4jeev678 Жыл бұрын
Just make 2 thread functions for each producer and consumer and then run both the threads and join it with main thread
@habibaadawi22
@habibaadawi22 Жыл бұрын
u are a life saver . thank u so much sir
@TheEkimjeet
@TheEkimjeet 2 жыл бұрын
great presentation and slides! love the content
@advithgowda620
@advithgowda620 Жыл бұрын
Brooo u r a life changer 😘
@zuhal6900
@zuhal6900 Жыл бұрын
That's what i've been looking for!!!! just perfect!!
@DrJALAGHARI
@DrJALAGHARI 3 жыл бұрын
A very good way of explanation. Keep it up.
@user-ytuser
@user-ytuser Жыл бұрын
thanks you explained an important topic in a easy manner
@codeWithNoComments
@codeWithNoComments 29 күн бұрын
Binary Semaphore and Mutex are different. At 4:29 they are being used interchangeably. To preserve a critical section, semaphore must not be used. It should've been an actual Mutex.
@snehasharma3041
@snehasharma3041 Жыл бұрын
Amazing explanation 🥹
@darshil-oh2le
@darshil-oh2le Жыл бұрын
Awesome explaination ✌✌
@adelgado0723
@adelgado0723 3 жыл бұрын
Thank you for the excellent content!
@EnigmaAI-88
@EnigmaAI-88 Жыл бұрын
Great videos 💯
@baraaabuasal5626
@baraaabuasal5626 3 жыл бұрын
i am an electrical engineer i dont know anything about cs but i saw the video, i clicked, i am now studying this problem with you and i understand everything. thank you but may i ask, what is this programming language?
@pranavvenkata475
@pranavvenkata475 3 жыл бұрын
the language used for the implementation of the solution is C
@lakshyakanjani2313
@lakshyakanjani2313 3 ай бұрын
Thapu
@putrescentvermin
@putrescentvermin 2 жыл бұрын
This was basically my OS project.
@PythonisLove
@PythonisLove 3 жыл бұрын
great content as always
@ith3r7
@ith3r7 8 ай бұрын
Well explained !!
@ayahamad5931
@ayahamad5931 Жыл бұрын
Thanks sir❤❤
@tasnimsart3430
@tasnimsart3430 3 жыл бұрын
Thanks so much
@arvinhipolito157
@arvinhipolito157 2 жыл бұрын
One of the best explanation. Thank you very much
@liorlivyatan
@liorlivyatan 2 жыл бұрын
Why performing signal(mutex) before signal(full)? If a context switch happens in between, won't it cause problems?
@kayakMike1000
@kayakMike1000 2 жыл бұрын
Why are they using mutexes and semaphores in the first place?
@-shultz
@-shultz Жыл бұрын
yeah , empty should be called before and then the lock must be released .
@kenzakhelkhal7931
@kenzakhelkhal7931 2 жыл бұрын
Thank u so much it was very helpful appreciate ur efforts
@thegamingsoul831
@thegamingsoul831 3 ай бұрын
Please call the mutex Locks by their name. mutex made that kinda confusing. 15:21
@Rachinter
@Rachinter 2 ай бұрын
Thank u
@mrymzrzr4741
@mrymzrzr4741 2 жыл бұрын
Thank you was really helpful
@sarthakpal5795
@sarthakpal5795 3 ай бұрын
How are we keeping track of the index in which the producer and consumer will insert or consume item?
@aryansharma9933
@aryansharma9933 2 жыл бұрын
Thank you!
@kayakMike1000
@kayakMike1000 2 жыл бұрын
I don't think you really need mutex or semaphores if you only have one producer for one consumer...
@sanathkumarshenoy9955
@sanathkumarshenoy9955 3 жыл бұрын
Nice one
@Language_unlocked
@Language_unlocked 2 жыл бұрын
Thxxx sirr
@rasikannanl3476
@rasikannanl3476 Жыл бұрын
Fantastic
@bellaajaziz7204
@bellaajaziz7204 3 жыл бұрын
can you please upload the remaining topics like deadlocks :)
@hmanmusic3908
@hmanmusic3908 Жыл бұрын
hi neso academy, a copyright thing is happening in our college. our college lecuturer is using your content by taking screen shots and using it to teach our classes. please raise a compliant and remove him from our college as fast as possible thanks in advance!
@hmanmusic3908
@hmanmusic3908 Жыл бұрын
😄
@hmanmusic3908
@hmanmusic3908 Жыл бұрын
your presentations are great keep it up!!
@farahmohamed2104
@farahmohamed2104 Жыл бұрын
precise
@marcustam4387
@marcustam4387 Жыл бұрын
I wonder if semaphores can solve this problem
@siddharthbhagat7637
@siddharthbhagat7637 Ай бұрын
bro whats the value of mutex when locked and release
@FarmanOfficial777
@FarmanOfficial777 3 жыл бұрын
this is called teaching....
@pranavmuthige427
@pranavmuthige427 2 жыл бұрын
Bhai Tu bhagwaan hai bhagwaan!!!
@modemharikumar9232
@modemharikumar9232 3 жыл бұрын
1st comment good lecture
@johndoe3092
@johndoe3092 3 жыл бұрын
Too many semaphores ! Can we do with just 1 ?
@michaelcenzoprano8173
@michaelcenzoprano8173 3 жыл бұрын
i agree, you should only need a mutex lock. You can just maintain a count of elements in the buffer.
@brahamaggarwal1800
@brahamaggarwal1800 3 жыл бұрын
The thing is when you are dealing with multiple processes that are sharing data then simple if-else statements fail to synchronize our processes that's why it is necessary to use these many semaphores here.
@adityamishrasc2579
@adityamishrasc2579 Жыл бұрын
🙏🙏🙏
@sricharan8575
@sricharan8575 Жыл бұрын
how semaphores solve bounded waiting since u said test.and.set.lock cant solve bounded waiting..coz new process may enter critica.sec while old one was preempted so called the unlucky process?????
@kswethakumari412
@kswethakumari412 Жыл бұрын
I haven't listened anything before
@hombdr.pathakkshetri8893
@hombdr.pathakkshetri8893 10 ай бұрын
wawwwaaaaa
@satioOeinas
@satioOeinas Жыл бұрын
i dont think this is the correct implementation
@NireekshaKulali
@NireekshaKulali 5 ай бұрын
Is this a false information??
@satioOeinas
@satioOeinas 5 ай бұрын
@@NireekshaKulalinot necessarily false, but I think it’s incorrect
@bash541
@bash541 3 жыл бұрын
I LOVE YOU HABIBI
@mohammddmaloulle6654
@mohammddmaloulle6654 2 ай бұрын
Thanks
The Readers Writers Problem
15:32
Neso Academy
Рет қаралды 286 М.
Semaphores
22:51
Neso Academy
Рет қаралды 530 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 180 М.
The Dining Philosophers Problem
20:16
Neso Academy
Рет қаралды 371 М.
Interprocess Communication
12:49
Neso Academy
Рет қаралды 705 М.
This GitHub repository should be illegal
9:21
Mehul - Codedamn
Рет қаралды 4,5 М.
Peterson’s Solution
21:31
Neso Academy
Рет қаралды 448 М.
Monitors
13:46
Neso Academy
Рет қаралды 220 М.
Multithreading Models & Hyperthreading
17:57
Neso Academy
Рет қаралды 307 М.