## 4 Fragmentation and ISRS-Aware Survivable RBMSA Algorithm  
In this section, we propose the fragmentation and ISRS-aware survivable RBMSA (FISRSA-S RBMSA) algorithm. The proposed algorithm ensures end-to-end QoT in fault-free or single-link failure scenarios while improving spectrum resource utilization efficiency and reducing the bandwidth blocking rate. The pseudocode of our proposed algorithm is given in Algorithm 1. When requests arrive in the network, they should be assigned primary and backup path resources based on their source and destination nodes, bandwidth, and other requirements. For the primary path, Equation (15) is used to calculate congestion weights for links to minimize the interference between requests. \[W_{\text{C}}=\frac{F_{used}}{F_{total}}. \tag{15}\]  
The link weight is set based on the resource occupancy situation of the link, where \(W_{\text{C}}\) represents the congestion level of the link. \(F_{total}\) and \(F_{used}\) represent the total and occupied FSs within the L band on the link. Then, \(k\) paths are found for requests using minimum congestion routing according to the \(W_{\text{C}}\), which in turn reduces the interference between requests effectively. The spectrum fragmentation of \(k\) paths can be calculated by Equation (1). The \(k\) paths are ascended based on the degree of spectrum fragmentation. The path that has the least spectrum fragmentation is selected to allocate resources for the request. Finally, we need to choose a spectrum block that has minimum impact on subsequent requestsfrom all free spectrum blocks. Equation (16) is used to calculate the impact on subsequent requests after the free block is occupied. \[F_{free}=\sum_{i=1}^{n}\sum_{k=1}^{a}\frac{(f_{i}-f_{r})\cdot\sqrt{f_{i}-f_{r}}}{ f_{k}\cdot\sqrt{f_{k}}+1}, \tag{16}\]  
where \(F_{free}\) represents the impact on subsequent requests after the spectrum block is occupied, \(f_{r}\) denotes the quantity of FSs necessitated by the present request \(r\), \(k\) represents the number of spectrum blocks which is partitioned after allocation of requests, and \(f_{k}\) denotes the number of FSs in each partition. The spectrum block that has the least impact on the subsequent request are calculated according to the relationship between the current request demand and the free spectrum blocks. Then, the OSNR of these spectrum blocks are calculated according to Equation (4). If there is more than one spectrum block that meets OSNR demand of the request, then first fit (FF) [27] is used to allocate spectrum resources. Also, if the path cannot find the free spectrum blocks, the next alternate path is selected until all the paths have been traversed. After finding the free spectrum resource for the request in the primary path, the disjoint links [10] are selected for backup paths. Equation (17) is used to calculate the shareability of links. \[W_{Share}=\frac{N_{Sharable}}{N_{C}}, \tag{17}\]  
where \(W_{Share}\) represents the shareability of links, \(N_{c}\) represents the total number of FSs in C band on link \(l\), and \(N_{Sharable}\) represents the total number of FSs in C band on link \(l\) that can be shared by the current request. \(k\) paths with maximum shareability are selected for the request. Then, the fragmentation of all the alternate backup paths is calculated according to Equation (18). \(F_{shareable}\) represents the fragmentation degree of the backup path. \(p\) denotes the \(p\)th sharable spectrum block in link \(l\). The alternate backup paths are ranked according to the fragmentation degree, and the path with the least fragmentation degree is selected. Based on a distance-adaptive modulation format, the suitable modulation format is chosen for the requests. It should be noted that the 1 of Equations (17) and (18) is intended to avoid a denominator of 0 if there are no blocks of free spectrum in the selected link to satisfy the demand for the requested FSs.