Cooperative Edge Computing Task Offloading Strategy for Urban Internet of Things
Algorithm 2
End-user task offloading algorithm.
Input:
Number of end-users , Resource requirements of each end-user , Each end-user pays the resource price , The size of the end-user offloading task , End-user's budget
Output:
End-user task offloading strategy
1: For ; do
2: if <= then
3: if the resources of local edge service provider meet the needs of end-user then
4: The task of end-user is offloaded to the local edge service provider for execution;
5: beak;
6: endif
7: else if the resources of local edge service provider do not meet the needs of end user then
8: Calculate the size of the remaining unfinished tasks of the end-user on the local edge service provider ;
9: Calculate the remaining budget of the end-user ;