Peterson’s Solution

  Рет қаралды 439,395

Neso Academy

Neso Academy

Күн бұрын

Пікірлер: 186
@anirudh7137
@anirudh7137 2 жыл бұрын
Hands down the best explanation of Peter's Solution. The concept of 'humbly giving the other turn' made it much more clear.
@amasaadi382
@amasaadi382 Күн бұрын
%100 agree
@ishvendra3395
@ishvendra3395 3 жыл бұрын
I am doing a paid course and I couldn't understand their explanation so I came here and wow this explanation is soo better xD .. Neso academy rocks!!
@mArjunyadav
@mArjunyadav 3 жыл бұрын
what is the course for? Can u share it?
@srishylesh2935
@srishylesh2935 3 жыл бұрын
yes. same qn
@anonymousguy9263
@anonymousguy9263 2 жыл бұрын
@@mArjunyadav doesn't matter Neso academy has far good content for a free cost.. We like everything free if it is available anywhere..
@ChaitanyaRacharla
@ChaitanyaRacharla 2 жыл бұрын
@@anonymousguy9263 Lol no bro it ain't free, you gotta pay for the chapters further
@anonymousguy9263
@anonymousguy9263 2 жыл бұрын
@@ChaitanyaRacharla yes ı know and ı paıd for ıt.. It ıs very nominal..
@chandrachurmukherjeejucse5816
@chandrachurmukherjeejucse5816 Жыл бұрын
The best lecture on Peterson's solution that I have watched till now 🔥
@gatecseaspirant-dk9ze
@gatecseaspirant-dk9ze 2 ай бұрын
then you had watched all the wrong lectures till now..... Man did not explain how to check M.E., progress and B.W... he just read the code
@GTBBwastaken
@GTBBwastaken 2 жыл бұрын
I was sceptic about watching this video due to its length. However, very good and thorough explanation. I came up with this real life example when both processes want to enter their critical section: 1. You and your friend both want to enter a bus. 2. You insist your friend that he/she enters first. 3. But your friend is insisting that you enter first. 4. Not to cause any delay, you enter first. 5. Your friend enters after you. P.S. Happens to me many times in real life. I want to let people go first and they insist that I go first. So, to not delay any further I go first.
@aniketkulkarni3013
@aniketkulkarni3013 Ай бұрын
No one has been able to explain this algorithm in depth. Thank you so much; I am truly grateful for your help.🙌🙏
@mostafatarekadam8861
@mostafatarekadam8861 2 жыл бұрын
Thank you I understand it clearly now, the key is to draw the two processes and trace the instructions
@TheRkmutube
@TheRkmutube 2 жыл бұрын
Your videos are amazingly simple and easy to understand and most importantly your humble variable 😀 first of its own kind man!!
@AyaNori
@AyaNori Жыл бұрын
I think the while loop is supposed to be while(flag[j] && turn=j); instead of turn=[j] since j is an int, not an array. but anyway, I agree with everyone! you're videos have helped me so much!!
@franklinmaradiaga2401
@franklinmaradiaga2401 4 ай бұрын
WOWWWW, what can i say... This is hands down the absolute best explanation of Peterson's Solution!!! My book was def not enough to get it, and I just didn't even try to understand it, but with ur video, I feel like I understood all of the algorithm!
@Oberon621
@Oberon621 2 жыл бұрын
These videos are excellent. I like to watch these first and then glide through the textbook after.
@sayonislam7222
@sayonislam7222 3 жыл бұрын
Peterson's solution be like - "Pehle aap jaiye, nhi nhi pehle aap, " 😅😂
@Emaaaaaas
@Emaaaaaas Жыл бұрын
😂🎁
@Mr_ll_7o7_ll
@Mr_ll_7o7_ll Ай бұрын
Quick understanding: as both process wants to enter first turn value is set to j in left hand part And in the right hand part turn is set to I So now turn has i value Left hand part becomes false (left hand while loop become false) So p0 Is executed and the right hand part the while condition is true(as turn is set to I)it keeps on looping and doesn't let p1 (pj) enter the critical section after completing p1 in the LHS part i = false is set Then now in the RHS the while condition becomes false and j can enter critical section
@begumonal
@begumonal Жыл бұрын
well explained, made me pass my exam. thank you so much for the great content.
@SonuGupta-wj6dg
@SonuGupta-wj6dg 3 жыл бұрын
it's 3:30 am . I've exam at 11 and this video can't be more awesome than it is😎
@radaefilms3150
@radaefilms3150 3 жыл бұрын
I'm in the same position dude
@SonuGupta-wj6dg
@SonuGupta-wj6dg 3 жыл бұрын
@@radaefilms3150 hold on 😂
@areejaasna
@areejaasna 3 жыл бұрын
@@SonuGupta-wj6dg lol guess who join the squad :"")
@heutras
@heutras 3 жыл бұрын
bois you forgot about me
@radaefilms3150
@radaefilms3150 3 жыл бұрын
@@heutras 😂😂😂 na were in this together how'd ur exam go
@akshatsrivastava2007
@akshatsrivastava2007 Жыл бұрын
Thankyou Very much Clear and lucid Explanation Able to understand easily..😊
@kubraoztiryaki5876
@kubraoztiryaki5876 Жыл бұрын
the best video i've ever watched about peterson's solution. i think you used feynman technique in a good way :)
@darshilvshah
@darshilvshah 3 жыл бұрын
The explanation is simply fabulous
@srisangeeth4131
@srisangeeth4131 Жыл бұрын
Most clear explanation of Peterson solution ,Thanks for the video👍👍
@sameensultana1737
@sameensultana1737 2 жыл бұрын
The topics are explained so well.
@shashankh3
@shashankh3 2 жыл бұрын
the explanation!!! truly amazing
@prakhar266
@prakhar266 Жыл бұрын
this was the best video on Peerson's Solution. Thanks man
@meghanareddy2197
@meghanareddy2197 3 жыл бұрын
So well explained 👏👏
@wizardop2100
@wizardop2100 Жыл бұрын
Best explanation ❤. Thank you sir
@TamilazhaganS-x7v
@TamilazhaganS-x7v Жыл бұрын
Very much satisfied with the answer. Thanks for the flawless explanation.
@Anuparna_Gangopadhyay
@Anuparna_Gangopadhyay 11 ай бұрын
Your explanation is very good sir❤ & it's very much helpful
@sakshisomani7558
@sakshisomani7558 2 жыл бұрын
Your teaching is next level
@rohitkandula8493
@rohitkandula8493 Жыл бұрын
💫💫✨✨Better explnation than our college🔥🔥🔥🔥🔥🔥
@rayvinlai7268
@rayvinlai7268 2 жыл бұрын
Thanks,the explanation of semicolon after while helps me a lot
@mich1970
@mich1970 8 ай бұрын
This is so well made, ty so much. I understood it perfectly
@wendymcdonald7351
@wendymcdonald7351 Жыл бұрын
Thank you for the OS save! Could not understand this via the textbook.
@AbhishekRaj-on3xi
@AbhishekRaj-on3xi Жыл бұрын
Thank you Neso Academy for the amazing explanation ❤️
@tanvirhasanmonir1627
@tanvirhasanmonir1627 3 жыл бұрын
Very well explanation, easy to understand
@Haleemasultan1
@Haleemasultan1 Күн бұрын
loved the explanation .
@learning_new
@learning_new Жыл бұрын
Well explanation sir... really you are God gifted one❤️
@taniyabhagat4315
@taniyabhagat4315 Жыл бұрын
bestest explanation ever on youtube🤩
@rohitkandula8493
@rohitkandula8493 Жыл бұрын
From 12:42 watch for detail explanation ~~~🫶🔥🔥
@datanerden1057
@datanerden1057 28 күн бұрын
Great video! But there is a mistake in the example of the solution. In the while loop, it says turn == [i], but it should be turn == i. The same for process i, where it should be turn == j, not turn == [j].
@twoPointers123
@twoPointers123 2 ай бұрын
maturity when you realise it is not humble just pretend to be humble 💀💀💀💀💀💀💀💀💀💀💀💀💀💀🥲🥲🥲🥲🥲🥲🥲🥲🥲🥲
@swadheenta.957VBTS
@swadheenta.957VBTS 8 ай бұрын
you are amazing sir really . thank you soo much. you deserve to be honoured by best teacher of india. i really want to recommend for this honour . thank you 💜💜
@SkyV77
@SkyV77 8 ай бұрын
@iovewhalien2191
@iovewhalien2191 Жыл бұрын
thank you so much for this video, I could not understand my textbook at all. you explained this so clearly, I understood it right away!
@rumiNITPatna
@rumiNITPatna 2 ай бұрын
thank u so much for such a wonderful explanation.
@msatyabhaskarasrinivasacha5874
@msatyabhaskarasrinivasacha5874 5 ай бұрын
Neso academy zindabad....long live neso academy🎉🎉🎉
@cloudjumper725
@cloudjumper725 Ай бұрын
The problem I can see with this is that it is uses critical section to solve cs problem itself. By defenition: cs - segment of code, which is present in every process, in which the process may be changing data stored in shared memory. turn variable is shared, so, by defenition it is a critical section and executing them concurently leads to race condition but it does not affect it because value is assigned anyway so one of the procesess will enter and pass execution to the next one after exiting cs
@CodeMode9313
@CodeMode9313 Жыл бұрын
its the best explaination ...to the exceution ..thank u so much
@arthiannamalla5028
@arthiannamalla5028 3 жыл бұрын
I was literally waiting for this....thank you so much
@elijahparker1789
@elijahparker1789 Жыл бұрын
Thank you so much for this video. It's amazing how bad college professors can be at explaining something
@yashraikwar5412
@yashraikwar5412 8 ай бұрын
Nicely explained 💯🙏🏻❤️
@kavyakavya7258
@kavyakavya7258 Жыл бұрын
Really awesome class thank you so much sir for this good class 🙏😊
@paragggoyal1552
@paragggoyal1552 2 ай бұрын
i cried during the video, it should have required 5 minutes not 20 minutes. sorry this might not be the popular opinion but it is true for me. also, telling the process vs telling the proof are completely different things.
@zishuning
@zishuning Жыл бұрын
Very clear, thank u
@reenaantony4984
@reenaantony4984 Жыл бұрын
Thank you ❤ for the beautiful lecture
@sreegeeta5897
@sreegeeta5897 Ай бұрын
thanks for the explanation
@ShravanthiK-wj3vb
@ShravanthiK-wj3vb 3 ай бұрын
I'm hving exm after 3hours I'm seeing urs i grt understood
@장현정-x8f
@장현정-x8f 7 ай бұрын
Thank you for making me understand ! Even in Korea, I'm watching this ~~ ;)
@sanjuvikasini1598
@sanjuvikasini1598 Жыл бұрын
Thank you so much for the informative video!
@btcdivine
@btcdivine 8 ай бұрын
Excellent explanation
@dinushachathuranga7657
@dinushachathuranga7657 Жыл бұрын
Thanks a lot for the clear explanation
@manthankhandale23
@manthankhandale23 9 ай бұрын
Well Explained. Thanks a lot!
@danielleananga7743
@danielleananga7743 11 ай бұрын
you guys are life savers😭😭
@iosifpuha6114
@iosifpuha6114 8 ай бұрын
Neso Academy: a name, a guarantee
@peterlearnsCS
@peterlearnsCS 8 ай бұрын
Thank you, well-explained! Be humble! 😅
@lydiaarabi4811
@lydiaarabi4811 Жыл бұрын
tré tré bonne explication😍😍
@kautukraj
@kautukraj 2 жыл бұрын
Very helpful, thank you.
@divyaagarwal3091
@divyaagarwal3091 2 жыл бұрын
Awesome Explanation
@fiona2678
@fiona2678 3 жыл бұрын
Awesome explanation sir.
@anaranyabose
@anaranyabose 2 жыл бұрын
Best explanation than the book 😍
@michelecorc
@michelecorc 2 жыл бұрын
omg finally i understand, thx neso
@laluyadav1828
@laluyadav1828 Жыл бұрын
Really helpful thanks bro
@saurabhbhargava6290
@saurabhbhargava6290 2 жыл бұрын
"flag(j/I)" is sufficient. " turn == " is redundant. Also both processes can get stuck at while if both flags are true which can happen when both processes execute simultaneously. It works only when P1 and P2 are in queue.
@sameermeshram3062
@sameermeshram3062 3 жыл бұрын
Sir upload the video of control system
@l6e6i6n
@l6e6i6n 2 жыл бұрын
when Pi writes its flag value it is possible that Pj could also be attempting to read from that value in that instant of execution if Pi's write is not atomic then could'nt this cause another race condition on Pi's flag value such that Pj reads a half written/corrupt value
@thongtranlequoc688
@thongtranlequoc688 Жыл бұрын
I prefer "interested" instead of "flag"
@bpravalika-2924
@bpravalika-2924 3 жыл бұрын
amazing explanation sir
@nojoodothmanal-ghamdi1026
@nojoodothmanal-ghamdi1026 3 жыл бұрын
OMG I understood it! Thank you!
@ankushladani496
@ankushladani496 2 жыл бұрын
Awesome explaination..
@muhidshaikh6446
@muhidshaikh6446 2 жыл бұрын
well explained👍👍👍
@Asim_Usama
@Asim_Usama 2 жыл бұрын
JazakAllah😇
@nileshtiwari7499
@nileshtiwari7499 2 жыл бұрын
awesome explanation !!
@divyaagarwal3091
@divyaagarwal3091 2 жыл бұрын
Thankyou so much sir
@Hutero
@Hutero Жыл бұрын
holy this is amazing, THANKS ALOT
@siddiquabegum-l2v
@siddiquabegum-l2v Жыл бұрын
tq soooooooooooooooooooooooooooooooooooooooooooooooooooo much you helped me lot
@pawloaspaja289
@pawloaspaja289 2 жыл бұрын
Thank you so much. Well explained.
@wassup102
@wassup102 2 жыл бұрын
Thank you sir
@ShmuelIntayeb
@ShmuelIntayeb 9 ай бұрын
but how can i know who is the last one to modify the turn variable? (who will be the first one to enter the critical section) does the processor just choose one of them randomly?
@कशिशदीक्षित
@कशिशदीक्षित 7 ай бұрын
Thankyou so much...
@ankursharma8973
@ankursharma8973 Жыл бұрын
my teacher took 4 hours of lectures and i didn't get crap. she must watch this video
@chitradey3708
@chitradey3708 Жыл бұрын
Thanks ❤❤
@stockoverflowrecursive
@stockoverflowrecursive Жыл бұрын
I want to ask that how can you make sure the updation of variable flag[] and turn is synchronized? If they are not been synchronized, this solution doesn't work right? Anyone can explain this?
@ajaykumarmodugu9155
@ajaykumarmodugu9155 3 жыл бұрын
Thank you very much
@ahmetkarakartal9563
@ahmetkarakartal9563 Жыл бұрын
Allah sizden razı olsun
@ninjanape
@ninjanape 2 жыл бұрын
beautiful, thank you!
@MinakshiBiradar-m7s
@MinakshiBiradar-m7s Жыл бұрын
Just amazing one
@__.solitary
@__.solitary Жыл бұрын
Thanks ❣️
@diwang4572
@diwang4572 3 жыл бұрын
Thank you sir!!
@dianafarhat9479
@dianafarhat9479 Жыл бұрын
Can you please explain why the solution doesn't work on modern computer architectures?
@AlanSchooll
@AlanSchooll Жыл бұрын
This algorithm is strange, providing the solution that shared resources cannot access by more then one process at a time, based on variables that are shared and accessed by both processes at the same time, variables such as flag and turn.
@samerbehery7799
@samerbehery7799 3 жыл бұрын
Thank You
@konscomputertutorials7473
@konscomputertutorials7473 3 жыл бұрын
what a clear explanation
@عبدالرحمنخالد-ش4ت6ي
@عبدالرحمنخالد-ش4ت6ي 2 жыл бұрын
thanks a lot ❤
@Nameiscantsay
@Nameiscantsay 3 ай бұрын
Why don't KZbin has 4x speed?
Test and Set Lock
19:01
Neso Academy
Рет қаралды 255 М.
Semaphores
22:51
Neso Academy
Рет қаралды 520 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Peterson's Solution for critical section problem
21:42
Sudhakar Atchala
Рет қаралды 99 М.
The Readers Writers Problem
15:32
Neso Academy
Рет қаралды 280 М.
fork() and exec() System Calls
20:34
Neso Academy
Рет қаралды 444 М.
Tools EVERY Software Engineer Should Know
11:37
Tech With Tim
Рет қаралды 19 М.
Dining Philosophers Solution using Monitors
15:04
Neso Academy
Рет қаралды 122 М.
The Critical-Section Problem
13:50
Neso Academy
Рет қаралды 348 М.
5 Math Skills Every Programmer Needs
9:08
Sahil & Sarra
Рет қаралды 1,1 МЛН
how does a Mutex even work? (atoms in the computer??)
4:17
Low Level
Рет қаралды 72 М.
Process Synchronization
21:26
Neso Academy
Рет қаралды 409 М.