## 4 Proposed Resource Allocation Scheme  
We propose a priority-based resource allocation method that resides in the C-RAN and has two queues. Two queues are provided, where the first is given to eMBB services and the second is allocated to mMTC services. Figure 3 shows the proposed scheme with the two queues. The incoming eMBB request is stored in its queue when the system is fully occupied and is indicated as 1 QeMBB, whereas the incoming mMTC request is stored in its queue when all resources are busy and is called 2 QmMTC. The sizes of 1 QeMBB and 2 QmMTC are assumed to be M and N, respectively. When we apply FIFO in the C-RAN, the C-RAN will allocate resources for each queue based on FIFO discipline. All BBUs are open for all incoming services, and 1 QeMBB is served before 2 QmMTC.  
Figure 2: System model.  
The main expected behaviors of the proposed scheme can be explained based on the occurrences of the following events:  
* _uRLLC arrival_: when an arrival request from uRLLC occurs, it will go immediately to the BBU pool, and the BBUs will be checked first. If there are available BBUs, then the request is allocated to the required resources. If no BBUs are available, then we will have the following scenarios: If the same service type (uRLLC) occupies all BBUs of the C-RAN, then the received request is blocked. If the BBUs are fully occupied and there is at least one service type of eMBB or mMTC in progress, then the ongoing service type will be forced to terminate its occupied BBUs. Since eMBB has a higher priority than mMTC, the ongoing mMTC service will be interrupted first. If the interrupted service is of type mMTC, then it will be sent back to its queue if it is not full; otherwise, it will be dropped and considered a forced termination. If there is no ongoing mMTC, then the ongoing eMBB is forced to terminate its occupied BBUs.
* _An eMBB or mMTC arrival_: If the new arrival request is of type eMBB or mMTC, then if there is at least one available BBU resource, it will be allocated to the available resource. In the event that there are no available BBU resources, the arrival request will be queued in its corresponding queue. If its queue is full, then the new arrival request will be blocked.
* _An uRLLC, eMBB, or mMTC departure_: If any of the use cases complete their service and release the used BBU resources, then the resource becomes available. After that, the system will check the 1 QeMBB queue, and if there is any waiting request, it will be allocated to the available resource based on FIFO discipline. If the 1 QeMBB queue is empty, then the 2 QmMTC queue will be checked and serviced if it has a queued request. If all queues are empty, then the available BBU will be left empty in the BBU pool. The pseudocode for the main arrival process of the proposed scheme is shown in Table 2. In order to study the performance of the proposed scheme and to compare it with related previous models, we will study its behavior using different processing methodologies, as follows:  
* Methodology I: the resource allocation scheme has no queues, which is similar to the behaviors studied in [22; 23; 24].  
Figure 3: Proposed queuing model for the 5G slicing categories (1–4...N: queue size).  
* Methodology II: the resource allocation scheme has two queues for eMBB and mMTC without allowing the interrupted mMTC to rejoin its queue again.
* Methodology III (proposed scheme): the resource allocation scheme is similar to Methodology II, but it allows the interrupted mMTC to rejoin its queue again if it is not full. The arrival request of type uRLLC can preempt the lower-priority services that are in service.