Research Article

Latency-Aware Computation Offloading for 5G Networks in Edge Computing

Algorithm 3

Shortest Time-to-Completion First with multiusers under low resource p-MEFP.
Inputs: E, U, Gi = (Ti, DPi), M, ri,s, fi, Li,
Output: Optimal offloading strategy ofmin for multiusers
(1)List all optional offloading strategies OF = {of1, of2, …, ofN}
(2) for ofi in OF do
(3)  for aj in ofido
(4)   for ek in E do
(5)    Create a set Uk for each user with aj = ek
(6)    for ti in Ukdo
(7)     Update the transfer rate ri,s of each tasks
(8)     Call EFP algorithm
(9)    if Decision(i, j) ! = 0
(10)     Compute migration probability possibility(j)
(11)     random = Random(0, 1)
(12)     if random ≥ possibility(j) and < Li
(13)      Execute ti,j locally
(14)     else
(15)      Offload ti,j to edge server
(16)     end if
(17)    end if
(18)   end for
(19)  end for
(20) end for
(21)Compute the total execution delay Tifinish for computing offloading strategy ofi
(22)end for
(23)Select the offloading strategy ofmin with minimal execution delay