## 4 Algorithm Description
### The Deadline Preference Dispatch Scheduling (DPDS) Algorithm
The possible world set \(W\) of \(t_{6}\) is shown in Figure 5c. The **completion probability**\(\Pr^{l}(t_{6})\) of \(t_{6}\) is 66.7%, which is calculated by Equation (1), so the **completion risk** of the task \(t_{6}\) is 33.3%. Figure 4: The execution processes of the deadline preference dispatch scheduling (DPDS) algorithm. #### 4.2.2 The Description of the IDCS Algorithm

The IDCS algorithm is a dynamic allocation method based on the objective of maximizing the number of tasks completed. To achieve the objective of completing the maximum number of tasks with limited computing resources, the IDCS algorithm chooses the task to assign based on **task priority** and **completion risk** of the task. Task partitioning is divided into simple and urgent tasks, simple tasks, complex tasks and complex and urgent tasks according to their computational cost and the size of deadline constraints, which correspond to different **task priority**, as shown in Figure 6.

Figure 5: An example of using a risk prediction model to predict completion risk of the task. (**a**) The range of online volunteer nodes from time \(l_{1}\) to time \(l_{1}+4\); (**b**) list of tasks at time \(l_{1}\); (**c**) the possible world set \(W\) of the task \(t_{6}\). The specific ways of division are as follows:

If the computational cost of task \(t\) is less than the average computational cost of all tasks in the task list, and \(t\). _deadline_ is less than the middle time of the whole computing time, it is considered that the task \(t\) is simple and urgent, and the **task priority** corresponding to \(t\) is 1. If the computational cost of the task \(t\) is less than the average computational cost of all tasks in the task list, and \(t\). _deadline_ is greater than the middle time of the whole computing time, it is considered that task \(t\) is a simple task, and the **task priority** corresponding to \(t\) is 2. If the computational cost of task \(t\) is greater than the average computational cost of all tasks in the task list and \(t\). _deadline_ is greater than the middle time of the whole computing time, it is considered that \(t\) is a complex task, and the **task priority** corresponding to \(t\) is 3. If the computational cost of task \(t\) is greater than the average computational cost of all tasks in the task list, and \(t\). deadline is less than the middle time of the whole computing time, it is considered that task \(t\) is complex and urgent, and the **task priority** corresponding to \(t\) is 4. For example, as shown in Figure 4(b), the average computational cost of all tasks is 5.8 and the middle time of the whole computing time is 2.5. Therefore, according to the division criteria mentioned above, the task \(t_{1}\) is a simple task and the **task priority** of \(t_{1}\) is 2. The task \(t_{2}\) is a simple and urgent task, and the **task priority** of \(t_{3}\) is 4. The task \(t_{4}\), \(t_{5}\), \(t_{6}\) are complex tasks, and their **task priority** is 3. In the IDCS algorithm, firstly, the **task priority** and the **completion risk** are calculated as described above. Secondly, the IDCS algorithm deletes tasks that cannot be completed based on **task priority** and **completion risk**. Finally, Algorithm 1 is called to allocate tasks. The IDCS algorithm is described in detail in Algorithm 4. ```
Input: task set \(T_{l}\), volunteer node set \(N_{l}\), threshold \(\theta\), the current time \(l\), possible world \(W\) Output: task assignment set \(T\).\(\mathit{assign}\). 1. Calculate the **task priority** and the **completion risk** of each task in \(T_{l}\)
2. For each \(t^{\prime}\in T_{l}\)do
3. If Risk(\(t^{\prime}\),\(W\),\(W\))? \(\theta\)&& (task priority of \(t^{\prime}\) = 4 or task priority of \(t^{\prime}\) = 3 )
4. Delete the task \(t^{\prime}\) from \(T_{l}\)
5. EndIf
6. End For
7. Call tasksassign(\(T_{l}\), \(N_{l}\), \(\eta\)// call Algorithm 1
8.