## 3 Proposed Quality of Service Routing Protocol (QoSRP) in UWSNs
### Underwater Acoustic Channel Assignment Algorithm (iiwca)
In fact, it sorts channels in a way that a channel with high achievable throughput and data rate available for a longer time has high priority in the channel table. The priority of the channels periodically monitors and changes in each round of the data transmission in the network. Consequently, the primary users channel history \(\mathcal{P}_{C(A)}\) based on the sensing results is maintained by each secondary user node \(\mathcal{SU}_{J}\) with a predefined priority \((\mathpzc{P}_{i})\) in the underwater, which can be estimated as:  
\[\mathcal{F}_{\mathcal{I}_{\mathcal{d}\epsilon}}(\ell)=\omega e^{-\delta(\ell)},\ \ell\geq 0, \tag{16}\]5  
On the other hand, during the time \(\tau_{i}\) the channels stored with decreasing priority in a \(\mathcal{PS}_{J}\) sensor's channel table is numerically estimated by using the following Equation (31):\[\mathcal{F}_{\mathcal{I}_{\mathcal{d}\epsilon}}(\ell)=\omega e^{-\delta(\ell)},\ \ell\geq 0, \tag{16}\]6  
The volume of channel history data stored \((\mathcal{D}_{s})\) in the channel table of a secondary user at a given time \(\tau_{\mathcal{E}}\) is numerically indicated as:  
\[\mathcal{F}_{\mathcal{I}_{\mathcal{d}\epsilon}}(\ell)=\omega e^{-\delta(\ell)},\ \ell\geq 0, \tag{16}\]7  
In the proposed scheme, a primary or the secondary user sensor may share information to its single hop neighboring sensors and sense the entire region only in a case where the desired capacity channel is currently occupied or does not have desired capacity channel information stored in the CIT. Consequently, at each iteration of the negotiation procedure, the sensor's CIT is periodically updated in the MCASNs. In the proposed scheme, we employ First in First Out (FILO) policy to avoid the management complexity of the events data in a channel information table (CIT). Thus, a channel that is not used in a predefined time is substituted with the new one in the channel table of a primary or secondary user as shown in \[\mathcal{F}_{\mathcal{I}_{\mathcal{d}\epsilon}}(\ell)=\omega e^{-\delta(\ell)},\ \ell\geq 0, \tag{16}\]8 In addition, a \(\mathcal{PU}\) channel with poor data transmission performance is blocked by the \(\mathcal{SU}\) for a defined time interval to provide the opportunity of data transmission for other \(\mathcal{SU}_{\mathcal{B}}\) as revealed in \[\mathcal{F}_{\mathcal{I}_{\mathcal{d}\epsilon}}(\ell)=\omega e^{-\delta(\ell)},\ \ell\geq 0, \tag{16}\]9 It dipicts that the \(\mathcal{PU}_{\mathcal{B}}\) channel is blocked for a predefined time and assigned a lower priority in the CIT since it performs poorly in transmission performance in the UWSNs. Consequently, the probability of ideal channel availability for a secondary user based on the previous channel history between the time \(\tau_{\mathcal{E}}\) and \(\tau_{\mathcal{J}}\) for \(\tau_{\mathcal{E}}\) time can be computed as:  
\[\rho_{(\mathcal{B}_{\mathit{sig}})}=\frac{\delta}{\omega+\delta} \tag{17}\]0  
Thus, the designed scheme saves a notable amount of spectrum re-sensing energy by avoiding the data packet collision due to assigning a longer idle channel between the \(\mathcal{PU}\)s and \(\mathcal{SI}\)s in the UWSNs.