# Deadline-Aware Scheduling for Transmitted RSU Packets in Cooperative Vehicle-Infrastructure Systems
## 3 System Model
### Queue Model  
The data types are divided into emergency and non-emergency data. According to the type of data arrival, the data cache queue of the vehicle is divided into high- and low-priority data queues. Let \(b_{n}(t)\) denote the data cache queue selection decision within the range of \(RSU_{n}\) in the t-slot, of which \(b_{n}(t)\in\{0,1\}\). \(b_{n}(t)=1\) indicates that the data packets in the high-priority data queue will be transmitted by \(RSU_{n}\) in the t-slot. \(b_{n}(t)=0\) indicates that the data packets in the low-priority data queue will be transmitted by \(RSU_{n}\) in the t-slot.  
Considering that the data queue capacity of RSU is limited, let \(Q_{n}^{H}(t+1)\) denote the high-priority data cache queue length of \(RSU_{n}\) in the \(t+1\) slot. Then, the updated data queue expression would be as follows:  
\[Q_{n}^{H}(t+1)=\text{max}\Big{\{}Q_{n}^{H}(t)-B_{n}^{H}(t)+h_{n}^{H}(t),0 \Big{\}} \tag{13}\]  
\(h_{n}^{H}(t)\) represents the number of emergency data packets arriving at the high-priority data queues of \(RSU_{n}\) in the time slot t, which is expressed as \(h_{n}^{H}(t)=\vartheta\cdot h_{n}(t)\).  
\(\vartheta\) indicates the probability that the data type arriving is an emergency data packet. \(1-\vartheta\) indicates the probability that the data type arriving is a non-emergency data packet. \(h_{n}(t)\) represents the number of data packets that reach \(RSU_{n}\) in time slot t. Its probability density function is  
\[P\{h_{n}(t)=u\}=\theta_{u}\,,\,u\in\{0,1,\dots,U\} \tag{14}\]  
where \(\theta_{u}\in[0,1]\) represents the probability of u data packets arriving at RSUs in the time slot t. The data arrival distribution satisfies \(\sum\limits_{u=0}^{U}\theta_{u}=1\), and \(\theta_{u}=0,\forall u>U\). The average arrival rate of the group is \(\overline{h}=\sum\limits_{u=0}^{U}{{{u}}}{{u}_{u}}\). When the data queue is full, the newly arrived data packet overflows.  
\(B_{n}^{H}(t)\) is the number of emergency data packets transmitted by \(RSU_{n}\) in the t-slot, which is expressed as  
\[B_{n}^{H}(t)=b_{n}(t)d_{n}(t) \tag{15}\]  
\(d_{n}(t)\in\{0,1,\ldots,S\}\) represents the number of data packets that \(RSU_{n}\) sent to the arriving vehicle in the time slot t, where \(S\) is the maximum number of data packets that \(RSU_{n}\) can transmit to the vehicle in each time slot, \(d_{n}(t)\)\(=0\) is when the vehicle speed state is \(X+1\), indicating that no vehicle arrived in the current time slot. \(\sum\limits_{n=1}^{N}{{{d}}_{n}(t)}\leq S\cdot\kappa(t)\) is satisfied \(\forall n,t\).  
In order to ensure the data cache queue's stability and reduce the data transmission delays, the system designates \(\varpi\) as the upper limit of the long-term average data cache queue length. The expression is as follows:  
\[\lim\limits_{T\rightarrow\infty}\frac{1}{T}\sum\limits_{t=0}^{T-1}{{E}\Big{\{} Q_{n}^{H}(t)\Big{\}}}\leq\varpi \tag{16}\]  
Let \(Q_{n}^{L}(t+1)\) denote the low-priority data cache queue length in the \(t+1\) slot. The data queue update expression would be as follows:  
\[Q_{n}^{L}(t+1)=\max\Big{\{}Q_{n}^{L}(t)-B_{n}^{L}(t)+h_{n}^{L}(t),0\Big{\}} \tag{17}\]  
\(h_{n}^{L}(t)\) represents the number of non-emergency data packets arriving at the low-priority data queues of \(RSU_{n}\) in the time slot \(t\), which is expressed as  
\[h_{n}^{L}(t)=(1-\varpi)h_{n}(t) \tag{18}\]  
The newly arrived data packet overflows when the data queue is full.  
\(B_{n}^{L}(t)\) is the number of non-emergency data packets transmitted by \(RSU_{n}\) in the t-slot, which is expressed as  
\[B_{n}^{L}(t)=(1-b_{n}(t))d_{n}(t) \tag{19}\]  
To ensure the data cache queue's stability and reduce data transmission delays, the system gives \(\xi\) as the upper limit of the long-term average data cache queue length. The expression is as follows:  
\[\lim\limits_{T\rightarrow\infty}\frac{1}{T}\sum\limits_{t=0}^{T-1}{{E}\Big{\{} Q_{n}^{L}(t)\Big{\}}}\leq\xi \tag{20}\]