Research Article
Assigning Priorities for Fixed Priority Preemption Threshold Scheduling
Algorithm 2
Pseudo code for (a) CORRECTED-SEARCH( ) and (b) RESTORING-OPT-ASSIGN-THRESHOLD( ).
(1) CORRECTED-SEARCH (Γ: set of tasks) | (2) return _CORRECTED-SEARCH(1, Γ, Γ); | | (3) _CORRECTED-SEARCH (prio: priority, UnAssigned: set of tasks, Γ: set of tasks) | (4) if (UnAssigned = ) return RESTORING-OPT-ASSIGN-THRESHOLD(Γ); | (5) RefinedList ← Refine(UnAssigned); // eliminating infeasible tasks even with the highest preemption threshold | (6) foreach () | (7) ; | (8) ; | (9) if (_SEARCH(prio + 1, UnAssigned − , Γ) = success) return success; | (10) // end-foreach | (11) return fail; | (a) CORRECTED-SEARCH( ) | | (1) RESTORING-OPT-ASSIGN-THRESHOLD (Γ: set of tasks) | (2) OPT-ASSIGN-THRESHOLD(Γ); | (3) if (ret = fail) foreach () ; // restore preemption thresholds | (4) return ret; | (b) RESTORING-OPT-ASSIGN-THRESHOLD( ) |
|