## 3 MEC Network Model
### Queuing Model  
As the user location is modeled as a homogeneous PPP, computation tasks arrive at the server according to a Poisson process, with service order following the First Come First Served (FCFS) rule. The arrival rate of user tasks to the \(k\)th-tier MEC server is determined as  
\[v_{k}=\frac{\lambda_{u}p_{o,k}}{\lambda_{m,k}} \tag{2}\]  
where \(\lambda_{u}\) and \(\lambda_{m,k}\) are spatial density of users and the \(k\)th-tier MEC server, respectively. \(p_{m,k}\) kth-tier MEC server is the portion of the \(k\)th-tier MEC servers. MEC servers of different tiers have different computing capacities. Assuming that each MEC server in the \(k\)th-tier is equipped with a \(c_{k}\)-core CPU, the \(c_{k}\) CPUs in the same tier have equal computing capacity. Service time on each core in a \(k\)th-tier MEC server follows an exponential distribution with a mean value \(1/c_{k}\), where \(u_{k}\) is the service rate of a \(k\)th-tier MEC server. Since the service rate follows an exponential distribution, the probability density function (pdf) of \(T_{sv,k}\) is determined as  
\[f_{T_{sv,k}}(t)=u_{k}\exp(-u_{k}t) \tag{3}\]  
Considering multi-core servers and finite waiting queue length, the user queuing model associated with a \(k\)th-tier MEC server can be modeled as an \(\mathrm{M}/\mathrm{M}/c_{k}/c_{k}+r_{k}\) queuing model. The utilization factor of \(\rho_{k}\) is given by  
\[\rho_{k}=\frac{v_{k}}{c_{k}u_{k}} \tag{4}\]  
Figure 1: The HetMECNet model. If a task arrives to a full queue, it leaves; otherwise, it enters the queue and waits. It has been proven that when \(\rho_{k}<1\), the system can reach a stationary state, so we only consider the case of \(\rho_{k}<1\), which can be modeled as a birth-and-death process. The \(\mathrm{M/M/c_{k}/c_{k}}+r_{k}\) queuing model is established as a birth-and-death process, and its transient state flow is shown in Figure 2.  
Due to the limited length of the waiting queue, when the waiting queue is full, the arrival rate of user tasks to the \(k\)th-tier MEC server (birth rate) is 0, otherwise, it is \(v_{k}\). The service rate (death rate) of the \(k\)th-tier MEC server depends on the number of tasks in the system. If the number of tasks in the system is greater than or equal to \(c_{k}\), then all CPU cores are busy. Since the service rate of each CPU core of the \(k\)th-tier MEC server is \(u_{k}\), the total service rate of the system is \(c_{k}u_{k}\). According to Figure 2, the transition probability between system states can be obtained as follows:  
\[v_{i}=\left\{ \begin{array}{ll}v_{k},&i\leq c_{k}+r_{k}\\ 0,&i>c_{k}+r_{k}\end{array} \right. \tag{5}\] \[u_{i}=\left\{ \begin{array}{ll}iu_{k},&i\leq c_{k}\\ c_{k}u_{k},&i>c_{k}\end{array} \right.\]  
By solving the Markovian stationary equation, we can obtain Steady-state probability in Equations (6) and (7). \[\pi_{k,0}=\left(\sum_{n=0}^{c_{k}-1}\frac{\left(c_{k}\rho_{k}\right)^{n}}{n!} +\frac{\left(1-\rho_{k}^{r_{k}+1}\right)\left(c_{k}\rho_{k}\right)^{c_{k}}}{ \left(1-\rho_{k}\right)c_{k}!}\right)^{-1} \tag{6}\]  
\[\pi_{k,n}=\left\{ \begin{array}{ll}\frac{\left(c_{k}\rho_{k}\right)^{n}}{n!} \pi_{k,0},&0\leq n<c_{k}\\ \frac{\left(c_{k}\rho_{k}\right)^{n}}{\xi_{k}^{c_{k}}-c_{k}!}\pi_{k,0},&c_{k} \leq n\leq c_{k}+r_{k}\end{array} \right. \tag{7}\]  
where \(\pi_{k,n}\) is steady state probability that there n tasks in the \(k\)th-tier MEC server. \(\pi_{k,0}\) represents the probability that all edge servers are idle and there are no tasks in the \(k\)th-tier MEC server. Assuming \(q_{k,n}\) is the probability that there are n tasks when the task reaches the \(k\)th layer MEC server, it can be calculated by [PERSON] theorem in Equation (8).