Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to...

12
Decentralized Algorithm for Randomized Task Allocation in Fog Computing Systems Sla ¯ dana Jošilo and György Dán ACCESS Linnaeus Center, School of Electrical Engineering KTH, Royal Institute of Technology, Stockholm, Sweden E-mail: {josilo, gyuri}@kth.se Abstract—Fog computing is identified as a key enabler for using various emerging applications by battery powered and computationally constrained devices. In this paper, we consider devices that aim at improving their performance by choosing to offload their computational tasks to nearby devices or to a cloud server. We develop a game theoretical model of the problem, and we use variational inequality theory to compute an equilibrium task allocation in static mixed strategies. Based on the computed equilibrium strat- egy, we develop a decentralized algorithm for allocating the computational tasks among nearby devices and the cloud server. We use extensive simulations to provide insight into the performance of the proposed algorithm, and we compare its performance with the performance of a myopic best response algorithm that requires global knowledge of the system state. Despite the fact that the proposed algorithm relies on average system parameters only, our results show that it provides good system performance close to that of the myopic best response algorithm. I. I NTRODUCTION Fog computing is widely recognized as a key component of 5G networks and an enabler of the Internet of Things (IoT) [1], [2]. The concept of fog computing extends the traditional centralized cloud computing architecture by allowing devices not only to use cloud computational and storage resources, but also to use the resources of each other in a collaborative way [3]. Traditional centralized cloud computing allows devices to offload the computation to a cloud infrastructure with significant computational power [4], [5], [6]. Cloud of- floading may indeed accelerate the execution of applica- tions, but it may suffer from high communication delays, on the one hand due to the contention of devices for radio spectrum, on the other hand due to the remoteness of the cloud infrastructure. Thus, traditional centralized cloud computing may not be able to meet the delay requirements of emerging IoT applications [7], [8], [9], [10]. Fog computing addresses this problem by allowing col- laborative computation offloading among nearby devices and distributed cloud resources close to the network edge. The benefits of collaborative computation offloading are twofold. First, collaboration among devices can make use of device-to-device (D2D) communication, and thereby it can improve spectral efficiency and free up radio resources for other purposes [11], [12], [13]. Second, the proximity of devices to each other can enable low communica- tion delays. Thus, fog computing allows to explore the tradeoff between traditional centralized cloud offloading, which ensures low computing time, but may suffer from high communication delay, and collaborative computation offloading, which ensures low communication delay, but may involve higher computing times. One of the main challenges facing the design of fog computing systems is how to manage fog resources ef- ficiently. Compared to traditional centralized cloud com- puting, where a device only needs to decide whether to offload the computation of a task, in the case of fog computing the number of offloading choices increases with the number of devices. Furthermore, today’s devices are heterogeneous in terms of computational capabilities, in terms of what tasks they have to execute and how often. At the same time, some devices may be autonomous, and hence they would be interested in minimizing their own perceived completion times. Therefore, developing low complexity algorithms for efficient task allocation among nearby devices is an inherently challenging problem. In this paper we address this problem by considering a fog computing system, where devices can choose either to perform their computation locally, to offload the com- putation to a nearby device, or to offload the computation to a cloud. We provide a game theoretical model of the completion time minimization problem. We show that an equilibrium task allocation in static mixed strategies always exists, i.e., if devices can choose at random whether to offload, and where to offload. Based on the game theoretical model we propose a decentralized algorithm that relies on average system parameters, and allocates the tasks according to a Nash equilibrium in static mixed strategies. We use the algorithm to address the important question whether efficient task allocation is feasible using an algorithm that requires low signaling overhead, and we compare the performance achieved by the proposed algorithm with the performance of a myopic best response algorithm that requires global knowledge of the system state. Our results show that the proposed decentralized algorithm, despite significantly lower signaling overhead, provides good system performance close to that of the myopic best response algorithm. The rest of the paper is organized as follows. We present the system model in Section II. We present two algorithms in Sections III and IV. In Section V we present numerical results and in Section VI we review related work. Section VII concludes the paper. II. SYSTEM MODEL AND PROBLEM FORMULATION We consider a fog computing system that consists of a set N = {1, 2, ..., N } of devices, and a cloud server. Device i ∈N generates a sequence (t i,1 ,t i,2 ,...) of computational tasks. We consider that the size D i,k (e.g., in bytes) of task t i,k of device i can be modeled by a random variable D i , and the number of CPU cycles L i,k required to perform the task by a random variable L i . 1

Transcript of Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to...

Page 1: Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to offload the computation to a cloud infrastructure with significant computational

Decentralized Algorithm for Randomized TaskAllocation in Fog Computing Systems

Slad̄ana Jošilo and György DánACCESS Linnaeus Center, School of Electrical Engineering

KTH, Royal Institute of Technology, Stockholm, Sweden E-mail: {josilo, gyuri}@kth.se

Abstract—Fog computing is identified as a key enablerfor using various emerging applications by battery poweredand computationally constrained devices. In this paper, weconsider devices that aim at improving their performanceby choosing to offload their computational tasks to nearbydevices or to a cloud server. We develop a game theoreticalmodel of the problem, and we use variational inequalitytheory to compute an equilibrium task allocation in staticmixed strategies. Based on the computed equilibrium strat-egy, we develop a decentralized algorithm for allocating thecomputational tasks among nearby devices and the cloudserver. We use extensive simulations to provide insight intothe performance of the proposed algorithm, and we compareits performance with the performance of a myopic bestresponse algorithm that requires global knowledge of thesystem state. Despite the fact that the proposed algorithmrelies on average system parameters only, our results showthat it provides good system performance close to that of themyopic best response algorithm.

I. INTRODUCTION

Fog computing is widely recognized as a key componentof 5G networks and an enabler of the Internet of Things(IoT) [1], [2]. The concept of fog computing extendsthe traditional centralized cloud computing architecture byallowing devices not only to use cloud computational andstorage resources, but also to use the resources of eachother in a collaborative way [3].

Traditional centralized cloud computing allows devicesto offload the computation to a cloud infrastructure withsignificant computational power [4], [5], [6]. Cloud of-floading may indeed accelerate the execution of applica-tions, but it may suffer from high communication delays,on the one hand due to the contention of devices for radiospectrum, on the other hand due to the remoteness ofthe cloud infrastructure. Thus, traditional centralized cloudcomputing may not be able to meet the delay requirementsof emerging IoT applications [7], [8], [9], [10].

Fog computing addresses this problem by allowing col-laborative computation offloading among nearby devicesand distributed cloud resources close to the network edge.The benefits of collaborative computation offloading aretwofold. First, collaboration among devices can make useof device-to-device (D2D) communication, and thereby itcan improve spectral efficiency and free up radio resourcesfor other purposes [11], [12], [13]. Second, the proximityof devices to each other can enable low communica-tion delays. Thus, fog computing allows to explore thetradeoff between traditional centralized cloud offloading,which ensures low computing time, but may suffer fromhigh communication delay, and collaborative computationoffloading, which ensures low communication delay, butmay involve higher computing times.

One of the main challenges facing the design of fogcomputing systems is how to manage fog resources ef-ficiently. Compared to traditional centralized cloud com-puting, where a device only needs to decide whether tooffload the computation of a task, in the case of fogcomputing the number of offloading choices increases withthe number of devices. Furthermore, today’s devices areheterogeneous in terms of computational capabilities, interms of what tasks they have to execute and how often.At the same time, some devices may be autonomous, andhence they would be interested in minimizing their ownperceived completion times. Therefore, developing lowcomplexity algorithms for efficient task allocation amongnearby devices is an inherently challenging problem.

In this paper we address this problem by consideringa fog computing system, where devices can choose eitherto perform their computation locally, to offload the com-putation to a nearby device, or to offload the computationto a cloud. We provide a game theoretical model of thecompletion time minimization problem. We show thatan equilibrium task allocation in static mixed strategiesalways exists, i.e., if devices can choose at random whetherto offload, and where to offload. Based on the gametheoretical model we propose a decentralized algorithmthat relies on average system parameters, and allocatesthe tasks according to a Nash equilibrium in static mixedstrategies. We use the algorithm to address the importantquestion whether efficient task allocation is feasible usingan algorithm that requires low signaling overhead, andwe compare the performance achieved by the proposedalgorithm with the performance of a myopic best responsealgorithm that requires global knowledge of the systemstate. Our results show that the proposed decentralizedalgorithm, despite significantly lower signaling overhead,provides good system performance close to that of themyopic best response algorithm.

The rest of the paper is organized as follows. Wepresent the system model in Section II. We present twoalgorithms in Sections III and IV. In Section V we presentnumerical results and in Section VI we review relatedwork. Section VII concludes the paper.

II. SYSTEM MODEL AND PROBLEM FORMULATION

We consider a fog computing system that consists ofa set N = {1, 2, ..., N} of devices, and a cloud server.Device i ∈ N generates a sequence (ti,1, ti,2, . . .) ofcomputational tasks. We consider that the size Di,k (e.g.,in bytes) of task ti,k of device i can be modeled by arandom variable Di, and the number of CPU cycles Li,krequired to perform the task by a random variable Li.

1

Page 2: Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to offload the computation to a cloud infrastructure with significant computational

D4

D5

D1

D2D3

D6

Fig. 1. Fog computing system that consists of 6 devices and one cloud.

According to results reported in [14], [15], [16] the numberXi of CPU cycles per data bit can be approximated by aGamma distribution, and thus we can model the relationbetween Li and Di as Li = DiXi. Furthermore, assumingthat the first moment Xi and the second moment 2Xi

of Xi can be estimated based on the past, the statisticsof the number of CPU cycles required to perform thetask of device i can be easily obtained. Similar to otherworks [17], [18], [19], we assume that the task arrivalprocess of device i can be modeled by a Poisson processwith arrival intensity λi.

For each task ti,k device i can decide whether toperform the task locally, to offload it to a device j ∈N \ {i} or to a cloud server. Thus, device i choosesa member of the set N ∪ {0}, where 0 corresponds tothe cloud. We allow for randomized policies, and wedenote by pi,j(k) the probability that device i assigns itstask ti,k to j ∈ N ∪ {0}, and we define the probabil-ity vector pi(k) = {pi,0(k), pi,1(k), ..., pi,N (k)}, where∑j∈N∪{0} pi,j(k) = 1. Finally, we denote by P the set

of probability distributions over N ∪ {0}, i.e., pi(k) ∈ P .The above fog computing system relies on the assump-

tion that all devices faithfully execute the tasks offloadedto them. To ensure this, the devices need to be incentivizedto collaborate in executing each others’ computationaltasks, as discussed in [20]. The collaboration amongdevices in fog computing systems can be ensured with anadequate incentive scheme similar to those used in peer-to-peer systems [21], [22], [23]. These schemes ensurethe collaboration among the peers through the reputation-based trust supporting mechanism. In the context of fogcomputing systems, the mechanism would result in anincentive scheme in which only devices that processoffloaded tasks themselves are entitled to offload the tasks.

A. Communication model

We consider that the devices communicate using anorthogonal frequency division multiple access (OFDMA)framework in which there is an assignment of subcarriersto pairs of communicating nodes [24], [25]. Furthermore,we consider that devices use dedicated bandwidth re-sources, i.e. node-to-node pairs do not share the bandwidthwith each other and with the other cellular users [24].We denote the transmission rate from device i to devicej by Ri,j , and the transmission rate from device i tothe cloud server through a base station by Ri,0. Eachdevice maintains N transmission queues, i.e., N−1 queuesfor transmitting to devices j ∈ N \ {i} and one fortransmitting to the cloud server. We assume that the queues

are large enough to be considered infinite, and the tasksare transmitted in FIFO order.

We consider that the time T ti,j(k) needed to transmit atask ti,k from device i to j ∈ N ∪ {0} is proportional toits size Di,k, and is given by

T ti,j(k) = Di,k/Ri,j .

Furthermore, the time T di,j(k) needed to deliver the inputdata Di,k from device i to j ∈ N ∪ {0} is the sum of thetransmission time T ti,j(k) and of the waiting time (if any).

Similar to other works [26], [27], [28], we consider thatthe time needed to transmit the results of the computa-tion back to the device is negligible. This assumption isjustified for many applications including face and objectrecognition, and anomaly detection, where the size of theresult of the computation is much smaller than the size ofthe input data.

Observe that our system model can accommodate sys-tems in which certain devices i ∈ N only serve forperforming the computational tasks of others, by settingthe arrival intensity λi = 0. These devices can be con-sidered as micro-data centers located at the network edge,whose function in fog computing systems is to performthe computational tasks of the other devices [29], [30].Furthermore, our system model can accommodate systemsin which certain devices j ∈ N are not supposed toperform the computational tasks of others, by setting thetransmission rates Ri,j from the other devices i ∈ N \{j}to device j to low enough values.

Figure 1 illustrates a fog computing system that consistsof six devices and one cloud server; device 1 and device2 offload their tasks through a base station to the cloud,device 4 offloads its tasks to device 2, device 5 offloadsits task to device 3 that serves as a micro-data center, anddevice 6 performs computation locally.

B. Computation model

To model the time that is needed to compute a taskin a device i, we consider that each device i maintainsone execution queue with tasks served in FIFO order. Wedenote by Fi the computational capability of device i andwe assume that the execution queues are large enough tobe considered infinite. Unlike devices, the cloud has a largenumber of processors with computational capability F0

each, and we assume that computing in the cloud beginsimmediately upon arrival of a task.

Similar to common practice we consider that the timeT ci,j(k) needed to compute a task ti,k, on j ∈ N ∪ {0} isproportional to its complexity Li,k, and is given by

T ci,j(k) = Li,k/Fj .

Furthermore, the execution time T ei,j(k) of a task ti,k ondevice j is the sum of the computation time T ci,j(k) and ofthe waiting time (if any). Figure 2 illustrates the queuingmodel of a computation offloading system.

C. Problem formulation

We define the cost Ci of device i as the mean comple-tion time of its tasks. Given a sequence (ti,1, ti,2, . . .) of

2

Page 3: Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to offload the computation to a cloud infrastructure with significant computational

Fig. 2. Fog computing system modeled as a queuing network.

computational tasks, we can thus express the cost Ci as

Ci = limK→∞

1

K

[ K∑k=1

(pi,i(k)T ei,i(k) (1)

+∑

j∈N\{i}∪{0}pi,j(k)

(T di,j(k) + T ei,j(k)

))].

Since the devices are autonomous, we consider that eachdevice aims at minimizing its cost by solving

minCi s.t. (2)pi(k) ∈ P. (3)

Since devices’ decisions affect each other, the devices playa dynamic non-cooperative game, and we refer to the gameas the multi user computation offloading game (MCOG).The game is closest to an undiscounted stochastic gamewith countably infinite state space, but the system stateevolves according to a semi-Markov chain (instead of aMarkov chain, depending on the distribution of Di andLi) and payoffs (the completion times) are unbounded. Weare not aware of existence results for Markov equilibria forthis class of problem, and even for the case when the stateevolves according to a Markov chain with countable statespace and unbounded payoffs, there are only a few resultson the existence of equilibria in Markov strategies [31],[32], [33].

D. Decentralized solution supported by a centralized entity

Since fog computing architecture is decentralized in na-ture, and devices in fog computing systems are expected tobe autonomous [34], [35] we are interested in developingdecentralized algorithms that will allow devices to maketheir offloading decisions locally. Motivated by widelyconsidered hierarchical fog computing architectures [36],[37], we consider that there is a central entity with a highlevel of hierarchy that collects and stores the informationabout the fog computing system. Furthermore, we considerthat the central entity periodically sends the needed infor-mation to the devices and thus supports them in makingtheir offloading decisions.

Intuitively, more information about the system state willallow devices to make better offloading decisions, but atthe cost of increased signaling overhead. Therefore, one

pi(k) = MyopicBestResponse(ti,k)

1: pi,j(k) = 0, ∀j ∈ N ∪ {0}2: /* Estimate completion time of ti,k in ∀j∈N∪{0} */3: for j = 0, . . . , N do4: if j = i then5: ECompleteT (j) = T ei,j(k)6: else7: ECompleteT (j) = T di,j(k) + T ei,j(k)8: end if9: end for

10: /* Make a greedy decision */11: i′ ← arg min

j∈N∪{0}ECompleteT (j)

12: pi,i′(k) = 113: return pi(k)

Fig. 3. Pseudo code of myopic best response.

important objective when developing decentralized algo-rithms for allocating the computational tasks is to achievegood system performance at the cost of an acceptablesignaling overhead. With this in mind, in what followswe propose and discuss two decentralized solutions forthe MCOG problem in the form of a Markov strategy andin static mixed strategies, respectively.

III. MYOPIC BEST RESPONSE

The first algorithm we consider, called Myopic BestResponse (MBR), requires global knowledge of the systemstate, but decisions are made locally at the devices. In theMBR algorithm, every device i makes a decision basedon a myopic best response strategy, i.e., every device ichooses a node j ∈ N∪{0} that minimizes the completiontime of its task ti,k, given the instantaneous states of thequeuing network. Tasks decided to be executed at devicej ∈ N are queued in an infinite buffer before the executionand processing of the tasks offloaded to the cloud startsimmediately upon arrival. All tasks are executed in FIFOorder. Observe that since the devices make their decisionsbased on the instantaneous states of the queues, they donot take into account the tasks that may arrive to theother devices’ execution queues while transmitting a task.The pseudo-code for computing the myopic best responsestrategy is shown in Figure 3.

Note that if we define the system state upon the arrivalof task ti,k as the number of jobs in the transmission andexecution queues and the size and complexity of the taskto be offloaded, then the devices’ decisions depend on theinstantaneous system state only, and hence the myopic bestresponse is a Markov strategy for the MCOG. Nonetheless,it is not necessarily a Markov perfect equilibrium.

A significant detriment of the MBR algorithm is itssignaling overhead, as it requires global information aboutthe system state upon the arrival of each task. To reducethe signaling requirements, in what follows we propose analgorithm that is based on a strategy that relies on averagesystem parameters only.

IV. EQUILIBRIUM IN STATIC MIXED STRATEGIES

As a practical alternative to the MBR algorithm, in thissection we propose a decentralized algorithm, which werefer to as the Static Mixed Nash Equilibrium (SM-NE) al-gorithm. The algorithm is based on an equilibrium (pi)i∈N

3

Page 4: Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to offload the computation to a cloud infrastructure with significant computational

in static mixed strategies, that is, device i chooses the nodewhere to execute an arriving task at random accordingto the probability vector pi, which is the same for alltasks. For computing a static mixed strategy, it is enoughfor a device to know the average task arrival intensities,transmission rates, and the first and second moments of thetask size and the task complexity distribution. Therefore,the SM-NE algorithm requires significantly less signalingthan the MBR algorithm.

In order to compute an equilibrium strategy, we startwith expressing the (approximate) equilibrium cost ofdevice i as a function of strategy profile (pi)i∈N , i.e.,the mean completion time of its tasks in steady state.Throughout the section we denote by Di and 2Di the firstand the second moment of Di, respectively, and by Li and2Li the first and the second moment of Li, respectively.

A. Transmission time in steady state

Since tasks arrive to each device as a Poisson processand we aim for a constant probability vector pi as asolution, we can model each transmission queue withan M/G/1 system. Let us denote by T ti,j and 2T ti,jthe mean and the second moment of the time neededto transmit a task from device i to j ∈ N \{i}∪ {0},respectively. Then the mean time T di,j needed to deliverthe input data from device i to j∈N\{i}∪{0} is the sumof the mean waiting time in the transmission queue andthe mean transmission time T ti,j , and can be expressedas

T di,j =pi,jλ

2iT

ti,j

2(1− pi,jλiT ti,j)+ T ti,j , (4)

and the queue is stable as long as the offered load ρti,j =

pi,jλiT ti,j < 1.

B. Computation time in steady state

Observe that if the input data size Di follows an expo-nential distribution, then departures from the transmissionqueues can be modeled by a Poisson process, and thustasks arrive to the devices’ execution queues according to aPoisson process. In what follows we use the approximationthat the tasks arrive according to a Poisson process evenif Di is not exponentially distributed. This approximationallows us to model the execution queue of each device asan M/G/1 system, and the cloud as an M/G/∞ system.

Let us denote by T ci,j and 2T ci,j the mean and thesecond moment of the time needed to compute device i’stask on j ∈ N ∪ {0}, respectively. Then the mean timeT ei,j that device j ∈ N needs to complete the executionof device i’s task is the sum of the mean waiting time inthe execution queue and the mean computation time T ci,j ,and can be expressed as

T ei,j =

∑i′∈N pi′,jλ

2i′T

ci′,j

2(1−∑i′∈N pi′,jλi′T

ci′,j)

+ T ci,j , (5)

and the queue is stable as long the offered load ρej =∑i′∈N pi′,jλi′T

ci′,j < 1.

Since computing in the cloud begins immediately uponarrival of a task, the mean time T ei,0 that the cloud needs

to complete the execution of device i’s task is equal to themean computation time T ci,0, i.e.,

T ei,0 = Li/F0. (6)

C. Existence of Static Mixed Strategy Equilibrium

We can rewrite (1) to express the cost Ci of device i insteady state as a function of (pi)i∈N ,

Ci(pi, p−i) = pi,iT ei,i+∑

j∈N\{i}∪{0}pi,j(T di,j+T ei,j

),

where we use p−i to denote the strategies of all devicesexcept device i.

Observe that static mixed strategy profile (pi)i∈N ofthe devices has to ensure that the entire system is stable insteady state, and we assume that the load is such that thereis at least one strategy profile that satisfies the stabilitycondition of the entire system. Now, we can define the setof feasible strategies of device i as the set of probabilityvectors that ensure stability of the transmission and theexecution queues

Ki(p−i)={pi∈P|ρti,j≤St, ρei′≤St,∀j∈N \{i}∪{0},∀i′},

where 0 < St < 1 is the stability threshold associatedwith the transmission and the execution queues.

Note that due to the stability constraints the set offeasible strategies Ki(p−i) of device i depends on theother devices’ strategies, and we are interested in whetherthere is a strategy profile (p∗i )i∈N , such that

Ci(p∗i , p∗−i) ≤ Ci(pi, p∗−i), ∀pi ∈ Ki(p∗−i).

We are now ready to formulate the first main result ofthe section.

Theorem 1. The MCOG has at least one equilibrium instatic mixed strategies.

In the rest of this subsection we use variational inequal-ity (VI) theory to prove the theorem and for computingan equilibrium. For a given set K ⊆ Rn and a functionF : K → Rn, the V I(K, F ) problem is the problem offinding a point x∗ ∈ K such that F (x∗)T (x − x∗) ≥ 0,for ∀x ∈ K. We define the set K as

K={(pi)i∈N|pi∈P, ρti,j≤St, ρei ≤St, j∈N \{i}∪{0},∀i}.

Before we prove the theorem, in the following weformulate an important result concerning the cost functionCi(pi, p−i).

Lemma 1. Ci(pi, p−i) is a convex function of pi for anyfixed p−i and (pi, p−i) ∈ K.

Proof. For notational convenience let us start the proofwith introducing a few shorthand notations,

γi,j = pi,jλ2iT

ti,j , δi =

∑j∈N

pj,iλ2jT

cj,i,

εi,j = 1− ρti,j , ζi = 1− ρei .

Using this notation we expand the cost Ci(pi, p−i) as

Ci(pi, p−i) =pi,i( δi

2ζi+T ci,i

)+pi,0

( γi,02εi,0

+T ti,0 + T ci,0)

+∑

j∈N\{i}

pi,j( γi,j

2εi,j+T ti,j +

δj2ζj

+ T ci,j).

4

Page 5: Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to offload the computation to a cloud infrastructure with significant computational

To prove convexity we proceed with expressing the firstorder derivatives hi,j = ∂Ci(pi,p−i)

∂pi,j,

hi,0 = T ti,0+T ci,0+γi,02εi,0

+ pi,0λi( 2T ti,0

2εi,0+T ti,0γi,0

2ε2i,0

),

hi,i = T ci,i +δi2ζi

+ pi,iλi( 2T ci,i

2ζi+T ci,iδi

2ζ2i

),

hi,j |j 6=i = T ti,j + T ci,j +γi,j2εi,j

+δj2ζj

+ pi,jλi( 2T ti,j

2εi,j+

2T ci,j2ζj

+T ti,jγi,j

2ε2i,j+T ci,jδj

2ζ2j

).

We can now express the Hessian matrix

Hi(pi, p−i)=

hii,0 0 . . . 00 hii,1 . . . 0...

.... . .

...0 0 . . . hii,N

,

where hii,j = ∂2Ci(pi,p−i)∂p2i,j

, and

hii,0 =λiεi,0

(2T ti,0 +

γi,0Tti,0

εi,0

)(1 + pi,0

λiTti,0

εi,0

),

hii,i =λiζi

(2T ci,i +

δiTci,i

ζi

)(1 + pi,i

λiTci,i

ζi

),

hii,j∣∣j 6=i =

λiεi,j

(2T ti,j +

γi,jTti,j

εi,j

)(1 + pi,j

λiTti,j

εi,j

)+

λiζj

(2T ci,j +

δjTci,j

ζj

)(1 + pi,j

λiTci,j

ζj

).

Observe that all diagonal elements of Hi(pi, p−i) arenonnegative, and thus the Hessian matrix Hi(pi, p−i) ispositive semidefinite on K, which implies convexity.

We are now ready to prove Theorem 1.

Proof of Theorem 1. Let us define the generalized Nashequilibrium problem Γs =< N , (P)i∈N , (Ci)i∈N >,subject to (pi)i∈N ∈ K. Γs is a strategic game, in whicheach device i ∈ N plays a mixed strategy pi ∈ Ki(p−i),and aims at minimizing its cost Ci by solving

minpi

Ci(pi, p−i) s.t. (7)

pi ∈ Ki(p−i). (8)

Clearly, a pure strategy Nash equilibrium (p∗i )i∈N of Γs

is an equilibrium of the MCOG in static mixed strategies,as

Ci(p∗i , p∗−i) ≤ Ci(pi, p∗−i), ∀pi ∈ Ki(p∗−i).

We thus have to prove that Γs has a pure strategy Nashequilibrium.

To do so, let us first define the function

F =

∇p1C1(p1, p−1)...

∇pNCN (pN , p−N )

,

where ∇piCi(pi, p−i) is the gradient vector given by

∇piCi(pi, p−i) =

hi,0hi,1

...hi,N

.

We prove the theorem in two steps based on the VI(K, F )problem, which corresponds to Γs.

First, we prove that the solution set of the VI(K, F )problem is nonempty and compact. Since the first orderderivatives hi,j are rational functions, the function F isinfinitely differentiable at every point in K, and hence itis continuous on K. Furthermore, the set K is compact andconvex. Hence, the solution set of the VI(K, F ) problemis nonempty and compact (Corollary 2.2.5 in [38]).

Second, we prove that any solution of the VI(K, F )problem is an equilibrium of the MCOG. Since the func-tion F is continuous on K, it follows that Ci(pi, p−i)is continuously differentiable on K. Furthermore, byLemma 1 we know that Ci(pi, p−i) is a convex function.Therefore, any solution of the VI(K, F ) problem is apure strategy Nash equilibrium of Γs [39], and is thusan equilibrium in static mixed strategies of MCOG. Thisproves the theorem.

Theorem 1 guarantees that the MCOG possesses at leastone equilibrium in static mixed strategies, according towhich the SM-NE algorithm allocates the tasks amongthe devices and the cloud. The next important question iswhether there is an efficient algorithm for solving the VIproblem, and hence for computing an equilibrium (p∗i )i∈Nof the MCOG in static mixed strategies.

In what follows we show that an equilibrium canbe computed efficiently under certain conditions. To doso, we show that the function F is monotone if theexecution queue of each device can be modeled by anM/M/1 system and all task arrival intensities are equal.Monotonicity of F is a sufficient condition for variousalgorithms proposed for solving VIs [40], e.g., for theSolodov-Tseng Projection-Contraction (ST-PC) method.

Theorem 2. If the task sizes and complexities are expo-nentially distributed, arrival intensities λi = λ and

λmaxj∈N

T cj,i ≤1− StN

, ∀i ∈ N ,

then the function F is monotone.

The proof is given in Appendix A.Note that the sufficient condition provided by Theo-

rem 2 ensures stability of all execution queues in theworst case scenario, i.e., when T cj,i = maxj∈N T cj,i forall devices. This condition is, however, not necessary forfunction F to be monotone in realistic scenarios. In fact,our simulations showed that the ST-PC method convergesto an equilibrium for various considered scenarios.

V. NUMERICAL RESULTS

In what follows we show simulation results obtainedusing an event driven simulator, in which we implementedthe MBR and the SM-NE algorithms. For the ST-PCmethod we set pi,i = 1, ∀i ∈ N as starting point, whichcorresponds to the strategy profile in which each device

5

Page 6: Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to offload the computation to a cloud infrastructure with significant computational

0 10 20 30 40 50 60 70

Number of devices (N)

1

1.5

2

2.5

3Perform

ance

gain

MBRSM-NESM-OPTSMC-NE

Bi,0

=1.25[MHz]B

i,0=1/N*12.5[MHz]

Bi,0

=0.2[MHz]

Fig. 4. Performance gain vs. number of devices for Bi,0 = 0.2 MHz,Bi,0 = 1.25 MHz and Bi,0 = 1

N12.5 MHz.

0 1 2 3 4 5 6

Device to cloud bandwith (Bi,0)[MHz]

2

4

6

8

10

12

Perform

ance

gain

MBRSM-NESM-OPTSMC-NE0.5km× 0.5km1km× 1km1.41km× 1.41km

Fig. 5. Performance gain vs. device to cloud bandwidth Bi,0 for N = 8devices placed over 0.5km× 0.5km square area, for N = 30 devicesplaced over 1km × 1km square area, and for N = 60 devices placedover 1.41km× 1.41km square area.

performs all tasks locally. The ST-PC method stops whenthe norm of the difference of two successive iterations isless than 10−4.

Unless otherwise noted, we followed common practiceand placed the devices at random on a regular grid with104 points defined over a square area of 1km× 1km, andthe cloud is located at the center of the grid [41], [42]. Forsimplicity, we consider a static bandwidth assignment forthe simulations; we assign a bandwidth of Bi,j = 5 MHzfor communication between device i and device j [43],[44], and for the device to cloud bandwidth assignment weconsider two scenarios. In the elastic scenario the band-width Bi,0 assigned for communication between device iand the cloud is independent of the number of devices.In the fixed scenario the devices share a fixed amount ofbandwidth B0 when they want to offload a task to thecloud, and the bandwidth Bi,0 scales directly proportionalwith the number of devices, i.e., Bi,0 = 1

NB0. Weconsider that the channel gain of device i to a nodej ∈ N \ {i} ∪ {0} is proportional to d−αi,j , where di,jis the distance between device i and node j, and α isthe path loss exponent, which we set to 4 according tothe path loss model in urban and suburban areas [45].We set the data transmit power P ti of every device i to0.4 W according to [46] and given the noise power Pn wecalculate the transmission rate Ri,j from device i to nodej ∈ N \ {i} ∪ {0} as Ri,j = Bi,j log(1 + P ti d

αi,j/Pn).

The input data size Di follows a uniform distributionon [adi , b

di ], where adi and bdi are uniformly distributed on

[0.1, 1.4] Mb and on [2.2, 3.4] Mb, respectively. The arrivalintensity λi of the tasks of device i is uniformly dis-tributed on [0.01, 0.03] tasks/s, and the stability thresholdis St = 0.6. Note that for the above set of parameters themaximum arrival intensity does not satisfy the sufficientcondition of Theorem 2 already for N = 20 devices. Yet,our evaluation shows that the ST-PC method convergeseven for larger instances of the problem.

The computational capability Fi of device i is drawnfrom a continuous uniform distribution on [1, 4] GHz,while the computation capability of the cloud is F0 =64 GHz [47]. The task complexity Li follows a uniformdistribution on [ali, b

li], where ali and bli are uniformly

distributed on [0.2, 0.5] Gcycles and on [0.7, 1] Gcycles,respectively.

We use three algorithms as a basis for comparison.

The first algorithm computes the socially optimal staticmixed strategy profile (p̄i)i∈N that minimizes the systemcost C = 1

N

∑i∈N Ci, i.e., (p̄i)i∈N = arg min(pi)i∈N C.

We refer to this algorithm as the Static Mixed Optimal(SM-OPT) algorithm. The second algorithm considers thatthe devices are allowed to offload the tasks to the cloudonly (i.e., pi,i + pi,0 = 1), and we refer to this algorithmas the Static Mixed Cloud Nash Equilibrium (SMC-NE)algorithm. The third algorithm considers that all devicesperform local execution (i.e., pi,i = 1). Furthermore,we define the performance gain of an algorithm as theratio between the system cost reached when all devicesperform local execution and the system cost reached bythe algorithm. For the SM-OPT algorithm the resultsare shown only up to 30 or 35 devices, because thecomputation of the socially optimal strategy profile wascomputationally infeasible for larger problem instances.The results shown in all figures are the averages of 50simulations, together with 95% confidence intervals.

A. Performance gain

We start with evaluating the performance gain as afunction of the number of devices. Figure 4 shows theperformance gain for the MBR, SM-NE, SM-OPT and forthe SMC-NE algorithms as a function of the number ofdevices for the two device to cloud bandwidth assignmentscenarios. For the elastic scenario Bi,0 = 0.2 MHz andBi,0 = 1.25 MHz, and for the fixed scenario B0 =12.5 MHz.

Figure 4 shows the performance gain for the MBR,SM-NE, SM-OPT and for the SMC-NE algorithms asa function of the number of devices. The results showthat the SM-NE and the SM-OPT algorithms performclose to the MBR algorithm, despite the fact that they arebased on average system parameters only. We can alsoobserve that when the device to cloud bandwidth is low(about 0.2 MHz), SMC-NE does not provide significantgain compared to local execution (the performance gainis close to one for all values of N ). On the contrary,the MBR, SM-NE and SM-OPT algorithms, which allowcollaborative offloading, provide a performance gain ofabout 50%, and the gain slightly increases with the numberof devices. The reason for the slight increase of the gainis that when there are more devices, devices are closer to

6

Page 7: Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to offload the computation to a cloud infrastructure with significant computational

0 1 2 3 4 5 6 7 8 9 10

Performance gain

0

0.2

0.4

0.6

0.8

1CDF

MBRSM-NESM-OPTSMC-NEBi,0 = 0.2[MHz]Bi,0 = 0.8[MHz]Bi,0 = 1.25[MHz]

Fig. 6. Distribution of the performance gain for N = 30 devices,Bi,0 = 0.2 MHz, Bi,0 = 0.8 MHz and Bi,0 = 1.25 MHz.

0 10 20 30 40 50 60 70

Number of devices (N)

0.1

0.4

0.7

1

Ratio

ofexecutedtasks MBR

SM-NE

SM-OPT

Local execution

Local or D2D offloading

Fig. 7. Ratio of the tasks executed locally and the tasks executed at anyof the devices for Bi,0 = 1

N12.5 MHz.

each other on average, which allows higher transmissionrates between devices.

Compared to the case when Bi,0 = 0.2 MHz, the resultsfor Bi,0 = 1.25 MHz show that all algorithms achievevery high performance gains (up to 300%). Furthermore,the performance gain of the SMC-NE algorithm is similarto that of the SM-NE and the SM-OPT algorithms, whilethe MBR algorithm performs slightly better. The reasonis that for high device to cloud bandwidth in the staticmixed equilibrium most devices offload to the cloud, as onaverage it is best to do so, even if given the instantaneoussystem state it may be better to offload to a device,as done by the MBR algorithm. Furthermore, unlike forBi,0 = 0.2 MHz, for Bi,0 = 1.25 MHz the performancegain becomes fairly insensitive to the number of devices,which is again due to the increased reliance on the cloudfor computation offloading.

The results are fairly different for the fixed device tocloud bandwidth assignment scenario, as in this scenariothe number of devices affects the device to cloud band-width. In this scenario collaboration among the devicesimproves the system performance (SMC-NE vs. SM-NEalgorithms). We can also observe that as N increases, thecurves for fixed scenario approach the curves for the elasticscenario for Bi,0 = 0.2 MHz. This is due to that for largevalues of N the device to cloud bandwidth Bi,0 becomeslow and the devices offload more to each other than to thecloud.

Finally, the results show that the gap between the SM-NE and the SM-OPT algorithms is almost negligible forall scenarios, and hence we can conclude that the price ofstability of the MCOG game in static mixed strategies isclose to one.

B. Impact of cloud availability

In order to analyse the impact of the possibility to of-fload to the cloud, in the following we vary the bandwidthBi,0 between 0.2 MHz and 5.2 MHz.

Figure 5 shows the average and the median perfor-mance gain for the MBR, SM-NE, SM-OPT and for theSMC-NE algorithms as a function of the device to cloudbandwidth for 8 devices placed over a square area of0.5km× 0.5km, for 30 devices placed over a square areaof 1km × 1km, and for 60 devices placed over a squarearea of 1.41km × 1.41km. Note that the three scenarioshave approximately the same density of devices. We first

observe that the median performance gain is almost equalto the average performance gain for all algorithms and forall considered scenarios, which suggests that distributionof the completion times of the tasks is approximatelysymmetrical. The figure shows that the performance gainachieved by the algorithms increases with the bandwidthBi,0. Furthermore, we observe that the gap between thealgorithms decreases as the device to cloud bandwidthincreases, and for reasonably high bandwidths the SM-NEalgorithm performs almost equally well as the MBRalgorithm. The results also show that collaboration amongthe devices has highest impact on the system performancewhen the bandwidth Bi,0 is low, and for Bi,0 = 1.2 MHzoffloading to the cloud only (SMC-NE) is as good as theSM-NE and SM-OPT algorithms.

Comparing the performance for different sized areas weobserve that the performance gain decreases as the size ofthe area increases, which is due to that the devices arecloser to the cloud on average in a smaller area.

C. Performance gain perceived per device

In order to evaluate the performance gain perceived perdevice, we use the notion of ex-ante and ex-post individualrationality. These are important in situations when thedevices are allowed to decide whether or not to partic-ipate in the collaboration before and after learning theirtypes (i.e., the exact size and complexity of their tasks),respectively. The results in Figure 4 show that on averagethe devices benefit from collaboration, as the performancegain is greater than one, and hence collaboration amongthe devices is ex-ante individually rational. In order toinvestigate whether collaboration among the devices is ex-post individually rational, in Figure 6 we plot the CDFof the performance gain for the elastic device to cloudbandwidth assignment scenario with 30 devices and forBi,0 = 0.2 MHz, Bi,0 = 0.8 MHz, and Bi,0 = 1.25 MHz.

The results for Bi,0 = 0.2 MHz show that the SMC-NEalgorithm is ex-post individually rational, as devices al-ways gain compared to local computation. At the sametime, the SM-NE and the MBR algorithms achieve aperformance gain below one for a small fraction of thedevices, and hence collaboration among devices is not ex-post individually rational. On the contrary, the results forBi,0 = 0.8 MHz show that the MBR algorithm is ex-post individually rational, since the performance gain ofevery device is larger than one, but SM-NE is not. Finally,

7

Page 8: Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to offload the computation to a cloud infrastructure with significant computational

the results for Bi,0 = 1.25 MHz show that all algorithmsensure that every device achieves a performance gain atleast one, and hence for Bi,0 = 1.25 MHz collaborationamong devices is ex-post individually rational using allalgorithms. These results show that collaboration amongthe devices is ex-post individually rational only if suf-ficient bandwidth is provided for communication to thecloud. Thus, if ex-post individual rationality is importantthen the device to cloud bandwidth has to be managedappropriately.

D. Utilization ratio of collaboration among devices

In order to evaluate the impact of collaboration on thesystem performance, we consider the ratio of the tasksexecuted at different nodes in the system. Figure 7 showsthe ratio of the tasks executed locally, and the ratio of thetasks executed either locally or at one of the other devicesfor the MBR, SM-NE and for the SM-OPT algorithms as afunction of the number of devices for Bi,0 = 1

N 12.5 MHz.The results in Figure 7 show that for N = 10, i.e., when

the bandwidth assigned to each device for communicationwith the cloud is 1.25 MHz, the devices offload moretasks to the cloud in the case of the SM-NE and SM-OPTalgorithms than in the case of the MBR algorithm, whichcoincides with the observation made in Figure 4 forBi,0 = 1.25 MHz. On the contrary, when N ≥ 20 thedevices offload more tasks to the cloud in the case ofthe MBR algorithm than in the case of the SM-NE andSM-OPT algorithms that achieve approximately the sameperformance. Furthermore, we observe that while the ratioof the tasks executed locally increases up to 30 usersand remains constant for more devices, the ratio of thetasks executed either locally or at one of the other devicescontinues to increase with the number of devices for allalgorithms. These results confirm the observation madefor Bi,0 = 1

N 12.5 MHz in Figure 4 that the collaborationamong the devices improves the system performance.E. Computational efficiency of the SM-NE algorithm

Recall that the SM-NE algorithm is based on the staticmixed strategy equilibrium, and that the SM-OPT algo-rithm is based on the socially optimal static mixed strategyprofile. In order to assess the computational efficiency ofthe SM-NE algorithm we measured the time needed tocompute a static mixed strategy equilibrium by the ST-PCmethod and the time needed to compute a socially optimalstatic mixed strategy profile by the quasi-Newton method.Figure 8 shows the measured times as a function of thenumber of devices. T We observe that the time needed tocompute the socially optimal static mixed strategy profileincreases exponentially with the number of devices at afairly high rate, and already for 30 devices it is more thanan order of magnitude faster to compute a static mixedstrategy equilibrium than to compute the socially optimalstatic mixed strategy profile. Therefore, we conclude thatthe SM-NE algorithm, which is based on an equilibrium instatic mixed strategies, is a computationally efficient solu-tion for medium to large scale collaborative computationoffloading systems.

5 15 25 35 45 55 65

Number of devices (N)

100

101

102

103

104

Strategyprofile

computation

time(s)

SM-NESM-OPT

Fig. 8. Time needed to compute a static mixed strategy equilibrium anda socially optimal static mixed strategy profile for Bi,0 = 1.25 MHz.

VI. RELATED WORK

There is a large body of work on augmenting theexecution of computationally intensive applications usingcloud resources [48], [49], [50], [51], [26], [6]. In [48] theauthors studied the problem of maximizing the throughputof mobile data stream applications through partitioning,and proposed a genetic algorithm as a solution. Theauthors in [49] considered multiple QoS factors in a 2-tiered cloud infrastructure, and proposed a heuristic forminimizing the users’ cost. In [50] the authors proposedan iterative algorithm that minimizes the users’ overallenergy consumption, while meeting latency constraints.The authors in [51] considered the joint optimization of theoffloading decisions, and the allocation of communicationand computation resources, proved the NP-hardness ofthe problem and proposed a heuristic offloading deci-sion algorithm for minimizing the completion time andthe energy consumption of devices. The authors in [26]considered a single wireless link and an elastic cloud,provided a game theoretic treatment of the problem ofminimizing completion time and showed that the game isa potential game. The authors in [6] considered multiplewireless links, elastic and non-elastic cloud, provided agame theoretic analysis of the problem and proposeda polynomial complexity algorithm for computing anequilibrium allocation. In [18] the authors considered athree-tier cloud architecture with stochastic task arrivals,provided a game theoretical formulation of the problem,and used a variational inequality to prove the existenceof a solution and to provide a distributed algorithm forcomputing an equilibrium. Unlike these works, we allowdevices to offload computations to each other as well.

A few recent works considered augmenting the execu-tion of computationally intensive applications using thecomputational power of nearby devices in a collaborativeway [52], [53], [54], [17], [55]. The authors in [52]modeled the collaboration among mobile devices as acoalition game, and proposed a heuristic method forsolving a 0 − 1 integer quadratic programing problemthat minimizes the overall energy consumption. In [53]the authors formulated the resource allocation problemamong neighboring mobile devices as a multi-objectiveoptimization that aims to minimize the completion timesof the tasks as well as the overall energy consumption,and as a solution proposed a two-stage approach based on

8

Page 9: Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to offload the computation to a cloud infrastructure with significant computational

enumerating Pareto optimal solutions. In [54] the authorsformulated the problem of maximizing the probability ofcomputing tasks before their deadlines through mobility-assisted opportunistic computation offloading as a convexoptimization problem, and used the barrier method tosolve the problem. The authors in [17] considered acollaborative cloudlet that consists of devices that canperform shared offloading, and proposed two heuristicallocation algorithms that minimize the average relativeusage of all the nodes in the cloudet. The authors in [55]proposed an architecture that enables a mobile device toremotely access computational resources on other mobiledevices, and proposed two greedy algorithms that requirecomplete information about devices’ states, for minimizingthe job completion time and the energy consumption,respectively. Our work differs from these works, as weconsider computation offloading to a cloud and nearbydevices, and provide a non-cooperative game theoretictreatment of the problem.

Only a few recent works considered the computationoffloading problem in fog computing systems [56], [57],[58], [59]. The authors in [56] considered a fog computingsystem in which the tasks can be performed locally atthe devices, at a fog node or at a remote cloud server,and proposed a suboptimal algorithm for computing theoffloading decisions and allocating resources with the ob-jective to minimize the delay and the energy consumptionof devices. In [57] the authors considered a fog computingsystem, where devices may offload their computation tosmall cell access points that provide computation andstorage capacities, and designed a heuristic for a jointoptimization of radio and computational resources with theobjective of minimizing the energy consumption. Unlikethis work, we consider stochastic task arrivals, and weprovide a game theoretical treatment of the completiontime minimization problem. In [58] authors formulated thepower consumption-delay tradeoff problem in fog comput-ing system that consists of a set of fog devices and a set ofcloud servers, and proposed a heuristic for allocating theworkload among fog devices and cloud servers. In [59]the authors considered the joint optimization problemof task allocation and task image placement in a fogcomputing system that consists of a set of storage srevers,a set of computation servers and a set of users, and pro-posed a low-complexity three-stage algorithm for the taskcompletion time minimization problem. Our work differsfrom these works, as we consider heterogeneous compu-tational tasks, and our queueing system model capturesthe contention for both communication and computationalresources.

To the best of our knowledge ours is the first workbased on a game theoretical analysis that proposes adecentralized algorithm with low signaling overhead forsolving the completion time minimization problem in fogcomputing systems.

VII. CONCLUSION

We have provided a game theoretical analysis of a fogcomputing system. We proposed an efficient decentral-ized algorithm based on an equilibrium task allocationin static mixed strategies. We compared the performance

achieved by the proposed algorithm that relies on averagesystem parameters with the performance of a myopicbest response algorithm that requires global knowledgeof the system state. Our numerical results show that theproposed algorithm achieves good system performance,close to that of the myopic best response algorithm, andcould be a possible solution for coordinating collaborativecomputation offloading with low signaling overhead. Aninteresting direction for future work could be to considerdifferent communication models in which devices sharethe bandwidth with each other.

APPENDIX

A. Proof of Theorem 2

Observe that if λi = λ then the cost Ci can equivalentlybe defined as Ni = λCi, i.e., the number of tasks in thesystem. Furthermore, since task complexities are assumedto be exponentially distributed, the execution queues areM/M/1 systems. We can thus rewrite T ei,j as

T ei,j =T ci,j

1− ρej, (9)

and the cost Ni(pi, p−i) of device i as

Ni(pi, p−i) =pi,iλT ci,iζi

+pi,0λ( γi,0

2εi,0+T ti,0 + T ci,0

)+

∑j∈N\{i}

pi,jλ( γi,j

2εi,j+T ti,j +

T ci,jζj

).

Next, we express the first order derivatives hi,j ofNi(pi, p−i) as

hi,0 =λ(T ti,0+T ci,0+

γi,02εi,0

)+pi,0λ

2( 2T ti,0

2εi,0+T ti,0γi,0

2ε2i,0

),

hi,i = λT ci,iζi

+ pi,iλ2T c

2

i,i

ζ2i,

hi,j |j 6=i = λ(T ti,j +

γi,j2εi,j

+T ci,jζj

)+ pi,jλ

2( 2T ti,j

2εi,j+T ti,jγi,j

2ε2i,j+T c

2

i,j

ζ2j

).

In order to prove the monotonicity of the function F inwhat follows we show that the Jacobian J of F is positivesemidefinite. The Jacobian J has the following structure

h11,0 0 ... 0 0 0 ... 0 ... 0 0 ... 0

0 h11,1 ... 0 0 h1

2,1 ... 0 ... 0 h1N,1 ... 0

......

. . ....

......

. . .... ...

.... . .

...0 0 ... h1

1,N 0 0 ... h12,N ... 0 0 ... h1

N,N

......

0 0 ... 0 0 0 ... 0 ... hNN,0 0 ... 0

0 hN1,1 ... 0 0 hN

2,1 ... 0 ... 0 hNN,1 ... 0

......

. . ....

......

. . .... ...

.... . .

...0 0 ... hN

1,N 0 0 ... hN2,N ... 0 0 ... hN

N,N

,

where the second order derivatives can be expressed as

hii,0 =λ2

εi,0

(2T ti,0 +

γi,0T ti,0εi,0

)(1 + pi,0

λT ti,0εi,0

)

9

Page 10: Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to offload the computation to a cloud infrastructure with significant computational

hii,i =

(λT ci,iζi

)2 (2 + 2

λ

ζipi,iT ci,i

),

hii,j∣∣j 6=i =

(λT ci,jζj

)2 (2 + 2

λ

ζjpi,jT ci,j

)+ hti,j ,

where hti,j =λ2

εi,j

(2T ti,j +

γi,jT ti,jεi,j

)(1 + pi,j

λT ti,jεi,j

),

and

hii′,j∣∣i′ 6=i =

λT ci,jλT ci′,jζ2j

(1 + 2

λ

ζjpi,jT ci,j

).

Reordering the rows and columns, the Jacobian J can berewritten as

J =

C 0 . . . 00 M1 . . . 0...

.... . .

...0 0 . . . MN

,

where

C =

h11,0 0 . . . 0

0 h22,0 . . . 0...

.... . .

...0 0 . . . hNN,0

,Mi =

h11,i h

12,i . . . h

1N,i

h21,i h22,i . . . h

2N,i

......

. . ....

hN1,i hN2,i . . . h

NN,i

.

Observe that all diagonal elements of C are nonnegative,and thus the matrix C is positive definite. In order toshow that J is positive semidefinite we have to show thatthe symmetric matrix Ms

i = 12 (MT

i + Mi) is positivesemidefinite.

The diagonal elements dhsj,i of Msi are given by

dhsj,i∣∣j=i

=

(λT ci,iζi

)2 (2 + 2

λ

ζipi,iT ci,i

),

dhsj,i∣∣j 6=i =

(λT cj,iζi

)2 (2 + 2

λ

ζipj,iT cj,i

)+ htj,i,

where htj,i =λ2

εj,i

(2T tj,i +

γj,iT tj,iεj,i

)(1 + pj,i

λT tj,iεj,i

),

and the off-diagonal elements ohsj,i = 12 (hij,i + hji,i)

∣∣∣j 6=i

are given by

ohsj,i =λT ci,iλT cj,i

ζ2i

(1 +

λ

ζi(pi,iT ci,i + pj,iT cj,i)

)Let us define the vector T ci = (T c1,i T c2,i . . . T cN,i)

T

and matrix T ti

T ti =(

diag(htj,i)|j∈N\{i} 0

0 0

).

Furthermore, let us define matrix T pi asp1,iT c

1,ip1,iT

c1,i+p2,iT

c2,i

2 ...p1,iT

c1,i+pN,iT

cN,i

2

p2,iTc2,i+p1,iT

c1,i

2 p2,iT c2,i ...

p2,iTc2,i+pN,iT

cN,i

2

......

. . ....

pN,iTcN,i+p1,iT

c1,i

2

pN,iTcN,i+p2,iT

c2,i

2 ... pN,iT cN,i

.Now, matrix Mi can be rewritten as

Mi =λ2

ζ2i

(T ci T c

T

i ◦(I + E +

ζiT pi

))+ T ti,

where ◦ denotes the Hadamard product, i.e., thecomponent-wise product of two matrices.

It is well known that the identity I and unit E matricesare positive definite, while positive definiteness of matrixT ci T c

T

i follows from the definition. Observe that matrixT ti is positive semidefinite as well, since it is a diagonalmatrix with non-negative elements. Since the sum of twopositive semidefinite matrices is positive semidefinite andthe Hadamard product of two positive semidefinite matri-ces is also positive semidefinite [60], the proof reduces toshowing that matrix I+E+ 2λ

ζiT pi is positive semidefinite.

To do so, we will show that the minimum eigenvalue ofthe matrix 2λ

ζiT pi is greater than or equal to −1. To do

so, let us denote by e the all-ones vector and define thevector tpi = (p1,iT c1,i p2,iT c2,i . . . pN,iT cN,i). Now, wecan express matrix T pi as

T pi =1

2

(tpi e

T + e(tpi )T).

The characteristic polynomial of the symmetric matrix T piis given by [61]

kN−2

2

(k2 − 2(eT tpi )k + (eT tpi )

2 −N‖tpi ‖2).

We observe that T pi has N − 2 zero eigenvalues, andone non-negative and one non-positive eigenvalue given byk+ =

(eT tpi+

√N‖tpi ‖

)/2 and k− =

(eT tpi−

√N‖tpi ‖

)/2,

respectively. Therefore, the minimum eigenvalue of thematrix 2λ

ζiT pi is greater than −1 if

λ

ζi

(√N‖tpi ‖ − e

T tpi)≤ 1. (10)

Since tpi is a vector with non-negative elements, wehave that eT tpi ≥ ‖t

pi ‖ and it also holds that ‖tpi ‖ ≤√

N maxj∈N tj,i. Therefore, the following inequalitieshold

λ

ζi

(√N‖tpi ‖ − e

T tpi)≤ λ

ζi

(√N max

j∈Ntj,i(√N − 1)

)≤ Nλ

ζimaxj∈N

tj,i ≤Nλ

ζimaxj∈N

T cj,i.

Since ρei ≤ St, we have that ζi ≥ 1− St, and thereforeNλ

ζimaxj∈N

T cj,i ≤Nλ

1− Stmaxj∈N

T cj,i. (11)

Based on (11) a sufficient condition for (10) is thatλmaxj∈N T cj,i ≤ 1−St

N . This proves the theorem.

REFERENCES

[1] M. Chiang and T. Zhang, “Fog and iot: An overview of researchopportunities,” IEEE Internet of Things Journal, pp. 854–864, 2016.

[2] A. V. Dastjerdi and R. Buyya, “Fog computing: Helping the internetof things realize its potential,” Computer, pp. 112–116, 2016.

[3] Y. Ai, M. Peng, and K. Zhang, “Edge cloud computing technologiesfor internet of things: A primer,” Digital Communications andNetworks, 2017.

[4] E. Cuervo, A. Balasubramanian, D.-k. Cho, A. Wolman, S. Saroiu,R. Chandra, and P. Bahl, “Maui: Making smartphones last longerwith code offload,” in Proc. of ACM MobiSys, 2010, pp. 49–62.

[5] D. Kovachev, Y. Cao, and R. Klamma, “Mobile cloud computing:a comparison of application models,” arXiv preprint:1107.4940,2011.

[6] S. Jošilo and G. Dán, “A game theoretic analysis of selfish mobilecomputation offloading,” in Proc. of IEEE INFOCOM, 2017.

[7] J. G. Andrews, S. Buzzi, W. Choi, S. V. Hanly, A. Lozano, A. C.Soong, and J. C. Zhang, “What will 5g be?” IEEE Journal onselected areas in communications, pp. 1065–1082, 2014.

[8] G. P. Fettweis, “The tactile internet: Applications and challenges,”IEEE Vehicular Technology Magazine, pp. 64–70, 2014.

10

Page 11: Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to offload the computation to a cloud infrastructure with significant computational

[9] D. Miorandi, S. Sicari, F. De Pellegrini, and I. Chlamtac, “Internetof things: Vision, applications and research challenges,” Ad HocNetworks, vol. 10, no. 7, pp. 1497–1516, 2012.

[10] L. Atzori, A. Iera, and G. Morabito, “The internet of things: Asurvey,” Computer networks, vol. 54, no. 15, pp. 2787–2805, 2010.

[11] G. Fodor, E. Dahlman, G. Mildh, S. Parkvall, N. Reider, G. Miklós,and Z. Turányi, “Design aspects of network assisted device-to-device communications,” IEEE Communications Magazine, vol. 50,no. 3, 2012.

[12] K. Doppler, C.-H. Yu, C. B. Ribeiro, and P. Janis, “Mode selectionfor device-to-device communication underlaying an lte-advancednetwork,” in Proc. of IEEE WCNC, 2010, pp. 1–6.

[13] M. Zulhasnine, C. Huang, and A. Srinivasan, “Efficient resourceallocation for device-to-device communication underlaying lte net-work,” in Proc. of IEEE WiMob, 2010, pp. 368–375.

[14] A. P. Miettinen and J. K. Nurminen, “Energy efficiency of mobileclients in cloud computing,” in Proc. of the 2nd USENIX Conf. HotTopics Cloud Comput., 2010, pp. 4–4.

[15] J. R. Lorch and A. J. Smith, “Improving dynamic voltage scalingalgorithms with pace,” in ACM SIGMETRICS Performance Evalu-ation Review, vol. 29, no. 1. ACM, 2001, pp. 50–61.

[16] W. Yuan and K. Nahrstedt, “Energy-efficient cpu scheduling formultimedia applications,” ACM Transactions on Computer Systems(TOCS), vol. 24, no. 3, pp. 292–331, 2006.

[17] S. Bohez, T. Verbelen, P. Simoens, and B. Dhoedt, “Discrete-event simulation for efficient and stable resource allocation incollaborative mobile cloudlets,” Simulation Modelling Practice andTheory, vol. 50, pp. 109–129, 2015.

[18] V. Cardellini, V. De Nitto Personé, V. Di Valerio, F. Facchinei,V. Grassi, F. Lo Presti, and V. Piccialli, “A game-theoretic approachto computation offloading in mobile cloud computing,” Mathemat-ical Programming, pp. 1–29, 2015.

[19] Y. Wang, X. Lin, and M. Pedram, “A nested two stage game-basedoptimization framework in mobile cloud computing system,” inService Oriented System Engineering, Mar. 2013, pp. 494–502.

[20] L. Pu, X. Chen, J. Xu, and X. Fu, “D2d fogging: An energy-efficientand incentive-aware task offloading framework via network-assistedd2d collaboration,” IEEE Journal on Selected Areas in Communi-cations, vol. 34, no. 12, pp. 3887–3901, 2016.

[21] K. Aberer and Z. Despotovic, “Managing trust in a peer-2-peerinformation system,” in Proc. of the 10th ACM internationalconference on Information and knowledge management, 2001, pp.310–317.

[22] S. D. Kamvar, M. T. Schlosser, and H. Garcia-Molina, “Theeigentrust algorithm for reputation management in p2p networks,”in Proc. of the 12th ACM international conference on World WideWeb, 2003, pp. 640–651.

[23] L. Xiong and L. Liu, “Peertrust: Supporting reputation-based trustfor peer-to-peer electronic communities,” IEEE Transactions onKnowledge and Data Engineering, pp. 843–857, 2004.

[24] P. Mach, Z. Becvar, and T. Vanek, “In-band device-to-device com-munication in ofdma cellular networks: A survey and challenges,”IEEE Communications Surveys & Tutorials, vol. 17, no. 4, pp.1885–1922, 2015.

[25] S. Sharma, N. Gupta, and V. A. Bohara, “Ofdma-based device-to-device communication frameworks: Testbed deployment andmeasurement results,” IEEE Access, vol. 6, pp. 12 019–12 030,2018.

[26] X. Chen, “Decentralized computation offloading game for mobilecloud computing,” IEEE Transactions on Parallel and DistributedSystems, vol. 26, no. 4, pp. 974–983, 2015.

[27] D. Huang, P. Wang, and D. Niyato, “A dynamic offloading al-gorithm for mobile computing,” IEEE Transactions on WirelessCommunications, vol. 11, no. 6, pp. 1991–1995, Jun. 2012.

[28] K. Kumar and Y. H. Lu, “Cloud computing for mobile users:Can offloading computation save energy?” IEEE Computer Mag.,vol. 43, no. 4, pp. 51–56, Apr. 2010.

[29] R. Mahmud, R. Kotagiri, and R. Buyya, “Fog computing: Ataxonomy, survey and future directions,” in Internet of Everything.Springer, 2018, pp. 103–130.

[30] A. Brogi, S. Forti, A. Ibrahim, and L. Rinaldi, “Bonsai in thefog: an active learning lab with fog computing,” in Proc. of IEEEInternational Conference on Fog and Mobile Edge Computing, Apr.2018.

[31] L. I. Sennott, “Nonzero-sum stochastic games with unboundedcosts: discounted and average cost cases,” Mathematical Methodsof Operations Research, vol. 40, no. 2, pp. 145–162, 1994.

[32] E. Altman, A. Hordijk, and F. Spieksma, “Contraction conditionsfor average and α-discount optimality in countable state markov

games with unbounded rewards,” Mathematics of Operations Re-search, vol. 22, no. 3, pp. 588–618, 1997.

[33] A. S. Nowak, “Sensitive equilibria for ergodic stochastic gameswith countable state spaces,” Mathematical Methods of OperationsResearch, vol. 50, no. 1, pp. 65–76, 1999.

[34] L. M. Vaquero and L. Rodero-Merino, “Finding your way in thefog: Towards a comprehensive definition of fog computing,” ACMSIGCOMM Computer Communication Review, vol. 44, no. 5, pp.27–32, 2014.

[35] X. Masip-Bruin, E. Marín-Tordera, G. Tashakor, A. Jukan, and G.-J. Ren, “Foggy clouds and cloudy fogs: a real need for coordinatedmanagement of fog-to-cloud computing systems,” IEEE WirelessCommunications, vol. 23, no. 5, pp. 120–128, 2016.

[36] B. Tang, Z. Chen, G. Hefferman, T. Wei, H. He, and Q. Yang,“A hierarchical distributed fog computing architecture for bigdata analysis in smart cities,” in Proc. of the ASE BigData &SocialInformatics. ACM, 2015, p. 28.

[37] O. Consortium et al., “Openfog reference architecture for fogcomputing,” Tech. Rep., Feb. 2017.

[38] F. Facchinei and J.-S. Pang, Finite-dimensional variational inequal-ities and complementarity problems. Springer Science & BusinessMedia, 2007.

[39] F. Facchinei, A. Fischer, and V. Piccialli, “On generalized nashgames and variational inequalities,” Operations Research Letters,vol. 35, no. 2, pp. 159–164, 2007.

[40] F. Tinti, “Numerical solution for pseudomonotone variational in-equality problems by extragradient methods,” in Variational anal-ysis and applications. Springer, 2005, pp. 1101–1128.

[41] E. Balevi and R. D. Gitlin, “Optimizing the number of fog nodesfor cloud-fog-thing networks,” arXiv preprint:1801.00831, 2018.

[42] S. Sigg, P. Jakimovski, and M. Beigl, “Calculation of functions onthe rf-channel for iot,” in Proc. of IEEE International Conferenceon the Internet of Things (IOT), 2012, pp. 107–113.

[43] Y.-L. Chung, “Rate-and-power control based energy-saving trans-missions in ofdma-based multicarrier base stations,” IEEE systemsjournal, vol. 9, no. 2, pp. 578–584, 2015.

[44] M. N. Tehrani, M. Uysal, and H. Yanikomeroglu, “Device-to-devicecommunication in 5g cellular networks: challenges, solutions, andfuture directions,” IEEE Communications Magazine, vol. 52, no. 5,pp. 86–92, 2014.

[45] A. Aragon-Zavala, Antennas and propagation for wireless commu-nication systems. John Wiley & Sons, 2008.

[46] N. Balasubramanian, A. Balasubramanian, and A. Venkataramani,“Energy consumption in mobile phones: a measurement study andimplications for network applications,” in Proc. of the 9th ACMSIGCOMM conference on Internet measurement conference, 2009,pp. 280–293.

[47] M. Satyanarayanan, “A brief history of cloud offload: A personaljourney from odyssey through cyber foraging to cloudlets,” GetMo-bile: Mobile Computing and Communications, pp. 19–23, 2015.

[48] L. Yang, J. Cao, Y. Yuan, T. Li, A. Han, and A. Chan, “A frameworkfor partitioning and execution of data stream applications in mobilecloud computing,” SIGMETRICS Perform. Eval. Rev., vol. 40, no. 4,pp. 23–32, Apr. 2013.

[49] M. R. Rahimi, N. Venkatasubramanian, and A. V. Vasilakos,“MuSIC: Mobility-aware optimal service allocation in mobile cloudcomputing,” in Proc. of IEEE CLOUD, Jun. 2013, pp. 75–82.

[50] S. Sardellitti, G. Scutari, and S. Barbarossa, “Joint optimization ofradio and computational resources for multicell mobile-edge com-puting,” IEEE Transactions on Signal and Information Processingover Networks, vol. 1, no. 2, pp. 89–103, Jun. 2015.

[51] X. Lyu, H. Tian, C. Sengul, and P. Zhang, “Multiuser joint taskoffloading and resource optimization in proximate clouds,” IEEETransactions on Vehicular Technology, vol. 66, no. 4, pp. 3435–3447, 2017.

[52] L. Xiang, B. Li, and B. Li, “Coalition formation towards energy-efficient collaborative mobile computing,” in Proc. of IEEE ICCCN,2015, pp. 1–8.

[53] S. Ghasemi-Falavarjani, M. Nematbakhsh, and B. S. Ghah-farokhi, “Context-aware multi-objective resource allocation in mo-bile cloud,” Computers & Electrical Engineering, vol. 44, pp. 218–240, 2015.

[54] C. Wang, Y. Li, and D. Jin, “Mobility-assisted opportunistic com-putation offloading,” IEEE Communications Letters, vol. 18, no. 10,pp. 1779–1782, 2014.

[55] C. Shi, V. Lakafosis, M. H. Ammar, and E. W. Zegura, “Serendip-ity: enabling remote computing among intermittently connectedmobile devices,” in Proc. of the 13th ACM international symposiumon Mobile Ad Hoc Networking and Computing, 2012, pp. 145–154.

11

Page 12: Decentralized Algorithm for Randomized Task Allocation in Fog …1206706/... · 2018-05-17 · to offload the computation to a cloud infrastructure with significant computational

[56] J. Du, L. Zhao, J. Feng, and X. Chu, “Computation offloadingand resource allocation in mixed fog/cloud computing systems withmin-max fairness guarantee,” IEEE Transactions on Communica-tions, 2017.

[57] J. Oueis, E. C. Strinati, and S. Barbarossa, “The fog balancing:Load distribution for small cell cloud computing,” in Proc. of IEEEVehicular Technology Conference, 2015, pp. 1–6.

[58] R. Deng, R. Lu, C. Lai, T. H. Luan, and H. Liang, “Optimalworkload allocation in fog-cloud computing toward balanced delayand power consumption,” IEEE Internet of Things Journal, vol. 3,no. 6, pp. 1171–1181, 2016.

[59] D. Zeng, L. Gu, S. Guo, Z. Cheng, and S. Yu, “Joint optimizationof task scheduling and image placement in fog computing sup-ported software-defined embedded system,” IEEE Transactions onComputers, vol. 65, no. 12, pp. 3702–3712, 2016.

[60] R. A. Horn and C. R. Johnson, Matrix analysis. Cambridgeuniversity press, 2012.

[61] D. S. Bernstein, Matrix mathematics: Theory, facts, and formulaswith application to linear systems theory. Princeton UniversityPress Princeton, 2005, vol. 41.

Slad̄ana Jošilo is a Ph.D. student atthe Department of Network and Sys-tems Engineering in KTH, Royal In-stitute of Technology. She received herM.Sc. degree in electrical engineeringfrom the University of Novi Sad, Ser-bia in 2012. She worked as a researchengineer at the Department of Power,Electronics and Communication Engi-

neering, University of Novi Sad from 2013 to 2014. Herresearch interests are design and analysis of distributed al-gorithms for exploiting resources available at the networkedge using game theoretical tools.

György Dán (M’07) is an associateprofessor at KTH Royal Institute ofTechnology, Stockholm, Sweden. He re-ceived the M.Sc. in computer engineer-ing from the Budapest University ofTechnology and Economics, Hungaryin 1999, the M.Sc. in business admin-istration from the Corvinus Universityof Budapest, Hungary in 2003, and the

Ph.D. in Telecommunications from KTH in 2006. Heworked as a consultant in the field of access networks,streaming media and videoconferencing 1999-2001. Hewas a visiting researcher at the Swedish Institute ofComputer Science in 2008, a Fulbright research scholarat University of Illinois at Urbana-Champaign in 2012-2013, and an invited professor at EPFL in 2014-2015. Hisresearch interests include the design and analysis of con-tent management and computing systems, game theoreticalmodels of networked systems, and cyber-physical systemsecurity in power systems.

12