## 6 Worst-Case Latency Analysis of the FWOS Model
### Maximum Waiting Time Consideration  
The waiting time represents the time delay that the arrived frame experiences from the arrival instance to the first contention-free window's starting time. The maximum waiting time for the \(Q_{k}^{th}\) frame before getting the service considers the most pessimistic arrival instance. In general, the maximum waiting time until the chance to serve the frame is bounded by the earliest instance of the frame arrival in the selected node (\(t_{k}^{h,arrive}\Big{|}_{earliest}\)) and the starting time of the nearest contention-free interval for the associated queue (\(t_{k}^{h,B}\)), as follows:  
\[WT_{k}^{th}=t_{k}^{h,B}-t_{k}^{h,arrive}\Big{|}_{earliest} \tag{25}\]  
As discussed in [13], the earliest arrival instance depends on the selected node's order. The arrival instance in the first node (source) \(t_{k}^{FN,arrive}\) is arbitrary and can be at any moment during the \(T_{k}^{FN}\) interval. On the other hand, in the non-first node (selected switch in the route), the frame arrival is bounded by the open-window interval for the corresponding queue in the previous node. In the first node, the worst arrival instance happens when the first frame arrives at the end of the associated contention-free interval (\(\overline{W}_{k}^{FN,j}\)) and the remaining time is not enough to transmit it, as depicted in Figure 10. Thus, this frame waits for the next contention-free window to be transmitted. A more pessimistic arrival case happens when the \(Q_{k}^{FN}\) frame arrives at the end of the contention-free interval, and there is a lower-priority frame in the transmission status. Even if there is enough time to transmit the \(Q_{k}^{FN}\) frame, it has to wait for that lower-priority frame, as shown in Figure 10. The non-preemption technique prevents the \(Q_{k}^{FN}\) frame to interrupt that lower-priority frame. After the transmission of the \(Q_{k^{+}}^{FN}\) frame finishes, the remainder of the time is not enough to transmit \(Q_{k}^{FN}\) frame. Accordingly, the overlapping between \(Q_{k}^{FN}\) and \(Q_{k^{+}}^{FN}\) open windows maximizes the waiting time if the overlapping interval in the previous open window (\(L_{L}^{FN,\,E,i-1}\)) is larger than (\(f_{k}^{FN,max}/C_{FN}\)). The waiting time is maximized by the term \(D_{L}^{FN,np,0}\), which is limited by the length of the highest lower-priority overlapping interval in the previous open window (\(L_{L}^{FN,E,j-1}\)) and the time required to transmit the largest size of the lower-priority frame (\(f_{k^{+}}^{FN,max}/C_{FN}\)), as follows:  
\[ \begin{split} D_{L}^{FN,np,0}=\left\{\begin{array}{l}\underset{k <k^{+}\leq N_{q}}{\max}\Big{\{}min\Big{\{}\frac{f_{k^{+}}^{FN,max}}{C_{FN}},L ^{FN,E,i-1}\Big{\}}\Big{\}}&,\ t_{m}^{FN,o,j-1}<t_{k}^{FN,c,i-1}<t_{m}^{FN,c,i -1}\\ 0&,\text{otherwise}\end{array}\right.\\ \text{where }L_{L}^{FN,E,i-1}=W_{k}^{FN,i-1}\underset{k<k^{+}\leq N _{q}}{\max}\Big{\{}O_{k}^{FN,E,i-1}\Big{\}}.\end{split} \right.\\ \text{where }L_{L}^{FN,E,i-1}=W_{k}^{FN,i-1}\underset{k<k^{+} \leq N_{q}}{\max}\Big{\{}O_{k}^{FN,E,i-1}\Big{\}}.\end{split} \tag{26}\]  
Figure 10: The maximum waiting time at the first node. Then, by taking the contention-free window \(\overline{W}_{k}^{FN,i}\) as a benchmark, the maximum waiting time \(WT_{k}^{FN,i}\) at the beginning of the backlog time interval can be given by  
\[WT_{k}^{FN,i}=t_{k}^{FN,B,j}-\left(t_{k}^{FN,E,i-1}-D_{L}^{FN,np,0}\right) \tag{27}\]  
For the non-first node \(h\), the arrival instance is bounded by the starting time of the contention-free intervals in \(h\) and all preceding nodes connected to \(h\) input ports (\((h-1)^{1},\ \ldots,\ (h-1)^{IN^{h}}\)), as shown in Figure 11, where \(IN^{h}\) represents the number of input ports in \(h\). In any case, the frame cannot arrive at \(h\) out of these boundaries.