We are given three periodic tasks under Rate Monotonic Scheduling (priority ∝period1):
Task T1: Period P1=3 ms, Execution time C1=1 ms (Highest Priority)
Task T2: Period P2=7 ms, Execution time C2=2 ms (Medium Priority)
Task T3: Period P3=20 ms, Execution time C3=4 ms (Lowest Priority)
All tasks arrive at t=0.
Let us trace the execution timeline from t=0:
t=0 to 1: T1 (Instance 1) runs for 1 ms and finishes at t=1.
t=1 to 3: T2 (Instance 1) runs for 2 ms and finishes at t=3.
t=3 to 4: T1 (Instance 2 arrives at t=3) preempts, runs for 1 ms, and finishes at t=4.
t=4 to 6: T3 (Instance 1) runs for 2 ms (2 ms remaining).
t=6 to 7: T1 (Instance 3 arrives at t=6) preempts, runs for 1 ms, and finishes at t=7.
t=7 to 9: T2 (Instance 2 arrives at t=7) runs for 2 ms and finishes at t=9.
t=9 to 10: T1 (Instance 4 arrives at t=9) runs for 1 ms and finishes at t=10.
t=10 to 12: T3 (Instance 1) resumes and executes its remaining 2 ms, finishing at t=12.
Thus, the first instance of T3 completes its execution at the end of 12 milliseconds.