Thanx a lot ... Sir, You got me job today as interviewer asked me to write the code of producer-consumer problem.. & I explained the same way u told & he was very much impressed..Thanx a lot again !!!
hello sir.. three days ago I came across your videos of dbms and os.after referring many videos available on RUclips. I was amazed the way you teach any topic.. can't take my eyes off the topic.. every video of yours makes my concept of the subject more clear.especially the examples you put from previous years of gate exam. Thank you so much Sir ! 😊 I also request you to please add more videos on operating system from competitive point of view.
sir please upload solution for all gate o.s. questions ..your videos are very very helpful to me in my gate preparation ..plzz plzz upload solution for gate questions...thanks a lot for explanation...
ab tak jitna bhi gate lecture dekha sabse achha knowledge ka laga...mza aa gya small to small confusion bhi clear ho gya ..these were the toughest topic i found... but u made these so easy by ur teaching methology,,,,,, thankyou very much sir....
Hello Sir, Awesome videos..great to learn things in very easy manner...I study at one of India's leading engineering college but I can say this undoubtedly that I learn more from you than my professors.:)
Each and every words spoken by you has some meaning and your explanations are always in a systematic manner. Hope I could have learnt COMPUTER ARCHITECTURE too from you.It took me one month for COA but still the concept is not as clear as it should be. Thanks once again!!!!!sir.
perfect explanation! By your explanation I understood why we write wait(E) before wait(S) in producer code. Because when E=0, you need to wait (No item can be produced further). So there is no point in acquiring lock if you cannot produce further
Hi Ranganatha, we truly appreciate your kind words for our efforts.We upload more topics every week, Please subscribe this channel for best GATE tutorials.
These videos are great. Truly grateful for your lectures . On the language switch part, I don't mind it. To be honest, it feels like a plus point to me. When I am stuck on a concept, sometimes the hindi phrasing helps me visualize it better.
You are most welcome dear 😍 Great that you understood the concept clearly 👍 Keep learning & supporting ! Do visit our website www.knowledgegate.in for more amazing courses & contents 👍😊
hi sir you are making me able to score the marks in synchronization topic in Gate 2017,thankssss a lot sir. please complete synchronization so that no gate question will escape
thanks to you sir......you have awesome techniques to explain every basing concept. And I am waiting for next topic (page management ). I hope you will make same video clips. Thank you again ..... and best of luck for your KNOWLEDGE GATE.
Thank you sir, this is really helpful. But as others have already mentioned, mixing languages in the mid of the sentence is really confusing especially when your viewers don't understand hindi.
Sir I like your videos very much.and learn alot. But want yo request you please add some more videos on Operating system in memory management because in paging and segmentation there are many questions on gate. Please sir as soon as possible.
Great explanation sir. :-) But i have a question. If after executing wait(E) for producer process we context switch to consumer process den wait(F) will lead to a decrement in the semaphore F by 1 i.e. both E and F will be decremented by 1.Now if producer/consumer process executes then signal(F)/signal(E) will be incremented by 1 which will give us the previous values of E and F again instead of increasing the value of F(in case of producer) or E(in case of consumer) by 1. Similarly if after executing wait(S) for producer process we context switch to consumer process den wait(F) will decrease the value of F by 1 but the consumer process will not execute as S now equals 0 and hence consumer process gets trapped so the producer process will continue further and after executing signal(F) F will be incremented to its previous value where it was supposed to be 1 more than its previous value. Waiting for your response sir... Thank you in advance...
it seems ur observation and not question. What u said is correct, e/f values be changed but due to wait(s), no issues, I've checked with many context switches
If anybody know, answer this question Write the necessary code segments to illustrate producer-consumer problem using a boundedbuffer according to the features given below: • Bounded-buffer size is 30 elements • Producer will check for the buffer is full and if not, it will produce a single item and insert it to the next free element of the bounded-buffer. • Consumer will consume a single item at a time. • Consumer will check whether the buffer has sufficient elements to consume it will consume a single item at a time. • If the buffer doesn’t have elements, then the consumer doesn’t consume elements. You are required to 1. Define a queue to store items from producer. 2. Write the producer program to produce items 3. Write the consumer program to consume items
sir...u are fabulous.... placements are going on... hope we get next important videos soon....specially memory management ,threads, v.m. ,deadlock... plz plz plz... upload soon... thnx in advance...
Congratulations for hard work ...... Please add more videos on other topic of OS such as multilevel page table, virtual memory, file system and deadlock
Hi Nikita, Thank you so much for showing your interest, We'll try to cover all the topics as soon as possible. Please subscribe this channel for regular updates. :)
Sir Good lecture. Just signal(S) has to be placed as last instruction for both producer and consumer. Otherwise without incrementing values of F and E context switch can happen and lead to inconsistency. Am I right sir?
Hi Waleed, we truly appreciate your kind words for our efforts.We upload more topics every week, Please subscribe this channel for best GATE tutorials.
Hello Sir, Firstly, I would like to say that your videos are really awesome and comprehensive and helped me a lot. Now coming to the point, I have a doubt regarding the semaphores. How are semaphore variables are shared between processes? Thanks and regards, Bishwa
Hi Sir, please guide on how to buy your entire lectures or how to get subscription? Also is there any separate course for NIC Scientist exam ? Thank you. You are an exceptional teacher. Lots of gratitude. Thank you
Hi Pranav, we truly appreciate your kind words for our efforts.We upload more topics every week, Please subscribe this channel for best GATE tutorials. :)
thanks for ur efforts! ur lectures helped a lot to clear concept and understanding the way to solve the problems in less amount of time in exams like GATE. Thanks! BUT i also wonder if u can teach us about memory management(paging, segmentation and virtual memory) and gate problems on that and how to solve them... if u do it will be great help to all students. again very very thank you, Sir.
Very great lecture. But I agree with some of the comments that u should use only english. We north Indians can understand it but you will lose tons of worldwide users.
Great job sir ..... Your way of explaining the topic and solving the query is commendable ..... Thank You So much. Can you upload videos on Software Engineering? SE is an important subject of UGC NET. Once again Thanks a lot.
Very well explained sir. I have already started recommending this channel to a lot of my friends as they can actually learn something!! It would also be nice if you could explain Dining Philosopher problem :)
Hi Parth, we truly appreciate your kind words for our efforts.We upload more topics every week, Please subscribe this channel for best GATE tutorials. :)
i think in producer part ,signal (f ) should come before signal(s) ..because if bfor incrementing the F , if consumer tries to access , at starting he will find it empty as F is not incremented ..even though there is an element appended in by producer
HI Sanchit, Whats the main difference between Critical section section and Mutex, Previously I was thinking that critical section is used to syncronize the threads within the same process and mutex is used to synchronze the threads between multiple processes, But you told that with critical section we can do context switching, that means even with critical section we can handle synchronization between 2 processes. Please suggest
Hi Ashutosh, Thank you so much, would like to hear more from you. We upload more topics every week, Please subscribe this channel for best GATE tutorials.
that's a brilliant explanation. the best explanation ever. hats off Sir. please continue to make the videos, you are helping so so many students. the blend of English and hindi works like a charm. Using hindi in your work is very good idea please don't stop it. waiting for the deadlock series. God will surely bless you for your kind work of educating the masses. thanks. Jai Hind.
sir, lectures r awesome!! way of explanation of prbm is fantastic!! watched all ur videos.. thanks to u.. (plz make a video on dinig philosopher problem..)
sir can you help me for this problem Q1-Consider a producer-consumer situation, where a process P produces an integer using the function produceNext() and sends it to process C. Process C receives the integer from P andconsumes it in the function consumeNext(). After consuming this integer, C must let P know, and P must produce the next integer only after learning that C has consumed the earlier one. Assume that P and C get a pointer to a shared memory segment of 8 bytes, that can store any two 4-byte integer-sized fields, as shown below. Both fields in the shared memory structure are zeroed out initially. P and C can read or write from it, just as they would with any other data object. Briefly describe how you would solve the producer-consumer problem described above, using only this shared memory as a means of communication and synchronization between processes P and C. You must not use any other synchronization or communication primitive. You are provided template code below which gets a pointer to the shared memory, and produces/consumes integers. You must write the code for communicating the integer between the processes using the shared memory, with synchronization logic as required. struct shmem_structure { int field1; int field2; }; (a) Producer: struct shmem_structure *shptr = get_shared_memory_structure(); while(1) { int produced = produceNext(); } (b) Consumer: struct shmem_structure *shptr = get_shared_memory_structure(); while(1) { int consumed; //fill this value from producer consumeNext(consumed); }
For complete Operating System, check out this video: ruclips.net/video/xw_OuOhjauw/видео.html
Thanx a lot ... Sir, You got me job today as interviewer asked me to write the code of producer-consumer problem.. & I explained the same way u told & he was very much impressed..Thanx a lot again !!!
#Apurv Utkarsh can u please mention the company interview in which u were asked for this ?
Nice video
ruclips.net/video/Vn_X6Oi90mw/видео.html
@@ManojKumarSur you are legend
hello sir.. three days ago I came across your videos of dbms and os.after referring many videos available on RUclips. I was amazed the way you teach any topic.. can't take my eyes off the topic.. every video of yours makes my concept of the subject more clear.especially the examples you put from previous years of gate exam. Thank you so much Sir ! 😊
I also request you to please add more videos on operating system from competitive point of view.
Thank you Ankita
And Surely we will upload more topics and depth full contents
Subscribe our channel for updates
KNOWLEDGE GATE I am also agree with Ankita .and want to request please enter some more videos on Operating system .
sir please upload solution for all gate o.s. questions ..your videos are very very helpful to me in my gate preparation ..plzz plzz upload solution for gate questions...thanks a lot for explanation...
finally i feel like i have 2 ears!
😂true
Holy crumbcake this guy starting speaking hindi out of f nowhere
Haha.. this cracked me up :D
hahaahahaah
Gotta love Jains
Haha, u got me focus on different thing other than the topic sir is teaching 😂😂
ab tak jitna bhi gate lecture dekha sabse achha knowledge ka laga...mza aa gya small to small confusion bhi clear ho gya ..these were the toughest topic i found... but u made these so easy by ur teaching methology,,,,,, thankyou very much sir....
Even though many students have already told how excellent you are, but please let me make it louder.
You are amazing sir :D
Hello Sir,
Awesome videos..great to learn things in very easy manner...I study at one of India's leading engineering college but I can say this undoubtedly that I learn more from you than my professors.:)
This playlist saved my finals.
mine too :p
mine too
Kashish Nada going to save mine :)
Pratiksha Garode how do you get so many subs?
This is saving my placements
I am not indian, but I understand hindi , thank god , you are a life saver
Most welcome dear 😍Keep learning & supporting ! Do visit our website www.knowledgegate.in for more amazing courses & contents 👍😊
while(T)
{
printf ("You are doing great job sir. God bless you.");
}
@@weights5683 compilation error
awesome
@@gladyouseen8160 😂
Each and every words spoken by you has some meaning and your explanations are always in a systematic manner. Hope I could have learnt COMPUTER ARCHITECTURE too from you.It took me one month for COA but still the concept is not as clear as it should be. Thanks once again!!!!!sir.
u are just awesome sir...
u dont know but you are saving careers of many students..
best teacher ever!!!
he is not only saving careers, but he is also making careers as well :)
perfect explanation! By your explanation I understood why we write wait(E) before wait(S) in producer code. Because when E=0, you need to wait (No item can be produced further). So there is no point in acquiring lock if you cannot produce further
It's for the very first time that I could understand the producer consumer in a very easy manner. Thanku broder.
Producer-Consumer problem explained in the simplest and best possible way!! Like it! Thanks :)
You are the savior for every engineering student! Thank you for creating this channel and helping all the students!
Best and simplest explanation of Producer Consumer problem. Keep producing, we will keep consuming :). Thank you.
Very clearly articulated. Thank you!
Hi Ranganatha, we truly appreciate your kind words for our efforts.We upload more topics every week, Please subscribe this channel for best GATE tutorials.
These videos are great. Truly grateful for your lectures .
On the language switch part, I don't mind it. To be honest, it feels like a plus point to me. When I am stuck on a concept, sometimes the hindi phrasing helps me visualize it better.
sir the same code has been given in the stalling but i was never able to get how it Worked , Thanx sir, you are just awesome.
awesome! really helpful sir, continue to make more videos it helps many students.
You have turned such a complex topic so Simple and clear!!!! The concepts are very Clear Now Thank you so Much Sir
You have gained one Subscriber
You are most welcome dear 😍 Great that you understood the concept clearly 👍 Keep learning & supporting ! Do visit our website www.knowledgegate.in for more amazing courses & contents 👍😊
Great explanation sir ji really u are best when it comes to OS
void lecture (os)
{
while (tutor == Sanchit Jain)
{
wait(toughness);
signal(understanding);
}
}
Really helps a lot to understand this, mainly gives a clear understanding of how to implement them.
hi sir you are making me able to score the marks in synchronization topic in Gate 2017,thankssss a lot sir.
please complete synchronization so that no gate question will escape
excellent work sir.. sharing knowledge to others is the best thing a person can do.. going through all your videos on OS
sir you are great ,extrardinary teaching style
Each and every word of write in my exam is only because of you sir. Thankyou
thanks to you sir......you have awesome techniques to explain every basing concept. And I am waiting for next topic (page management ). I hope you will make same video clips.
Thank you again ..... and best of luck for your KNOWLEDGE GATE.
Thank you sir, this is really helpful. But as others have already mentioned, mixing languages in the mid of the sentence is really confusing especially when your viewers don't understand hindi.
superb explaination sir.Really helpful.
similar to other videos, this one was also very informative. well done
Fantastic Explanation Sir.
Awesome video sir!!
How can you be so perfect. Thanks KG for my NET
loved ur explanation .subscribed just after watching for 1min.very clear and neat explanation.
Sir I like your videos very much.and learn alot. But want yo request you please add some more videos on Operating system in memory management because in paging and segmentation there are many questions on gate. Please sir as soon as possible.
Please Upload Remaining Topics & Previous Year GATE Questions videos ASAP, Your videos are very helpful.
thank you so much.....you made it so easy to understand...
best explanation ever , tysm sir . Love from Pune
Thank you so much Sanket! Keep learning & stay connected! You can also check out our website www.knowledgegate.in for more amazing videos & contents👍😊
Thank you Sir, the way you teach is just amazing!!!
Great explanation sir. :-)
But i have a question.
If after executing wait(E) for producer process we context switch to consumer process den wait(F) will lead to a decrement in the semaphore F by 1 i.e. both E and F will be decremented by 1.Now if producer/consumer process executes then signal(F)/signal(E) will be incremented by 1 which will give us the previous values of E and F again instead of increasing the value of F(in case of producer) or E(in case of consumer) by 1.
Similarly if after executing wait(S) for producer process we context switch to consumer process den wait(F) will decrease the value of F by 1 but the consumer process will not execute as S now equals 0 and hence consumer process gets trapped so the producer process will continue further and after executing signal(F) F will be incremented to its previous value where it was supposed to be 1 more than its previous value.
Waiting for your response sir...
Thank you in advance...
it seems ur observation and not question. What u said is correct, e/f values be changed but due to wait(s), no issues, I've checked with many context switches
at the end everything will be correct
If anybody know, answer this question
Write the necessary code segments to illustrate producer-consumer problem using a boundedbuffer according to the features given below:
• Bounded-buffer size is 30 elements
• Producer will check for the buffer is full and if not, it will produce a single item and insert it to the next free element of the bounded-buffer.
• Consumer will consume a single item at a time.
• Consumer will check whether the buffer has sufficient elements to consume it will consume a single item at a time.
• If the buffer doesn’t have elements, then the consumer doesn’t consume elements.
You are required to
1. Define a queue to store items from producer.
2. Write the producer program to produce items
3. Write the consumer program to consume items
I like the way you teach and specially the way you say "very good"😊
so simple explanation....thank u so much...!!!
Sir you are a savior
sir...u are fabulous.... placements are going on... hope we get next important videos soon....specially memory management ,threads, v.m. ,deadlock... plz plz plz... upload soon... thnx in advance...
Congratulations for hard work ...... Please add more videos on other topic of OS such as multilevel page table, virtual memory, file system and deadlock
Hi Nikita, Thank you so much for showing your interest, We'll try to cover all the topics as soon as possible. Please subscribe this channel for regular updates. :)
Thnx sir plz do a video on counting semaphore......thnx
Sir Good lecture. Just signal(S) has to be placed as last instruction for both producer and consumer. Otherwise without incrementing values of F and E context switch can happen and lead to inconsistency. Am I right sir?
Wonderfully explained thankyou so much Sir!❣️
your lectures are stunning to much brillent
Hi Waleed, we truly appreciate your kind words for our efforts.We upload more topics every week, Please subscribe this channel for best GATE tutorials.
Good one very helpful please make a tutorial on memory management
great lecture sir .... I am a fan of you
plz make tutorials on deadlocks... thx a lot... this content is very helpful...
Nice explanation.Thanks.
thank u sir ....waiting for next video. you cleared all concept very easily.
Dhanyavad sir ji😆
Hello Sir,
Firstly, I would like to say that your videos are really awesome and comprehensive and helped me a lot. Now coming to the point, I have a doubt regarding the semaphores. How are semaphore variables are shared between processes?
Thanks and regards,
Bishwa
Consider OS to be like a big program, and processes to be various functions. Semaphores would be like global variables
thanks for teaching sir.
sir aap jaise padate h waise hi padaya kariye...english ho ya hindi apke padhane k way acha hai...sir os ke aur v video upld kriye pls
Hello Anjali, Thank you so much apki is tareef ke liye or hum jaldi hi or videos upload karenge. :)
:-)
Hi Sir, please guide on how to buy your entire lectures or how to get subscription? Also is there any separate course for NIC Scientist exam ? Thank you. You are an exceptional teacher. Lots of gratitude. Thank you
Kudos!! Thanks sir. Very nice explaination. :)
Hi Pranav, we truly appreciate your kind words for our efforts.We upload more topics every week, Please subscribe this channel for best GATE tutorials. :)
thanks for ur efforts!
ur lectures helped a lot to clear concept and understanding the way to solve the problems in less amount of time in exams like GATE. Thanks!
BUT i also wonder if u can teach us about memory management(paging, segmentation and virtual memory) and gate problems on that and how to solve them... if u do it will be great help to all students.
again very very thank you, Sir.
Very great lecture. But I agree with some of the comments that u should use only english. We north Indians can understand it but you will lose tons of worldwide users.
very good explanation I liked this video ...and really it is helpful for m thnk u
Your lectures are beauty.
this explains the concept so easily, thanks for the video.
thank you very much sir ...this is really very helpful..really great video.
Simply superb..
Thanks perfect explanation 🙏🙏🙏
Great job sir ..... Your way of explaining the topic and solving the query is commendable ..... Thank You So much.
Can you upload videos on Software Engineering? SE is an important subject of UGC NET.
Once again Thanks a lot.
sir, your lectures are highly beneficial. waiting for your next lecture on memory management
Very well explained sir. I have already started recommending this channel to a lot of my friends as they can actually learn something!! It would also be nice if you could explain Dining Philosopher problem :)
great helped me for my exam
sir please upload paging,segmentation,resource allocation graph etc..
Excellent videos
Dhanywad appka
Great video dude hats off!!!
Hi Parth, we truly appreciate your kind words for our efforts.We upload more topics every week, Please subscribe this channel for best GATE tutorials. :)
i think in producer part ,signal (f ) should come before signal(s) ..because if bfor incrementing the F , if consumer tries to access , at starting he will find it empty as F is not incremented ..even though there is an element appended in by producer
Best lecture !
well explained sir awesome
superrrbbbly explained.... Great Effort Brother :-)
I m surprised how can sm1 unlike this kind of an explanation
HI Sanchit, Whats the main difference between Critical section section and Mutex, Previously I was thinking that critical section is used to syncronize the threads within the same process and mutex is used to synchronze the threads between multiple processes, But you told that with critical section we can do context switching, that means even with critical section we can handle synchronization between 2 processes. Please suggest
Too many ads.
Else, excellent content. Possibly this is saving my butt tomorrow
very clear explanation sir. can you please add a video on dining philosopher problem ??
Very helpful sir thank
thanks and have a good day
Hi Ashutosh, Thank you so much, would like to hear more from you. We upload more topics every week, Please subscribe this channel for best GATE tutorials.
Great video. Concepts explained very clearly. Thank you :)
that's a brilliant explanation. the best explanation ever. hats off Sir. please continue to make the videos, you are helping so so many students. the blend of English and hindi works like a charm. Using hindi in your work is very good idea please don't stop it. waiting for the deadlock series. God will surely bless you for your kind work of educating the masses.
thanks. Jai Hind.
selfish....what of those who don't understand hindi?
Thanks sir.very well explanation👌👌
Thanku so much sir :) you saved my Finals :D
Sir, please upload a video of counting semaphore
first of all i would like to thank you so much for ur amazing videos . thank you
sir, lectures r awesome!! way of explanation of prbm is fantastic!! watched all ur videos.. thanks to u.. (plz make a video on dinig philosopher problem..)
Thanks dev manus
Very nyc video sir..Par aap sleeping barber aur dining problem bhi explain karige na..
sir can you help me for this problem
Q1-Consider a producer-consumer situation, where a process P produces an integer using the function produceNext() and sends it to process C. Process C receives the integer from P andconsumes it in the function consumeNext(). After consuming this integer, C must let P know, and P must produce the next integer only after learning that C has consumed the earlier one. Assume that P and C get a pointer to a shared memory segment of 8 bytes, that can store any two 4-byte integer-sized fields, as shown below. Both fields in the shared memory structure are zeroed out initially. P and C can read or write from it, just as they would with any other data object. Briefly describe how you would solve the producer-consumer problem described above,
using only this shared memory as a means of communication and synchronization between processes P and C. You must not use any other synchronization or communication primitive. You are provided template code below which gets a pointer to the shared memory, and produces/consumes integers. You must write the code for communicating the integer between the processes using the shared memory, with synchronization logic as required.
struct shmem_structure {
int field1;
int field2;
};
(a) Producer:
struct shmem_structure *shptr = get_shared_memory_structure();
while(1) {
int produced = produceNext();
}
(b) Consumer:
struct shmem_structure *shptr = get_shared_memory_structure();
while(1) {
int consumed; //fill this value from producer
consumeNext(consumed);
}