コード例 #1
0
    def test_no_double_accounting_saw(self):
        "test that suspension-aware analysis is correctly accounted for"
        lb.apply_part_fmlp_bounds(self.ts)

        self.assertTrue(rta.is_schedulable(1, self.p0))
        self.assertTrue(rta.is_schedulable(1, self.p1))

        # Expected inflated WCET and response times:

        # - for highest-priority task:
        #   - no WCET inflation
        #   - local pi-blocking of up to 1ms
        #   - remote pi-blocking of up to (1 + 1) ms
        self.assertEqual(self.p0[0].cost, 10)
        self.assertEqual(self.p1[0].cost, 10)

        self.assertEqual(self.p0[0].response_time, 10 + 1 + 2)
        self.assertEqual(self.p1[0].response_time, 10 + 1 + 2)

        # - for lower-priority task:
        #   - no WCET inflation
        #   - no arrival blocking
        #   - interference of up to 10ms (no inflation)
        #   - remote pi-blocking of up to (1 + 1) ms
        self.assertEqual(self.p0[1].cost, 10)
        self.assertEqual(self.p1[1].cost, 10)

        self.assertEqual(self.p0[1].response_time, 10 + 10 + 2)
        self.assertEqual(self.p1[1].response_time, 10 + 10 + 2)
コード例 #2
0
ファイル: locking.py プロジェクト: RSpliet/schedcat
    def test_no_double_accounting_saw(self):
        "test that suspension-aware analysis is correctly accounted for"
        lb.apply_part_fmlp_bounds(self.ts)

        self.assertTrue(rta.is_schedulable(1, self.p0))
        self.assertTrue(rta.is_schedulable(1, self.p1))

        # Expected inflated WCET and response times:

        # - for highest-priority task:
        #   - no WCET inflation
        #   - local pi-blocking of up to 1ms
        #   - remote pi-blocking of up to (1 + 1) ms
        self.assertEqual(self.p0[0].cost, 10)
        self.assertEqual(self.p1[0].cost, 10)

        self.assertEqual(self.p0[0].response_time, 10 + 1 + 2)
        self.assertEqual(self.p1[0].response_time, 10 + 1 + 2)

        # - for lower-priority task:
        #   - no WCET inflation
        #   - no arrival blocking
        #   - interference of up to 10ms (no inflation)
        #   - remote pi-blocking of up to (1 + 1) ms
        self.assertEqual(self.p0[1].cost, 10)
        self.assertEqual(self.p1[1].cost, 10)

        self.assertEqual(self.p0[1].response_time, 10 + 10 + 2)
        self.assertEqual(self.p1[1].response_time, 10 + 10 + 2)
コード例 #3
0
ファイル: locking.py プロジェクト: jiankangren/schedcat
 def test_part_fmlp_np(self):
     lb.apply_part_fmlp_bounds(self.ts, preemptive=False)
     self.saw_non_zero_blocking()