Beyond the RTOS - Part 1: Concurrency & "spaghetti" as main challenges of professional developers

Поделиться
HTML-код
  • Опубликовано: 28 авг 2020
  • This is part-1 of the talk "Modern Embedded Software Goes Beyond the RTOS" that Miro Samek presented at the [Embedded Online Conference in May 2020](www.embeddedonlineconference.....
    This part describes the main challenges faced by professional embedded software developers. Then the presentation goes over the main, currently dominating approaches, which are "superloop" and traditional Real-Time Operating System (RTOS). This part ends with summarizing the benefits and perils of the traditional approaches.
    The next part will discuss the best practices of concurrent programming and how they address the problems identified in part-1.
    End Notes:
    ----------
    More information about the concepts covered in this video:
    www.state-machine.com/reactiv...
    www.state-machine.com/sequent...
    www.state-machine.com/event-d...
    The best RTOS video course on RUclips:
    • RTOS
    Music credits:
    The background music comes from:
    www.bensound.com/royalty-free...
  • НаукаНаука

Комментарии • 41

  • @Shiniiee
    @Shiniiee 3 года назад +16

    Thank you for the free lectures, I absolutely love your teaching style.

  • @TheEduGhoster
    @TheEduGhoster 3 года назад +3

    really helpful mr, i just finished to manage superloop programming and ready to leard this new paradigm, very well explained from you, thank you

  • @roldanmarco1856
    @roldanmarco1856 3 года назад

    As aspiring embedded systems developer your lectures really help me a lot. Thank you!

  • @nolimangulabnan6101
    @nolimangulabnan6101 3 года назад +1

    The greatest embedded software training on youtube ever 😍

  • @paulchui3739
    @paulchui3739 3 года назад +2

    Thank you very much for your amazing lectures

  • @muhammed_genco
    @muhammed_genco 3 года назад +1

    Thanks a lot again for your amazing lectures

  • @islamnooh6893
    @islamnooh6893 3 года назад +3

    great as usual.

  • @user-to3ll9jm4l
    @user-to3ll9jm4l 3 года назад +2

    This is the best!

  • @ShrKhAan
    @ShrKhAan Год назад +1

    You are an inspiration, do you see registers in the palm of your hand ?
    Thanks a lot, keep the way !!

  • @breedj1
    @breedj1 3 года назад +1

    Again an excellent video

  • @lbrieden1
    @lbrieden1 3 года назад

    Thank you for sharing

  • @varunkoganti9067
    @varunkoganti9067 3 года назад +1

    He back.

  • @dataworld44
    @dataworld44 3 года назад +11

    Dr. Samek, is there any chance you organise virtual classes for students who wish to bring up their skills in a fast track manner during the period of a week etc??

    • @StateMachineCOM
      @StateMachineCOM  3 года назад +6

      I believe I've been creating such a self-paced learning opportunity with my "Modern Embedded Programming" video course since 2013 (see www.state-machine.com/quickstart). And it has been quite a bit of work... The course has now 35 lessons, which can be watched within a week or so. The course starts with the fundamentals, but quickly progresses to more advanced topics, including interrupts, RTOS, object-oriented programming, and now event-driven programming. Please give it a try! --MMS

    • @Mugnize
      @Mugnize 3 года назад

      Hi,
      I'm a junior embedded system engineer and I've been reading the 200 first pages of the second edition of your book. I find really innovative how you design embedded systems and I missed such a methodological approach in the work I have performed until now.
      Also I'm hesitating between continuing the reading of your book or starting watching your youtube videos. What do you think is the best ? Thanks

    • @StateMachineCOM
      @StateMachineCOM  3 года назад +2

      The "Practical UML Statecharts" book is intended for professional developers, because it assumes familiarity with many embedded concepts. As a junior engineer, you might not quite see *why* you should care for the described concepts, because you haven't yet made "all the mistakes that could be made in this narrow field". That's exactly the reason why I've created this video course. The purpose of this course is to bridge the gap from a beginner to more advanced embedded developer. --MMS

    • @Mugnize
      @Mugnize 3 года назад

      ​@@StateMachineCOM Thank you for your detailed answer. In fact, I lead the development of the embedded software of an instrument for a biotech startup. I have no experience in designing such complex system and I absolutely want to avoid the most common mistakes leading to spaghetti code.
      I'll start watching your videos, but I find that you have well shown in your book the pros of your technique.

    • @sravanakumar9326
      @sravanakumar9326 2 года назад

      @@Mugnize hi, can I get the link or access to that book?

  • @switchdv
    @switchdv 3 года назад +1

    Interesting topic! I have 2 questions:
    1. For this specific task (blinky + button), button can be done in a Pin Change ISR, and blinky can be done in a Timer ISR. Wouldn't utilizing these ISRs on Arduino make it "seemingly" concurrent as well?
    2. At 14:02, how could the processor know that the delay was about to elapse if it's running another thread? Is there any specific hardware that does the timekeeping?

    • @StateMachineCOM
      @StateMachineCOM  3 года назад +1

      Yes, utilizing interrupts and ISRs (Interrupt Service Routines) would make the code execute "seemingly" concurrently as well. In that particular case the actual work to do is so minimal that it can be all implemented inside the ISRs. But in general, if you have more to do, ISRs would be too long, which would create other problems. For that reasons people have invented RTOS and threads.
      Regarding the RTOS delay, you are absolutely right that there is a specific hardware that does the timekeeping. This is called the "system clock tick", which is a periodic interrupt that calls the RTOS's tick-service. In that tick-service the RTOS "knows" that some threads need to be unblocked. Please also watch the lessons on RTOS, where all of this is explained: ruclips.net/p/PLPW8O6W-1chyrd_Msnn4LD6LBs2slJITs . --MMS

    • @switchdv
      @switchdv 3 года назад

      @@StateMachineCOM Thank you for the great answer! Indeed, when the complexity increases, ISRs start to become a problem. I'll be sure to watch your RTOS videos!

  • @NSN2195
    @NSN2195 3 года назад +1

    A very nice explanation! Thank you.
    So even in a single core/thread CPU system, we can get speedup just by using an RTOS instead of plain C-code!
    However, I have one doubt. Is threading possible without any OS? In plain C- code, can we run 2 threads simultaneously? For pthreads, we need UNIX like OS, but what about other threading techniques?

    • @StateMachineCOM
      @StateMachineCOM  3 года назад +1

      As I mentioned in the presentation, if you'd like to learn more about multithreading and how it really works in a small microcontroller, you could watch my RTOS video series (ruclips.net/p/PLPW8O6W-1chyrd_Msnn4LD6LBs2slJITs ). But, yes, typically, for multithreading you do need a kernel, either RTOS kernel or Linux kernel (for p-threads). But such traditional kernels are not the only game in town. I plan to talk about other types of kernels (e.g., preemptive, but *non-blocking* kernels) in my ongoing Modern Embedded Programming course (ruclips.net/p/PLPW8O6W-1chwyTzI3BHwBLbGQoPFxPAPM ). --MMS

    • @NSN2195
      @NSN2195 3 года назад

      @@StateMachineCOM Thank you Miro :). I will definitely watch the RTOS series, your channel has really high quality contents :)

  • @ishaansharma61
    @ishaansharma61 3 года назад +1

    Great lecture...loved it!
    are there more videos coming up to finish the agenda of this conference?

    • @StateMachineCOM
      @StateMachineCOM  3 года назад +2

      Yes, there will be 3 more parts of this presentation coming up soon. Stay tuned! --MMS

    • @ishaansharma61
      @ishaansharma61 3 года назад

      @@StateMachineCOM Great work!!!!!

  • @JuanPabloCisneros2207
    @JuanPabloCisneros2207 3 года назад

    I'm looking forward to use QPC on ESP32. Is there any project to port this to esp?

    • @StateMachineCOM
      @StateMachineCOM  3 года назад +1

      A QP port to FreeRTOS-ESP32 has been added in QP/C 6.9.1. You can download it as "QP-bundle" from www.state-machine.com/#Downloads or directly from GitHub: github.com/QuantumLeaps/qpc

  • @goodboot7337
    @goodboot7337 2 года назад

    Your videos are always great. I have a question, what do you mean by assigning separate CPU for each task? If we have single core machine, how can we get separate CPU for each task? _____Or it is for some specific period of time?

    • @StateMachineCOM
      @StateMachineCOM  2 года назад +2

      I don't think I said "separate CPU for each task". I did say that the main job of an RTOS is to create an illusion that each task (a.k.a. thread) has the CPU all to itself, which has a different meaning. But anyway, the point is that from the application developer's point of view it's indistinguishable whether a thread really has a separate CPU, or the CPU is shared among many threads at different times. --MMS

    • @goodboot7337
      @goodboot7337 2 года назад

      @@StateMachineCOM Got it, Thanks

  • @Hoh3n
    @Hoh3n 3 года назад +1

    Hi Miro. You are the best teacher. Could you teach us how to write makefiles, cmake?

    • @JonitoFischer
      @JonitoFischer 3 года назад +1

      there are plenty of tutorials about that. Make is ubiquitous, but it is like learning klingon to build C programs. I use python invoke module. For bigger programs you can use Meson. Please send me some of the money you save from your visits to the psychologist.

  • @BDYH-ey8kd
    @BDYH-ey8kd 3 года назад

    HELLO BEAUTIFULL (>^______^