Round Robin CPU Scheduling Algorithm (RR) - Operating Systems

Поділитися
Вставка
  • Опубліковано 19 січ 2025

КОМЕНТАРІ • 65

  • @SimpleSnippets
    @SimpleSnippets  5 років тому

    Hey Guys, if you want many more such tech educational videos on this channel then please support me by subscribing to this channel & also share it with your friends ✌

  • @sof8188
    @sof8188 6 років тому +51

    Something that the video failed to explain and might help you understanding this algorithm, is that RR algorithm gives priority to processes based on their arrival time. However, once a process has consumed its allocated time in CPU and still didn't finish, its arrival time is kind of set at the time when it was paused. And so, RR Algorithm will see if any other process has arrived before that time, and give it its priority. Then check again for arrival time, and based on that, will re-start the paused process or start another process. The key is to understand that RR is only based on comparing arrival times. And that the paused process are considered "newly arrived" and so their arrival time is set at the time where they were paused.

    • @SimpleSnippets
      @SimpleSnippets  6 років тому +5

      I guess I did showcase this in the video. For example when the first process P0 was paused and processor started with P1, it(P0) was again added in the queue in proper order. I checked up with the definitions and found that the arrival time is the time when the process first enters the queue. However when a process is paused, you cannot consider that time as the new arrival time for that process as it doesn't follow its actual definition. Although your way of putting it is same as this process goes so working wise its correct. ✌

    • @brightonshifu
      @brightonshifu 5 років тому +4

      this explains why on the gnatt chart P0 came again after the first P1 instead of P2... thank you for this info

    • @cengizenessekerler8505
      @cengizenessekerler8505 7 місяців тому

      it has been 6 years but thank you so much for that

  • @giftyemefaa
    @giftyemefaa 5 місяців тому +7

    The reason why P2 didn't run after P1 at time 6 is that in Round Robin scheduling, the processes are executed in a cyclic order based on their arrival times. When P1 finishes its time quantum at time 6, P0 is the next in line because it was already in the queue before P2. Therefore, P0 gets another turn before P2, which only arrived at time 4.
    After P0 gets its next time quantum, then P2, which has been waiting since time 4, finally gets its turn to run. The Round Robin scheduler prioritises the order in which processes entered the queue, which explains why P0 runs again before P2 at that point.
    Thanks @SimpleSnippets

  • @IshuSingh-k7f
    @IshuSingh-k7f 4 роки тому +6

    No way you also got videos for my operating systems class.
    I am so lucky
    Thank you Sir

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому +1

      Most welcome buddy, glad to know that the topics you want are there on the channel, Do check the full channel there is a lot of knowledge on this channel. Also please do share the videos and channel with your friends too. Thats the biggest help and support you can provide to our channel ✌

  • @prarthitashaw5796
    @prarthitashaw5796 5 років тому +4

    Great video dude. Short and crisp. Perfect for exam preps.

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Thank you so much 😇 glad to hear this from you. I would request you to please share the videos with your friends 😊

  • @ravish6280
    @ravish6280 6 років тому +10

    One day before exam, it took 30 minutes to understand all the algorithms. Very nice content ! Keep it up

    • @SimpleSnippets
      @SimpleSnippets  6 років тому +1

      Hehe that's some real daring you did by studying everything one day before exams 😛😉
      Reminded me of my exams days 😂
      Thank you so much for the positive feedback bro. Would request you to please share the videos with your friends too ✌️ that'll be super helpful 😊😇

    • @ravish6280
      @ravish6280 6 років тому +1

      @@SimpleSnippets Hehe ! I did buddy ! It was helpful. The thing is you are not pulling the video unnecessary and keeping it easy to understand. I would suggest you one thing, keep your videos as shorter as possible by not saying things that are not related to the topic (such as personal talk to connect with the audience and all. Do it but in fewer videos), keep the quality of the content high, so that it makes more people to press the video link in the first place. Many people prefer visual quality over content and the shorter length of the video because there are plenty of options available on youtub, but very few are "quality content / industry level teaching", especially in india. Other thing make a 5-7 sec of good intro/outro for your channel, where your logo comes and music comes. I am a music producer, and have been in this industry for few years. I would like to collaborate with you and make you some good music bite (fees : no charges, but credits). You can contact me @ gitwithravish@gmail.com. And apart from that, good luck !

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      Wow, thank you so much bro for such a wonderful and elaborative explanation and suggestions. And I totally agree on all your points and they pretty much align with my ideas on how a video should be.
      I try to make my videos as short and concise as possible.
      Video quality is always high(recently upgraded to 1080p) with 60fps but more importantly educational videos need very good audio quality as well so I have a separate audio recorder and I also perform noise cancellation and stuff.
      And surely would love to collaborate with you for the intro or some music work. I have noted your mail. I recently got my new intro developed with some cool effect, heres the link to that video which has that intro - ua-cam.com/video/HAx2bERqQT8/v-deo.html
      Its kinda a 11sec intro (not super short but yeah I dont use it in all videos :-P )
      Maybe you can work on some music specifically for this one and then surely would give credits int he video description as you said. :-)

    • @ravish6280
      @ravish6280 6 років тому +1

      @@SimpleSnippets Looking forward to this ! Share your email. Just ping me on gitwithravish@gmail.com let's collaborate, i have some ideas

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      My email is - implesnippetsinfo@gmail.com
      But you can ping me via instagram or facebook page. you'll find the links in the video description 😇

  • @zaidmansuri6758
    @zaidmansuri6758 7 років тому +3

    I never comment on yt videos but i felt compelled: You make the best videos on OS algorithms.

    • @SimpleSnippets
      @SimpleSnippets  7 років тому +1

      +Zaid Mansuri wow buddy, that is such a great positive comment and response. I'm so glad you liked the video and it helped you. Do share the video with your friends and contacts and keep up the support. ✌️😇

  • @ankushkumaryadav65
    @ankushkumaryadav65 6 років тому +4

    By formula everything is correct bt ... by directly seeing grand chart for p1 nd p2 it is wrong just check it out ... it seems it is incorrect ...explain

  • @sandeepch
    @sandeepch 4 роки тому +2

    actually p1,p2,p3 comes according to round robin it rounds total process ... keep note that thousands of students watching..

  • @shireentajg7881
    @shireentajg7881 4 роки тому +2

    Very effective way of teaching Sir. Thank you

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому

      So nice of you. Thank you for the compliments. Please do subscribe and share our channel with your friends too. Thats the biggest help and suppor you can provide 😇

    • @shireentajg7881
      @shireentajg7881 4 роки тому

      Sure sir

  • @JUNIORBRONDONNOUYEUTCHUIYOUMBI
    @JUNIORBRONDONNOUYEUTCHUIYOUMBI 7 місяців тому +2

    i'm not reall undderstanding why P0 is stil push why P2 comes next

  • @vishwabharti6
    @vishwabharti6 5 років тому +3

    What is this???.... P2 has already arrived at 4 ms... So, after 6ms P2 should work in place of P0 for 1 ms.....Reply me

    • @SimpleSnippets
      @SimpleSnippets  5 років тому +3

      Good question, but at 3rd ms you can see that P0 was left incomplete right ? So it again gets added into the wait queue and this happens at 3rd ms before P2. and at 4th ms P2 comes in but it is after P0. Thus P0 is given first chance. ✌

  • @dino.m.k
    @dino.m.k 7 років тому +3

    YOU SAVED MY EXAM

    • @SimpleSnippets
      @SimpleSnippets  7 років тому

      +Dino Mali Kasim thank you so much for the positive response buddy. Really great to hear that this video helped you ✌ all the best and do share the videos with your friends and contacts ✌

  • @Drizz10
    @Drizz10 11 місяців тому

    Why my lecturer teach that first need to put all process first which mean p1 , p2 ,p3 in the gnatt chart, then execute remaining time left on each proccess by queue
    ...which should i choose, im confuse

  • @supriyasuman3815
    @supriyasuman3815 6 років тому +1

    Operating system is really very interesting but what was problematic was the cpu scheduling algorithm...i cant wven differentiate between what os preemptive non preemptive etc..but this video cleared all my doubts....a lot of congrats to you...you tought me better than the whole faculty at my college...👍..i have liked your video...all the best for further

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      Hello Supriya, Thank you so much for such a wonderful and positive response on. I am glad you liked the videos. Please do share the videos with your friends and contacts as that will be the best support and help you can give to our channel :-) ✌😇

  • @parvezmulla3324
    @parvezmulla3324 8 років тому

    good explaination! thanks you

  • @ulti72
    @ulti72 6 років тому +1

    which software you are using , for making these types of video

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      OBS studio to record screen, smoothdraw4 for the digital blackboard ✌️😇

    • @ulti72
      @ulti72 6 років тому +1

      and mic? thanks for quick reply, and your videos are
      really helpful.

    • @SimpleSnippets
      @SimpleSnippets  6 років тому +2

      For audio recording I use tascam dr-05 audio recorder. It's kinda expensive but definitely improves the audio quality a lot.
      BTW if you're starting up, you can surely you your cell phone to record audio separately. I used to do that initially and it is much better than the default mic in our laptop. ✌️
      And thank you so much for the compliments buddy, it'll be more helpful if you can share the channel and videos with your friends too 😇✌️

  • @karthiks3339
    @karthiks3339 6 років тому +1

    very helpful. Thank you

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      Thank you so much Karthik, happy to hear your positive review, Please do share the videos with your friends and contacts as that is the best help and support for our channel 😇

  • @akshayjr2638
    @akshayjr2638 7 місяців тому

    Thankuuu bro❤

  • @NONAME-dj2gm
    @NONAME-dj2gm 5 років тому +1

    May I know what software did you use to make this tutorial?

    • @SimpleSnippets
      @SimpleSnippets  5 років тому +1

      Sure, its called smoothdraw4. Its an open source software. Also for recording I used OBS Studio ✌

    • @NONAME-dj2gm
      @NONAME-dj2gm 5 років тому

      @@SimpleSnippets Thank you so much, big help for our projects

  • @iamhritikpawar
    @iamhritikpawar 5 років тому +2

    Bro, not a single channel is explaining the codes fro scheduling Algorithm

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Code ? you mean program in programming language ?

    • @iamhritikpawar
      @iamhritikpawar 5 років тому +1

      @@SimpleSnippets ya I mean the program in python cause I have it in my syllabus of CS second year and not a single channel have done video for it . An on top of that on google I can just find the program of RR written just in C , not python.

  • @pradnyeyameshram7289
    @pradnyeyameshram7289 5 років тому

    Bro what will happen if arrival time is not given?How to calculate response time for all algorithm?

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      If arrival time is not given usually we consider it as 0. Do confirm this with your teacher though 😇

  • @shrutibisht20
    @shrutibisht20 11 місяців тому

    great video

  • @bluebrain7009
    @bluebrain7009 Рік тому

    Why after P1 is P0 again?

  • @zukiledlikithela6138
    @zukiledlikithela6138 6 років тому +1

    you are the best hey

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      Thanks Linda! So are you 😎😇 keep up the support 😋✌️

  • @pradeephmkumar
    @pradeephmkumar Рік тому

    Thank You

  • @chitralalawat8106
    @chitralalawat8106 6 років тому +1

    I think it's wrong..

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      Can you elaborate ?

    • @hemantkant953
      @hemantkant953 6 років тому +5

      yeah it is definitely wrong. p2 should've placed before p0 in 3rd block in gant chart

    • @tanveersingh5423
      @tanveersingh5423 6 років тому +4

      nopes video is right because p2 came at 4rth second and quantum is of 3 seconds.
      that means at 3rd second(when cpu paused p0) p1 arrived at 2nd second so it is queued.
      now as p2 haven't arrived yet(cause it arrives at 4rth second) cpu puts Po in the queue after p1.

    • @vijayvk2523
      @vijayvk2523 6 років тому

      +Tanveer Singh but at the time of 6milliseconds p2 should have arrived..

    • @AcuGraphic
      @AcuGraphic 6 років тому +1

      @@hemantkant953 yes u are right, the explanation is wrong at that point.

  • @kunalbehl6250
    @kunalbehl6250 4 роки тому +1

    pehle gnatt chart k spelling correct kar lo *gantt