How do Real Time Operating Systems work?

后端 未结 12 793
借酒劲吻你
借酒劲吻你 2021-01-31 04:12

I mean how and why are realtime OSes able to meet deadlines without ever missing them? Or is this just a myth (that they do not miss deadlines)? How are they different from any

12条回答
  •  醉梦人生
    2021-01-31 04:56

    Basically, you have to code each "task" in the RTOS such that they will terminate in a finite time.

    Additionally your kernel would allocate specific amounts of time to each task, in an attempt to guarantee that certain things happened at certain times.

    Note that this is not an easy task to do however. Imagine things like virtual function calls, in OO it's very difficult to determine these things. Also an RTOS must be carefully coded with regard to priority, it may require that a high priority task is given the CPU within x milliseconds, which may be difficult to do depending on how your scheduler works.

提交回复
热议问题