## 4 The PI-Based Task Offloading Algorithm
### General Framework
Unfortunately, the limited LISL connections in SEC cause a challenge in spreading removal impacts among all satellites, leading the SEC system to be easily trapped into local optimum [33]. Consider the example in Figure 4: nine satellites \(s_{1}\)-\(s_{9}\) are connected via LISLs, and task \(t\in T\) is located in \(\theta_{5}\). We make two assumptions: (1) \(\mathcal{I}(\theta_{s}\oplus t)>\mathcal{R}(\theta_{5}\odot t)\) for \(\forall s\in\{4,8\}\), and (2) \(\mathcal{I}(\theta_{7}\oplus t)<\mathcal{R}(\theta_{5}\odot t)\). That means that removing task \(t\) from \(\theta_{5}\) to \(\theta_{7}\) will decrease \(F(\theta)\). However, given that \(\mathcal{I}(\theta_{s}\oplus t)>\mathcal{R}(\theta_{5}\odot t)\) exists for \(\forall s\in\{4,8\}\), task \(t\) cannot be incorporated into either \(\theta_{4}\) or \(\theta_{8}\) by Lemma 1, and so \(t\) cannot be added to \(\theta_{7}\), resulting in a local optimum. This problem also exists in other distributed approaches, such as CNP [24] and DETS [26]. To avoid local optimum and update removal impacts among satellites, each satellite \(s\in S\) uses three vectors: \(\mathbf{R}_{s}\), \(\mathbf{W}_{s}\), and \(\mathbf{Q}_{s}\), when communicating with its neighbors in PITO. 1. \(\mathbf{R}_{s}=[R_{s1},R_{s2},\ldots,R_{sn}]^{\mathrm{T}}\) is a vector recording the latest removal impacts of tasks in \(T\). Initially, we set \(R_{st}=\mathcal{R}(\theta_{s}\odot t)\) for \(\forall\)\(t\in\theta_{s}\), and otherwise \(R_{st}=\infty\). 2. \(\mathbf{W}_{s}=[W_{s1},W_{s2},\ldots,W_{sn}]^{\mathrm{T}}\) is a vector recording the considered offloaded satellite of tasks in \(T\). The entry \(W_{st}=k\) represents the fact that satellite \(s\) believes \(t\) is offloaded to satellite \(k\). Initially, we set \(W_{st}=s\) for \(\forall\)\(t\in\theta_{s}\), and otherwise, \(W_{st}=0\). 3. \(\mathbf{Q}_{s}=[Q_{s1},Q_{s2},\ldots,Q_{sn}]^{\mathrm{T}}\) is a vector where entry \(Q_{sk}\) is the timestamp where satellite \(s\) thinks it receives the latest information from satellite \(k\). Initially, \(Q_{sk}=0\) for \(\forall\)\(k\in S\). During the communication process, \(Q_{sk}\) is updated under the following rules: \[Q_{sk}=\left\{ \begin{array}{ll}\tau_{sk},&\text{if }G[s,k]=1\\ \max_{t\in S\wedge G[s,l]=1}Q_{lk},&\text{otherwise}\end{array} \right.\] (22) where \(\tau_{sk}\) is the time that satellite \(s\) receives vectors from \(k\). If satellite \(k\) is a neighboring satellite of \(s\) (i.e., \(G[s,k]=1\)), we have \(Q_{sk}=\tau_{sk}\); otherwise, \(Q_{sk}\) is set to the latest timestamp \(Q_{lk}\) from its neighbors \(l\) (i.e., \(l\in S\wedge G[s,l]=1\)). Subsequently, we detail the framework of PITO in Figure 3. Algorithm PITO runs on each satellite in parallel, including two stages: (1) task inclusion, and (2) consensus and task removal. Specifically, in the task inclusion stage, each satellite \(s\in S\) independently constructs sequence \(\theta_{s}\). This process may result in various removal impacts for a specific task \(t\in T\) on different satellites. Then, another stage is required, consisting of a further two steps: first, a common removal impact vector \(\mathbf{R}_{s}\) is reached among satellites during the consensus process; then, satellites remove conflict tasks from their sequences in the task removal process. The above two stages perform alternately. When there are no changes in offloading assignment \(\theta\), Algorithm PITO terminates in all satellites. Notably, in PITO, satellites only communicate with neighbors during the consensus process, which is expected to reduce the communication times. The procedure of PITO is then summarized in Algorithm 1.