Home-exam review (as of e9ae2680)
Validity of the results
Approximation: Valid
Exact: Invalid
The code execution (see next section) should not result in a missed deadline but should result (as Viktor speaks of in issue #3 (closed) ) in these timings:
-> "T1"
:: Response time = 100
:: Preemption time = 90
:: Blocking time = 0
:: WCET = 10
-> "T2"
:: Response time = 90
:: Preemption time = 60
:: Blocking time = 0
:: WCET = 30
-> "T3"
:: Response time = 34
:: Preemption time = 0
:: Blocking time = 4
:: WCET = 30
Error in code execution
If p(t1) < p(t2) then t1 and t2 doesn't need to share resources for t1 to be able to block the exection of t2.
All that matters is that t1 has a resource r1 where p_ceiling(r1) >= p(t2). This does not lead to an error for this task set, but it will for some others.
Ex: If t1 and t3 would share a resource, would this function catch that t1 has a critical section that should block t2.
Also, this should probably be implemented as a recursive loop to be able to handle infinite (or at least very deep) nested resource critical sections.
The result from this function is incorrect when running with realistic computation (not a deadline as busy period estimate).
Check what you're actually returning and what you are using as the initial condition. Refer to eq 7.22.
Ping me in the reply if it's unclear.
Usage
A cli interface is not required from a grade 3.
But Structopt is fairly easy to set up if you want to give that a shot.
Also, importing a task set from file is a few lines with the serde crate.
Presentation
There is no presentation required for grade 3.
But it would be nice to see the result a little clearer (from a debug perspective), printing all the values in the tasks_analysis a bit nicer and then a final print out weather the task set was schedulable or not.
But it's up to you if you want to implement it.