# Lossless and High-Throughput Congestion Control in Satellite-Based Cloud Platforms +
## 3 Integrated System and Algorithm Design
### Data Flow Scheduling Model  
We introduce a flow scheduling model to ensure QoS guarantees. In this paper, QoS guarantees represent the swift forwarding of critical Data packets. Assuming a time step of \(\tau\), one Data packet can be sent within each time step. Consider the scenario where \(N\) Data packets are stored in the CS waiting to be forwarded. The priority of the Data \(i\) is represented by \(p_{i}\). This specific Data has been held in the CS for a duration of \(m_{i}\) time steps, where \(m_{i}\) is a known constant. Let \(t_{i}\) denote the total queuing time of the Data. If the Data are scheduled for transmission after \(n_{i}\) time steps, then \(t_{i}=(m_{i}+n_{i})\tau\). Our optimization goal is to identify a set \(\{n_{1},\ldots,n_{N}\}\) that minimizes the total sum of weighted queuing time for all Data packets. The weighted queuing time is calculated as the product of the priority of each packet and its queuing time:  
\[\min\sum_{i=1}^{N}p_{i}t_{i}=\min\sum_{i=1}^{N}(p_{i}m_{i}\tau+p_{i}n_{i}\tau) \tag{26}\]  
We stipulate that a larger \(p_{i}\) signifies a higher priority. It is worth noting that \(\{n_{1},\ldots,n_{N}\}\) belongs to the set \(P\), and \(P\) denotes the permutation of \(N\) elements, where \(N\) elements are integers 1 to \(N\). Since \(p_{i}\) and \(m_{i}\) are constants, then \(\sum_{i=1}^{N}p_{i}m_{i}\tau\) is a constant term that can be ignored, and the optimization objective is changed to minimize \(\sum_{i=1}^{N}p_{i}n_{i}\tau\). This problem can be seen as sequentially assigning numbers \(1\sim N\) to the \(j\)th Data. In an optimal set \(\{n_{1},\ldots,n_{N}\}\), it is essential that the priority \(p_{j}\) of the Data with \(n_{j}=1\) must be the highest. This means that \(\forall i=1\sim N,p_{j}\geq p_{i}\). This aligns with the well-known greedy algorithm. We first establish the above proposition. If the assumption \(\forall i=1\sim N,p_{j}\geq p_{i}\) is not valid, there exists a \(k\
eq j\) such that \(p_{k}>p_{j}\). The objective function in this case is  
\[L_{1}=\sum_{i=1}^{N}p_{i}m_{i}\tau+\sum_{ \begin{subarray}{c}i=1\\ i\
eq j,k\end{subarray} }^{N}p_{i}n_{i}\tau+p_{j}n_{j}\tau+p_{k}n_{k}\tau \tag{27}\]  
where \(n_{j}=1\) and \(n_{k}>n_{j}\). If we exchange \(n_{j}\) and \(n_{k}\), the objective function becomes  
\[L_{2}=\sum_{i=1}^{N}p_{i}m_{i}\tau+\sum_{ \begin{subarray}{c}i=1\\ i\
eq j,k\end{subarray} }^{N}p_{i}n_{i}\tau+p_{j}n_{k}\tau+p_{k}n_{j}\tau \tag{28}\]  
Subtracting the two equations, we obtain that  
\[L_{2}-L_{1}=\big{(}n_{j}-n_{k}\big{)}\big{(}p_{k}-p_{j}\big{)}\tau \tag{29}\]  
Considering that \(n_{k}>n_{j}\) and \(p_{k}>p_{j}\), it can be inferred that \(L_{2}-L_{1}<0\). This implies \(L_{2}<L_{1}\). Therefore, if \(p_{j}\) is not the highest priority, the objective function can be minimized by swapping its transmission order with the Data with the highest priority. If \(p_{j}\) is not the highest priority, it is not the optimal solution. This implies that the smaller \(n_{i}\) should be allocated to the Data with larger \(p_{i}\). When selecting the Data to be forwarded, it is preferable to choose the Data with the highest priority. This approach can be generalized to the forwarding of a series of Data packets. Given an optimal solution \(\{n_{1},\ldots,n_{N}\}\), it is guaranteed that for each \(n_{j}<n_{k}\), it holds that \(p_{j}\geq p_{k}\)The proof follows a similar logic as mentioned earlier, employing proof by contradiction. Assume that there exists some \(n_{j}<n_{k}\) with \(p_{j}<p_{k}\). In this scenario,  
\[L_{3}=\sum_{i=1}^{N}p_{i}m_{i}\tau+\sum_{ \begin{subarray}{c}i=1\\ i\
eq j,k\end{subarray} }^{N}p_{i}n_{i}\tau+p_{j}n_{j}\tau+p_{k}n_{k}\tau \tag{30}\]  
If we exchange \(n_{j}\) and \(n_{k}\), the objective function becomes  
\[L_{4}=\sum_{i=1}^{N}p_{i}m_{i}\tau+\sum_{ \begin{subarray}{c}i=1\\ i\
eq j,k\end{subarray} }^{N}p_{i}n_{i}\tau+p_{j}n_{k}\tau+p_{k}n_{j}\tau \tag{31}\]  
By subtracting the two equations, the following is obtained: \(L_{4}-L_{3}=\left(n_{j}-n_{k}\right)\left(p_{k}-p_{j}\right)\tau<0\).