How scheduler work in RTOS

I have been looked in page I am trying to understand how sheduler work in RTOS

Let’s say we have three task and each task should be run for 30ms , I have gone through link but I do not understand which function should be called for task scheduler and how to schedule three tasks for 30ms ?

You perhaps have a fundamental misunderstanding of scheduling in a Real-Time system. You generally don’t define that a given task ‘runs for’ a period x, but tasks tend to wait until they have something to do, and then do it to completion, then wait again. Each task will tend to have a defined response time, it is expected that it will be able to provide its answer within a certain amount of clock time from when the request came in. (That is the Real-Time part of the requirements). Operations with tight time limits (which tend to need to be quick to produce) will generally be given a higher priority than slower processes that have more time, and this leads to the priority structure of the program. Tasks with no defined time limit for their response tend to be placed at the bottom priority, and will generally be time-sliced each doing work for a bit, then the next one gets some time, and so on.

1 Like

Recommend starting here: