Home > other > How do you determine the real-time operating system within the deadline to complete the task by your
How do you determine the real-time operating system within the deadline to complete the task by your
Time:09-26
As is known to all, RTOS and the difference between other OS: The task of () the latest finish time (Deadline) can be determined to predict,
But has not clear is how to implement this mechanism, Hope to have a great god solve,
CodePudding user response:
I think what you say is not accurate, can't say the task completion time, can only say that task switching time can be sure of, in a multitasking environment, task starts, is generally only blocking and operation, completed the task not quit, multitasking environment, hard real-time operating system can ensure the highest priority task in the expected time for CPU control, but if the software itself design is unreasonable, so it is not possible to perform, For example: Time slice to 10 ms, it only took 2 priority, high and low priority each have five tasks, high-priority can preempt the low priority, rotation between equal priority, if each high-priority task did not hand over the CPU time (for example, invoke a sleep or blocked waiting for a semaphore functions like), so the five high-priority will each use 10 ms run once in turn, the second time, then run... , low priority can not get chance to run forever, in this case, the concept of unfinished only switching time is certain,
Can determine typically refers to, such as a hardware interrupt occurs, from any one task or low cut to the higher priority interrupt priority interrupt time can be determined, so it can guarantee the real time response, so the system design is the key!