Method for cooperative multitasking in a communications network, and a network element for carrying out the method
First Claim
1. A method for cooperative multitasking in a computer-controlled network element of a digital communications network wherein scheduler tasks are executed in a determined order, the method comprising the steps of:
- (a) assigning a counter and a threshold value to each scheduler task, the threshold value specifying a maximum number of execute cycles within which the scheduler task need not be executed immediately, and the counter counting those execute cycles within which the scheduler task is not executed;
(b) determining at the beginning of each execute cycle whether at least one of the counters exceeds the associated threshold value;
(c) if it is determined that at least one of the counters exceeds the associated threshold value, selecting one of the corresponding scheduler tasks having the counter which exceeds the associated threshold value according to at least one selection criterion, executing the selected scheduler task, and resetting the counter of the selected scheduler task;
(d) incrementing by one the counters assigned to the remaining scheduler tasks which were not executed; and
(e) repeating steps (a) through (d) if it is determined that at least one of the scheduler tasks is waiting to be executed.
8 Assignments
0 Petitions
Accused Products
Abstract
Instead of a conventional task scheduler in which tasks having a high priority are preferentially scheduled, so that the execution of tasks with very low priorities is blocked, a “fair scheduler” is proposed in which each task (TA to TE) is assigned a counter (CNT) and a threshold value (THD), with the threshold value specifying a maximum number of execute cycles within which the task need not be executed immediately, and the counter counting those execute cycles within which the task is not executed. At the beginning of each execute cycle, a test is made to determine whether one of the counters exceeds the associated threshold value. If that is the case, one (TD) of the corresponding tasks (TC, TD) is selected by a selection criterion and executed, and its counter is reset. The counters assigned to the remaining tasks are incremented by one, and the execute cycle is repeated if it is found that at least one more of the tasks (TC) is waiting to be processed.
69 Citations
10 Claims
-
1. A method for cooperative multitasking in a computer-controlled network element of a digital communications network wherein scheduler tasks are executed in a determined order, the method comprising the steps of:
-
(a) assigning a counter and a threshold value to each scheduler task, the threshold value specifying a maximum number of execute cycles within which the scheduler task need not be executed immediately, and the counter counting those execute cycles within which the scheduler task is not executed;
(b) determining at the beginning of each execute cycle whether at least one of the counters exceeds the associated threshold value;
(c) if it is determined that at least one of the counters exceeds the associated threshold value, selecting one of the corresponding scheduler tasks having the counter which exceeds the associated threshold value according to at least one selection criterion, executing the selected scheduler task, and resetting the counter of the selected scheduler task;
(d) incrementing by one the counters assigned to the remaining scheduler tasks which were not executed; and
(e) repeating steps (a) through (d) if it is determined that at least one of the scheduler tasks is waiting to be executed. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
- 9. A network element for a digital communications network, comprising at least one processor and a control module for implementing cooperative multitasking, wherein the processor executes scheduler tasks in an order determined by the control module, wherein for the determination of the order, the control module assigns a counter and a threshold value to each scheduler task, the threshold value specifying a maximum number of execute cycles within which the scheduler task need not be executed immediately, and the counter counting the execute cycles within which the scheduler task is not executed, wherein the control module determines at the beginning of the execute cycle whether at least one of the counters exceeds the associated threshold value, wherein, if it is determined that at least one of the counters exceeds the associated threshold value, the processor selects one of the corresponding scheduler tasks by at least one selection criterion and executes the selected scheduler task, the control module resets the counter of said the selected scheduler task which is executed, wherein at the end of the execute cycle, the counters assigned to the other scheduler tasks which were not executed are incremented by one, and wherein the control module controls a repetition of the execute cycle if it determines that at least one of the scheduler tasks is waiting to be executed.
Specification