0
2.5kviews
State different scheduling algorithms of RTOS and describe Round Robin scheduling algorithm.
1 Answer
0
18views
  1. First in first out

  2. Round-robin algorithm

  3. Round robin with priority:

  4. Shortest job first

  5. Non Pre-emptive multitasking

  6. Pre-emptive multitasking

Round robin algorithm

  • In the round robin algorithm, the kernel allocates a certain amount of time for each task waiting in the queue .the time slice allocated to each task is called quantum.

  • As shown in fig .if three tasks 1,2, 3 are waiting in the queue the CPU first executes task1 then task2 then task 3 and the again task1 in round robin algorithm each task waiting in the queue is given a fixed time slice .

  • The kernel gives control to the next task if the current task has completed its work within the time slice or if the current task has completed it allocated time

  • The kernel gives control to the next task if

$\hspace{1.5cm}$a) the current task has completed within the time slice

$\hspace{1.5cm}$b) the current task has no work to do

$\hspace{1.5cm}$c) the current task has completed its allocated time slice

  • This algorithm is very simple to implement but there is no priorities for any task. All tasks are considered of equal importance .if time critical operation are not involved then this algorithm will be sufficient, digital miltimeter , microwave oven has this algorithm .

enter image description here

Please log in to add an answer.