# Dynamic Network Resource Autonomy Management and Task Scheduling Method
## 3 Dynamic Resource Management Architecture and Task Scheduling Method
### Satellite Mission Scheduling  
In our proposed framework, we denote the set of all tasks to be executed by a satellite as a task queue. The tasks about the satellite may be requested by the user or assigned according to the satellite system. The tasks in the task queue will be arranged according to a certain priority, which we denote as set \(\Gamma^{{}^{\prime}}_{s_{j}}=\left\{\tau_{1},\tau_{2},\cdots,\tau_{p}\right\}, \ p\geq 1,\ p\in\mathbb{N}^{*}\), which is also the input of our proposed model, and a certain task on a satellite is noted as \(\tau^{{}^{\prime}}_{k}\), \(k\in\{1,2,\cdots,p\}\). For the output of our model, we specify that if task \(\tau_{i}\in\Gamma^{{}^{\prime}}_{s_{j}}\), then there exists \(\tau_{i}=\tau^{{}^{\prime}}_{k}\), marking the state of task \(\tau_{i}\) on satellite \(s_{j}\) as \(M_{ij}=1\); otherwise, mark it as \(M_{ij}=0\). We define a mission-affiliated satellite matrix, \(M^{t}_{\Gamma}=\left[\begin{matrix}\sigma^{t}_{1}&\sigma^{t}_{2}&\cdots&\sigma ^{t}_{h}\end{matrix}\right],\ \sigma_{i}\in\{1,2,\cdots,n\},\ h=p,\ t\in\delta\), where \(\delta\) denotes the discrete period, and the mission matrix element is the satellite number indicating the satellite number to which the mission belongs.  
As shown in Figure 7, when \(t=0\), \(M_{\Gamma}(0)\) is the initial state of the satellite to which the mission belongs.  
When t=\(\varrho\), \(M_{\Gamma}(\varrho)\) is the initial state of the satellite belonging to the task at the moment \(\varrho\). (It should be noted that only one satellite is allowed to perform a mission)  
The matrix we have defined represents the satellites to which each character belongs and their status. This matrix helps to determine to which satellite the task should be assigned and allows us to make an optimal decision to choose which satellite is suitable for which task.  
Regarding the objective of our proposed algorithm, we denote the execution time of a particular task \(\tau_{u},\ u\in\{1,2,\cdots,m\}\) as \(T(\tau_{u})\), and we have.  
Figure 6: Inter-cluster relationship diagram.  
Task execution time \(T(\tau_{u})\) = task scheduled execution time \(E(\tau_{u})\) + task waiting time \(W(\tau_{u})\) + task transmission time \(\psi(\tau)\).  
From this, we can calculate the execution time of all tasks:  
\[T =\sum_{\tau\in T}T(\tau)\] \[=\sum_{\tau\in T}E(\tau)+W(\tau)+\psi(\tau)\] \[=\begin{cases}\sum_{\tau\in T}\left(E(\tau)+\sum_{\{\gamma\gamma \gamma\in\xi,\;\xi\in T\}}E(\gamma)+\sum_{\{k:1\leq k\leq h\}}Tran\left(s_{e_{k }^{0}},s_{e_{k}^{0}}\right)\right)&M_{\varrho}\
eq 0\\ \sum_{\tau\in T}\left(E(\tau)+\sum_{\{\gamma\gamma\gamma\xi,\;\xi\in T\}}E( \gamma)\right)&M_{\varrho}=0\end{cases}\] \[.t.\] \[(\tau_{u})\leq R_{s_{j}}^{l},\] \[\sigma_{k}\in M_{\varrho}.\]  
According to Algorithm 1, we first sort the tasks according to their priority and deadline (line 1) and select the task with the highest priority and the closest deadline for scheduling. If the task is feasible, it proceeds to schedule the task (lines 2-3), and if the task is not achievable, it updates its priority based on the new information and puts it back into the ready queue (lines 4-5). The algorithm continues until all tasks have been scheduled or the ready string is empty.  
```
Input: Task set tasks. Output: Schedule of tasks.
1 Sort tasks based on their priority and deadline; ready_queue \(\leftarrow\) tasks; while ready_queue is not emptydo
2 task \(\leftarrow\) get next task from ready_queue; if task_is_feasible()then
3 Schedule task;
4 else
5 Update task priority based on new information; Put the task back to ready_queue;
```  
**Algorithm 1**Highest Priority Scheduling