875 views
A real-time system needs to handle two voice calls that each run every $6$ msec and consume $1$ msec of CPU time per burst, plus one video at $25$ frames/sec, with each frame requiring $20$ msec of CPU time. Is this system schedulable?

### 1 comment

The required timeslices are quite a bit smaller than 1 second, so one can try to see if the different tasks can complete their work within 1 second.

• Voice runs every 5 ms. 1/0.005 = 200 times/second.

• Video runs at 25 frames/second. = 25 times/second

• Voice needs 1 ms each time it's run = 200 ms/second.

• Video needs 20 ms each time it's run = 25*0.020 = 500 ms

• 2 voice tasks + 1 video task = 200ms*2 + 500ms = 900ms

How one wants an RTOS to schedule such tasks depends among other things on how much jitter you can live with for the different tasks . e.g. the 2 voice tasks could have equal priority, but higher than than the video task - allowing the voice tasks to run whenever they need in a fifo order. (meaning one voice task might need to wait at most 1ms to be scheduled), and the video task gets the remaining CPU time

Voice runs every $5 \;\text{ms} = \frac{1}{0.005} = 200 \;\text{times per second}$

Video runs at $25$ frames/ second $=25 \;\text{times per second}$

voice require $1\;\text{ms}$ eac time $=200 \;\text{ms per second}$

Video needs $20$ ms  $=25\times0.020 = 500\;\text{ms}$

$\therefore \text{Total} = 200\;\text{ms}\times2 + 500 \;\text{ms} = 900 \; \text{ms}$

by