CPU Scheduling Basics

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ค. 2024
  • Patreon ➤ / jacobsorber
    Courses ➤ jacobsorber.thinkific.com
    Website ➤ www.jacobsorber.com
    ---
    This video is a bit different from my norm. I'm traveling and can't be physically there to teach my Operating Systems class. So, this video is primarily for my class. I hope it's useful to the rest of y'all, too.
    ***
    Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.
    About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.
    More about me and what I do:
    people.cs.clemson.edu/~jsorber/
    persist.cs.clemson.edu/ Note that any Amazon links in my video descriptions are generated by Amazon. If you click one of them and then buy something it helps support this channel. Thanks.
    ***
    Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.
    About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.
    More about me and what I do:
    www.jacobsorber.com
    people.cs.clemson.edu/~jsorber/
    persist.cs.clemson.edu/
    To Support the Channel:
    + like, subscribe, spread the word
    + contribute via Patreon --- [ / jacobsorber ]
    + rep the channel with nerdy merch --- [teespring.com/stores/jacob-so...]
    Source code is also available to Patreon supporters. --- [jsorber-youtube-source.heroku...]
    Want me to review your code?
    Email the code to js.reviews.code@gmail.com. Code should be simple and in one of the following languages: C, C++, python, java, ruby. You must be the author of the code and have rights to post it. Please include the following statement in your email: "I attest that this is my code, and I hereby give Jacob Sorber the right to use, review, post, comment on, and modify this code on his videos."
    You can also find more info about code reviews here.
    • I want to review your ...

ความคิดเห็น • 44

  • @yanistancheva3076
    @yanistancheva3076 3 ปีที่แล้ว +55

    16 minutes summed up my whole 2 hour lecture thank you

  • @user-ej7ss8ei2g
    @user-ej7ss8ei2g 3 ปีที่แล้ว +12

    Hah, imagine having a teacher or prof. so cool that they have their own high quality channel, but also says when something might show up on a quiz. Love the videos, you've helped me a lot.

  • @Christobanistan
    @Christobanistan 2 ปีที่แล้ว +1

    I've been a programming since 1989 or so, always wondered about this but never got around to this. Cool beans.

  • @g194g
    @g194g 3 ปีที่แล้ว +1

    Very clear and helpful explanation

  • @abanoubsameh6608
    @abanoubsameh6608 3 ปีที่แล้ว +10

    Great videos! I wish I found you earlier.
    Keep up the good work.

  • @faizunisajazadi8732
    @faizunisajazadi8732 ปีที่แล้ว

    Great lecture! Thanks!

  • @jonathanflores3748
    @jonathanflores3748 3 ปีที่แล้ว +2

    Great content! Love your videos!

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว

      Thanks, Jonathan. Glad you like them!

  • @totalyunsober
    @totalyunsober 4 ปีที่แล้ว +3

    Very helpful video! Thank you!

  • @donha475
    @donha475 4 ปีที่แล้ว +8

    Lol @ -20 niceness impersonation ;)

  • @randomsoul00
    @randomsoul00 2 ปีที่แล้ว

    well explained👍

  • @marziehizadi985
    @marziehizadi985 ปีที่แล้ว

    Fantastic, thanks a lot.

  • @santoshsco
    @santoshsco 3 ปีที่แล้ว +4

    Love your channel jacob , wish i had found this earlier .

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว +1

      Thanks, Santosh. Glad you're enjoying it.

  • @XxxGuitarMadnessxxX
    @XxxGuitarMadnessxxX 2 ปีที่แล้ว +2

    I've been watching your videos for a little while now (Great Content by the way! Loving the neat tricks you can learn from watching your videos!) But I died when you started quoting the whole B.S. oath - It's been 10 years since I heard all that lmao

    • @JacobSorber
      @JacobSorber  2 ปีที่แล้ว

      Glad you enjoyed that.

  • @omhmpp
    @omhmpp 2 ปีที่แล้ว

    absolutely phenomenal video, but I just wanna point out that SJF (shortest job first) is actually different than shortest remaining time first SRTF

  • @maoryatskan6346
    @maoryatskan6346 4 ปีที่แล้ว +1

    Awesome

  • @bad_robot
    @bad_robot หลายเดือนก่อน

    the scout law reference lol

  • @jenselstner5527
    @jenselstner5527 3 ปีที่แล้ว

    Best of video is the LEGO in the background ... just kidding. ;o) Good explanation and nice LEGOs.

  • @oviya.n1317
    @oviya.n1317 2 ปีที่แล้ว

    Pls make playlists for OS and embedded system

  • @kushagrakumar9576
    @kushagrakumar9576 5 ปีที่แล้ว +3

    What is the difference between chrt and nice utility for process scheduling in linux? Could you please explain sched_setscheduler ( sched.h ) and related system call with an example .

    • @JacobSorber
      @JacobSorber  5 ปีที่แล้ว +5

      chrt is more general and more powerful than nice. Nice basically changes the inverse of the processes priority assuming the default Linux scheduler. With chrt, you can change the scheduler. Linux offers a few different schedulers (check the chrt man page for details), and the naming is a bit misleading, because they refer to "real-time" scheduling, but Linux isn't a RTOS. So, this isn't real real-time scheduling (no deadlines). It's just a higher priority scheduling algorithm. If you need an RTOS (you're implementing flight control on an airplane or running a self-driving car) I would recommend looking somewhere other than Linux.

    • @kushagrakumar9576
      @kushagrakumar9576 5 ปีที่แล้ว

      @@JacobSorber Thanks Jacob for the explanation. Please continue to make more videos on OS. Do you think is it worth to make a continuation video on process scheduling with More system calls like sched_setscheduler etc .?

  • @corcodelmarian
    @corcodelmarian ปีที่แล้ว

    On Intel proc allways look to call and jump to be paired with ret on binary Code but, gcc forget sometimes, this îs big problem on linux.

  • @MB-hs4vp
    @MB-hs4vp 6 ปีที่แล้ว +5

    Do these scheduling techniques differ for RTOS?

    • @JacobSorber
      @JacobSorber  6 ปีที่แล้ว +7

      Yes. In real-time scheduling tasks have deadlines, and the scheduler has to reason about those deadlines.

    • @ailijic
      @ailijic 4 ปีที่แล้ว

      Some RTOS can have both real time and standard tasks. Also, the Linux kernel can have real time tasks. Real time is a very overused term. Know the requirements of your system and then look for an OS that can handle those requirements.

    • @ropersonline
      @ropersonline 3 ปีที่แล้ว

      @@ailijic It's not just the OS; go look for suitable silicon also. Back in the day that might have been Motorola 68k or even MOS 6502. These days it's prolly s/th like ARM Cortex-R.

  • @ropersonline
    @ropersonline 3 ปีที่แล้ว +3

    11:50: "If alpha is one, then we ignore reality and we just go with the last prediction...
    If alpha is close to zero, we predict almost solely based on the last experience..."
    So either the last or the last? That doesn't seem to make too much sense...?

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว +7

      There's the last prediction (p_n, what we predicted last) and the last experience (m, what actually happened last). They're both "last" things, but different things. Sorry for the confusion.

    • @ropersonline
      @ropersonline 3 ปีที่แล้ว +2

      @@JacobSorber Thanks for taking the time and answering everything. You're really nice, and not in the scheduling sense either. :) I plan to watch all your videos, but there's a whole year's worth still left. :)

  • @aubriewest1135
    @aubriewest1135 3 ปีที่แล้ว

    14:59 Sounds like Ta'arof in Iran :)

  • @bigwoof2137
    @bigwoof2137 หลายเดือนก่อน

    Avg. Response time 7:51 is wrong, should be 4.33.
    P1: 0
    P2: 7 - 2 = 5
    P3: 7 + 4 - 3 = 8

  • @BritishBeachcomber
    @BritishBeachcomber ปีที่แล้ว

    The OS/2 scheduler was so bad. If a task/thread went into an infinite loop, with no system calls, the whole system would hang.

  • @Axias85
    @Axias85 2 ปีที่แล้ว

    ....Wait, was that a Boy Scout joke?

  • @alacastersoi8265
    @alacastersoi8265 3 ปีที่แล้ว +1

    "7,214 views" ? wHaT?

  • @joerogan3079
    @joerogan3079 ปีที่แล้ว

    *MY PROF IS HORRIBLE* 🤦‍♂️
    #helpMe