Is there any advantage in giving Prime Numbers as Offset in the Tasks for better Task Execution
Is there any advantage in giving Prime Numbers as Offset in the Tasks for better Task Execution.
Voted best answer
Not really.
Prime numbers are not required in the Task Offsets to make this work. And prime numbers are not guaranteed to ensure tasks dont get delayed because the start offset is incorrect.
You need to look at both the Task Interval AND The Task Execution time of ALL your tasks and tune the task intervals and offsets accordingly. If one task takes 30ms To execute, then you should allow at least 30 ms or more for it to complete execution.
Obviously, you need to set your task offsets so that they do not clash with the starting time of another task. You dont need to use prime numbers to do this.
Answers
Phasing any read/write process with prime numbers makes the period between encounters larger (least common multiple).
Add new comment