# QoS-Aware Resource Management in 5G and 6G Cloud-Based Architectures with Priorities
## 2 Scheduler Priority Queue
### q Service Class Buffer Delay Analysis  
Since a queue buffer of finite size Q is considered in the cell, an additional performance metric, the impatience \(T_{\mu b}\) period of one service class q existing in the buffer, is also considered and it is assumed to be exponentially distributed with a mean \(1/\mu_{b}\). This impatience period is a threshold that defines the maximum time a pre-empted service class q IP packet should stay in the MAC/Ethernet queue buffer before either being served back into an empty resource or finally being blocked. State diagrams of such two-dimensional queue models with general C available resources and buffer queue size Q become really complicated to draw, hence without loss of generality and only for simplicity reasons we present, in Figure 2, a state diagram for a special case of cell total resources C = 3 and a general queue length Q = 2. Figure 2: Two-dimensional Markov chain for mixed traffic services with packet queue. The state probabilities, following the proper two-dimensional steady-state analysis based on queueing theory principles, are calculated from the following recursive formula:  
\[ \begin{split}& P_{i,j}=\frac{(\lambda_{n}+\lambda_{h})\cdot P_{i-1,j }+u(C-i)\cdot u(C+1-i-j)\cdot\lambda_{d}\cdot P_{i,j-1}}{i\cdot\mu_{n}+u(i+j-C) \cdot(i+j-C)\cdot\mu_{b}+u(C-i)\cdot j\cdot\mu_{d}+u(C-i)-j)\cdot\lambda_{d}+u (C-i)\cdot(\lambda_{n}+\lambda_{h})}+\\ &\frac{(u(C-j)\cdot(j+1)\cdot\mu_{d}+u(i+j+1-C)\cdot(i+j+1-C) \cdot\mu_{b})\cdot P_{i,j+1}}{i\cdot\mu_{n}+u(i+j-C)\cdot(i+j-C)\cdot\mu_{b}+u (C-i)\cdot\mu_{d}+u(C-i)\cdot(\lambda_{n}+\lambda_{h})}+\\ &\frac{u(C-i)\cdot(i+1)\cdot\mu_{n}\cdot P_{i+1,j}+u(i+j-C-Q+1) \cdot(\lambda_{n}+\lambda_{h})\cdot P_{i-1,j+1}}{i\cdot\mu_{n}+u(i+j-C)\cdot( i+j-C)\cdot\mu_{b}+u(C-i)\cdot\mu_{d}+u(C-i-j)\cdot\lambda_{d}+u(C-i)\cdot( \lambda_{n}+\lambda_{h})}.\end{split}  \tag{1}\]  
Also, considering the conditional probability \(P_{i,j}|(i<0)(j<0)(i>C)(i>C)(i+j>C+Q)=0\) and  
\[u(x)= \begin{cases}1&x>0\\ 0&x\leq 0\end{cases} \]  
Considering a flexible low-priority service class q request with queue buffer size Q, a new request-blocking probability is calculated by:  
\[P_{pp}=\sum_{i=0}^{C}\sum_{ \begin{subarray}{c}q=0\\ q\leq i\end{subarray} }^{Q}P_{i,C-i+q}. \tag{2}\]  
Regarding high-priority service class p requests, blocking probability is provided by  
\[P_{Cb}=\sum_{q=0}^{Q}P_{C,q}. \tag{3}\]  
Additionally, considering the pre-emption case in our analysis, a new blocking probability is essential in order to describe the probability that a previously admitted service class q connection is blocked after it has been pre-empted by class p priority traffic. Consequently a class q connection already being served by the system in state \((i,j)|_{j\
eq 0}\) will be blocked and rejected if (service class q connection has been pre-empted with probability a(i,j) and there was no idle position in the queue) \(\cup\) (service class q connection has been pre-empted with probability a(i,j), obtains a position in the queue, but will never be served due to impatience time expiration with a probability \(\left(1-T_{yout/(i,j)}\right)\). In order to analytically calculate this blocking probability, we consider the Markov queue as an input-output system with \(y_{in}\) and \(y_{out}\) sets of steady states. For the input \(y_{in}\) set, we do consider the set of states that could accommodate one service class p request leading into pre-emption of one packet into the buffer, thus \(y_{in}=\{(i,j):(i,j)\in\{(0,3),(1,3),(1,2),(2,2),(2,1)\}\}\) for total C = 3 resources and Q = 2 positions in the queue. Providing an example concerning the state (0,3) \(\in\) y_in the set will also clarify the same reasoning for the remaining states of the set.