Skip to content
Snippets Groups Projects
Closed Home-exam review (as of e9ae2680)
  • View options
  • Home-exam review (as of e9ae2680)

  • View options
  • Closed Issue created by Edvin Åkerfeldt

    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.

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    • Ruben Asplund
      Owner

      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.

      I have thought that you have to have a shared resource to get blocked by a lower prio task. How can it be blocked otherwise?

      • Edvin Åkerfeldt
        Author

        If t1 (p(t1) = 1) is running and claims a resource r1, with celing(r1) = 4. The system has now raised the system priority ceiling to p = 4. Then t2 (p(t2) = 3) comes along and wants to run (p(t1) < p(t2)). But the system is running with a priority of 4 which means that all tasks that wants to run needs to have a priority of 5 or higher to be allowed to preempt t1. When t1 releases r1, the system priority is lowered to p(t1) and t2 is able to preempt t1.

        Tldr; When a resource is claimed, a global priority ceiling is changed, which keeps t2 from running even though they don't share resources.

        Hope this clears it up =)

      • Ruben Asplund
        Owner

        Thank you! It is now fixed.

      • Please register or sign in to reply