Consider a system with two tasks, Task1 and Task2. Task1 has a period of 200 ms, and Task2 has a period of 300 ms. All tasks initially tick at time 0. 1. How many times will Task1 have ticked after 1000 ms? 2. How many times will Task2 have ticked after 1000 ms? 3. After time 0, when do both Task1 and Task2 next tick at the same time? 4. What is the largest value for timerPeriod that allows both

Respuesta :

Explanation:

Task 1 time period = 200ms, Task 2 time period = 300ms

Task ticked = [tex]\frac{1000ms}{200ms}= 5[/tex]  →  5 times

Task 2 ticked =[tex]\frac{1000ms}{300ms} = 3.33[/tex] → 3 times

At 600 ms → 200ms 200ms 200ms

                     300ms → [tex]\frac{30ms}{60ms}[/tex]

Largest time period = H.C.M of (200ms, 300ms)

                                 = 600ms

ACCESS MORE
EDU ACCESS