# Application and Performance Evaluation of Resource Pool Architecture in Satellite Edge Computing
## 3 Proposed Architecture
### Satellite Node Selection
#### 3.3.5 Selection Algorithm  
The response time is mainly considered in the task-oriented resource pool node selection problem. The constraints include resource constraints, communication constraints, and synchronization constraints. To solve the above problem, the paper adopts a search matching algorithm, which can comprehensively consider three constraints and planning objectives, and finally select the target node group according to the priority of planning objectives. The purpose of the resource pool is to serve the task. As satellite tasks have the highest time requirements, the average response time of the task is given priority in the selection of nodes [27]. At the same time, the resources of the satellite are strictly limited. Due to the characteristics of satellite orbit movement, it is easy to cause the centralized use of resources at some nodes. Therefore, it is necessary to consider the load balance of resource nodes to prolong the service life of the satellite. Based on the above considerations, the task-oriented resource pool node selection algorithm in this paper is shown in Algorithm 1.  
A satellite orbit parameter file is used to obtain the position of satellites. The sort operation in row 11 is sorted by decreasing order. \(R_{flag}\) is the flag of resource demand satisfaction. In this algorithm it is four, which represents four resource marks: CPU, storage, communication, and sensor. Following this, the operation in the selection algorithm aims to select \(k\) satellites according to the target ranking of response time and load balance. The process is: checkout (15) to satisfy the basis of meeting the response time, then calculate (16) using the (14) to get the resource balance. Finally, output the \(k\) satellites matrix. It can be seen from the algorithm that the goals are to complete the task, improve the response speed, and ensure the load balance of the SBIS, to promise service quality for users and improve the service life of the satellite. However, it can also be found that not all tasks can respond successfully, and the failure rate of tasks will be further analyzed in the experiment.  
```
0:\(\lambda\), \(N\), \(M\), \(K\), Task file, Satellite orbit parameter file
0:\(k_{s}^{*}\) satellites matrix \(S_{k_{s}^{*}}\)
1: Initialization: task resource requirements, \(t_{e}=\max\{tend_{i}|1\leq i\leq N_{K}\}\)
2: Read the satellite resource status matrix; read satellite orbit position
3: Obtained from (1) \(k_{s}^{*}\), \(L=0\)
4: For \(i=1\) to \(t_{e}\)
5: For \(j=1\) to \(M_{k}\)
6: calculate \(R_{S_{in}}^{Ren}(N_{k_{s}}),R_{S_{in}}^{cpu}(N_{k}),R_{S_{in}}^{mem}(N_{k})\)
7: \(R_{S_{in}}=R_{S_{in}}^{sen}(N_{k})+R_{S_{in}}^{sen}(N_{k})+R_{S_{in}}^{sen}(N_{ k})\)
8: If \(\left|R_{S_{in}}\right|\geq 1\)
9: checkout (19), (20), update \(R_{S_{in}}^{\prime}\)
10: If \(\left|R_{S_{in}}^{\prime}\right|\geq 1\)
11: Sort \(R_{S_{in}}^{\prime}\)
12: End if
13: End if
14: End for
15: Count \(num=\left\{R_{S_{in}}^{\prime}\right|R_{S_{in}}^{\prime}(t_{i})=R_{f\text{l} q}\right\}\)
16: If \(num\succ k_{n}^{*}\)
17: \(S_{k_{s}^{*}}=\left\{RT_{S}^{m}|1\leq i\leq k_{s}^{*}\right\}\)
18: Else
19: \(S_{k_{s}^{*}}=\left\{R_{S_{in}}^{\prime}|1\leq i\leq num\right\}\)
20: End if
21:End for
```  
**Algorithm 1** Satellite node selection of resource pool  
After the satellite node selection algorithm gives the satellites that construct the resource pool, the first one will be selected as the management node. The reason for this is that the ranking is based on the matching degree of satellite resources and tasks. The first one is therefore the best in terms of capability, and choosing the first one can provide the best service in the selected satellite. During the task period, the node selection algorithm will be executed once for each time slot, but the node selection will be executed only after the selection node changes to avoid the node being in constant change.