RTOS program to generate Round Bin Multitasking algorithm

In this article let’s learn to assign tasks in round robin fashion. In the following program first, it assigns the highest priority to task1 and then it creates task2,task3. It continued the execution and waits for an event in task1, then suspends task1 and then enters into task2. Next, it waits for an event in task2, then suspend task2 and then enters task 3. it does the same in task3 function. Then it returns main and resumes the task1 function and sets task2. It resumes the task2 function and sets for task3. It repeats the same.

So task1——task2——–task3—–task1—— so on


2)Declare task1,task2,task3
3)Call the task1 function
4)Assign the highest priority to task1, next priority to task2, last priority to task3
5)Wait for an event in task1 and set for task 2
6)Wait for an event in task2 and set for task 3
7)Wait for an event in task3 and set for task 1

Code goes here: