MTFCT - A Task Offloading Approach For Fog Computing and Cloud Computing
MTFCT - A Task Offloading Approach For Fog Computing and Cloud Computing
Abstract— Cloud computing is an important computing cloud computing, rather reduce the overload on cloud
paradigm for handling all types of computations, even the datacenters and provide fast services to the latency-sensitive
smaller ones in the past. But sometimes, it becomes ineffective application [14].
when the task is to be done in real-time, with very low latency.
Therefore, fog computing was introduced as a supplement So it can perform both the operations, storing as well as
computing paradigm for cloud computing. Internet of Things processing the data near the edge of the network or near the
based applications perform better with the amalgamation of its end-user. The interconnection of IoT devices with fog nodes
and the fog computing. Due to low capacity, when fog can’t and fog with the cloud is shown in fig 1.
compute the task on its own, heavy computations are offloaded
from fog to cloud. But when to offload the task from fog to cloud
is a major decision. The decision is to be made out to offload the
tasks from fog to cloud is very crucial, so this paper presents an
idea to solve this problem.
I. INTRODUCTION
With the advancement in the technology area, more and
more electronically enabled devices, which are capable are
connecting with the internet, so the Internet of Things (IoT)
devices are increasing day by day. These devices are
communicating with each other, so basically, they are Fig. 1. Three tiers IoT, Fog and Cloud Architecture [11]
generating lots of data [1].
Fog computing is decentralized in nature, unlike cloud, which
Because of this, the burden on cloud computing to solve is centralized [4]. It also provides fog computing an upper edge
computations and to provide the result back in a given time over cloud computing
was also increasing day by day.
Cloud computing is an important computing paradigm to II. BACKGROUND KNOWLEDGE AND
handle heavy scientific workflows by providing infinite virtual MOTIVATION
resources but doesn’t work well where latency requirement is
low [2].
According to an estimate, more than 50 billion devices will be
There may be a case where latency-sensitive applications connected to the internet by 2020 [5]. The majority of these
demand results back in real-time. Cloud may provide an devices are not able to process their data on their own. So, we
accurate result, but it may return the result late, which may need the help of fog computing also along with cloud
diminish the whole objective. computing. IoT is the future, but we need to amalgamate it
To solve this issue, fog computing was introduced in 2014 [3]. with fog computing. We can not overload cloud datacenters.
Fog computing is an online computing paradigm to solve low Moreover, providing a reliable result is still not an easy task.
complexity problems in real-time. It was introduced as a The performance of fog computing is dependent upon fog
supplement to cloud computing. Its aim was never to replace
c
978-1-7281-2791-0/20/$31.00 2020 IEEE 145
nodes placement as well as the resources provided to the fog Aim of this is to provide a better computing experience, which
nodes. Fog nodes are generally much closer, at the edge of the can support all types of applications, even the latency-
network [6]. Therefore, their latency time is very less as sensitive one too.
compared to cloud datacenters. Some of the advantages of fog computing over cloud
Fog nodes are small data centers that provide the computing are low power consumption, low latency,
computational capability to these latency-sensitive devices [7]. bandwidth saving, decentralized nature, security, mobility, etc.
They are generally placed between the end devices and the
cloud data centers in the network — the closeness of these Location awareness is also high in fog computing in
nodes with end devices benefits in providing low latency [8]. comparison to the cloud. Physically fog nodes are
decentralized and distributed, while the cloud is centralized. It
The drawback of these fog nodes is their limited capacity. They
gives an upper edge to the fog computing and fog nodes. They
cannot provide high computational and storage power [9].
can be well distributed to decrease the load on any fog node.
Because of this reason, some data is offloaded from these fog
nodes to the cloud data center for processing. ‘
These advantages encourage the user to move to fog
Fig 2. Explains the architecture of fog and cloud. From the computing. As the fog layer is sharing part of the original data
figure, we can observe that there are three levels. At the lowest which it received from the terminal nodes, it is decreasing the
level, we have sensors and actuators. Sensors gather the data overall bandwidth requirement, which is very useful [12].
from the surrounding, and this data is in the form of data
streams known as tuples. Fog computing has some disadvantages also. These are
computation and storage power of fog nodes that are much
less than the cloud datacenter. But in a real environment, it
does not affect much.
As the original purpose of fog computing is to provide small
computation and storage facility to the end-user. So heavy
computational requirement is not needed to the end-user.
146 10th International Conference on Cloud Computing, Data Science & Engineering (Confluence)
configured as TN = {T1, T2,….., TN}. It will be decided whether 4) TEF = Task size/fog node processing capacity (Time
the fog nodes are chosen or cloud data center or both. required to execute a task by fog node). If the task is processed
Bandwidth requirement to offload the data to the cloud is by the fog node, it is calculated using the task size and
generally greater than the bandwidth requirement to offload the processing capacity of that particular node. Lesser the
data to the fog. Also, the prices to lease the cloud datacenter processing capacity higher will be the TEF.
resources and their capacity is much larger than the prices and 5) TFM = Time required to send the result back to the
capacity of fog nodes. mobile device. The same channel is used as in TMF. This time
Total work is done in three phases. In phase 1, it is decided that will depend upon bandwidth and result in size. The more the
whether the generated task by an end device can be processed task size more will be its value.
by the end device itself or not. 6) TEC = Tasksize/cloud datacenter processing capacity If
the task is processed by the cloud datacenter (Time required to
If the end device is not capable of doing so, only in that
execute a task by cloud datacenter). It is calculated using task
condition, the decision to process the data through fog nodes
will be taken. Otherwise, offloading will not be performed. size and processing capacity of that cloud datacenter, which is
generally very high. Its value is always less than TFM.
Now, if the fog node can process the data and also within the 7) TFC = Time required to send the task from fog to cloud.
given allotted time, then the task will be processed by the fog Sometimes a task is partially processed by a fog node and is
node. Otherwise, data will be offloaded to the cloud datacenter.
sent to the cloud data center for further processing. In this, the
There will be a central fog manager, who will be aware of all remaining task size and bandwidth between fog node and
the fog node processing power and their impact zone, where cloud datacenter play an important role. So this time is known
they provide services. as TFC.
Fog manager will select the best fog node to provide service to 8) TCF = After the task processing, if the result is sent back
mobile devices based upon its computation capability and its to the fog node, the same channel is used as in TFC. So this is
impact zone. Tasks that fog node can not process on their own known as TCF.
will be offloaded to the cloud datacenter. 9) TCM = After the task processing, if the result is sent back
To determine whether offloading the task to fog node or cloud to the mobile device, the same channel is used as in TCM. This
from mobile devices are in our favor or not, we have proposed time will depend upon bandwidth and result in size.
Mobile to Fog and Cloud Transfer (MTFCT) algorithm. 10) TM = Execution time if the task runs on mobile
devices itself.
B. Execution Time
Execution time is divided into many phases, which are the So total execution time a task requires can be anything based
following: upon a combination of the factors mentioned above. If the
cloud data center gets involved, the execution time will get
1) TOD = A decision is made before transferring data to the high; otherwise, if only fog nodes are involved, the value of
fog node, whether the fog nodes can process the given task or execution time will be very less.
not. If the fog nodes meet the task requirement, the task will
C. Cost of Execution
be given to the fog nodes; otherwise, the task will be given to
the cloud datacenter. We can divide our cost of execution on a remote center into
This decision is based on the task processing requirement and two parts; the cost of execution on cloud (CC) and the cost of
fog nodes capacity in the vicinity of the fog node manager. execution on fog (CF). Cost of execution on fog can be further
This decision takes time, and it is known as TOD. It is a crucial divided into two parts which are following;
CF = CEF+ CEC (1)
decision. It will take place with the help of various other
(CEC depends upon how much part of the task is sent for
parameters.
processing by the local fog node to the cloud node)
2) TMF = Task size*Time required to transfer one unit of
Where CEF is a cost for executing the part of the task on fog
data to the fog (Time required to transfer whole data from
node only, and CEC is the cost for the part sent to the cloud
mobile device to the fog node) datacenter from fog node for further processing and other
The selection of fog node will be managed by the fog purposes. If the task is processed fully by the fog nodes
manager. This time will only be considered when the fog themselves, the value of CEC will become zero. So in that
manager decides that the given task can be processed by the case,
fog node in the given time. It depends upon the available CF = CEF
bandwidth and task size.
3) TMC = Task size*Time required to transfer one unit of CM = cost to run the task on mobile devices itself.
data to the cloud data-center (Time required to transfer whole If we don’t offload our task to the cloud or fog node, in that
data from mobile device to the cloud data-center). This time is case, we calculate this value. This is generally used to check
generally greater than TMF. whether it is beneficial to offload the task or not. If it is not
beneficial, the task will not be offloaded. But it is not the only
10th International Conference on Cloud Computing, Data Science & Engineering (Confluence) 147
factor which decides; other factors are also there like E. Proposed algorithm
execution time, energy requirement, etc. Algorithm 1 MTFCT algorithm
Input: parameters like TOD, TMF, TEF, TFC, TEC, TCF, TFM, TCM,
Generally, the cost of processing on cloud takes high value, TMC, TM.
but still, some tasks can not be processed locally by fog nodes Output: Offloading decision, wheather to offload to fog,
or the mobile devices itself, fully because of its size and cloud or not
required time. 1: Calculate the value of each variable like TOD, TMF, etc.
So, in that case, offloading the task to the cloud datacenter 2: Check how much part of the task can be executed on
becomes necessary. CEC will also be affected by the local fog node too.
scheduling policy chosen for its task scheduling. 3: Calculate TF = TOD+TMF+TEF+TFC+TEC+TCF+TFM
D. Energy Requirement (TEC depends upon how much part of task is sent to
Energy requirements can also be divided into two parts; EF cloud for processing) (5)
and EC. 4: Calculate TC=TOD+TMC+TEC+TCM (6)
E = E F + E C. (2) 5: Compare TM with TF and TC.
EF = EMF+EEF+EFC+ EEC +ECF+ EFM (3) 5.1: If TM > TF and TM < TC,
EC = EMC+EEC+ECM (4) Task will be uploaded to the fog node
Where, 5.2: If TM > TF and TM > TC,
EF = Total energy required if task go to the fog nodes for check if TF >TC, If yes Task will be uploaded to the
processing. Task can also be partially executed on the fog cloud data center otherwise to the fog node
nodes too and rest can be sent to cloud. In this case value of EF 5.3: If TM < TF and TM > TC,
will get vey low, because only a part of task is executing on The task will be uploaded to the cloud datacenter
fog node irrespective of full task. 5.4: If TM <= TF and TM <= TC,
The value of total energy consumption (E) in equation number The task will not be offloaded to either fog node or
two becomes zero if a task is decided to be processed by the cloud datacenter
end device (mobile device) itself. 6: Similarly, compare CM with CF and CC
EMF = Task size*Energy required to transfer one unit of data 7: Also, calculate EF and EC
(Energy required to transfer whole data to fog node) 8: Compare it with EM
EEF = Task size*Energy required to process one unit of data by 9: Based upon the above comparisons and the weighted
fog node (Energy required to process whole data by fog node)
value of each factor (execution time, cost & energy),
EFC = Energy required to transfer the remaining task for
we decide to offload the task from mobile device to
further processing by the cloud datacenter. Its value will
fog node or cloud node is beneficial or not take
become zero if the task is fully processed by the fog nodes
themselves. decision based upon that. (Based upon how much
ECF = Energy required to transfer the result to fog node by value or importance is given to each factor by user)
cloud. Its value will become zero if the task is fully processed
by the fog nodes themselves. IV. CONCLUSION
EFM = Energy required to transfer the result to the mobile
device by fog node Fog computing is the lifeline of IoT in today’s world
EC = Total energy required if the task goes to the cloud data scenario. IoT can be implemented without fog computing, too,
but with the help of fog computing, the efficiency of IoT
center for processing. Task can also be partially executed on
increases considerably. So to achieve very high efficiency, we
the cloud datacenter too. Its value will become zero if the task integrate fog computing with cloud computing.
is fully processed by the fog nodes themselves.
EMC = Task size*Energy required to transfer one unit of data to The energy requirement of fog is very less as compared to the
the cloud datacenter (Energy required to transfer whole data to energy required to process the same task in a cloud datacenter.
the cloud datacenter). This is generally higher than the EMF as This can help us in reducing the total co2 emission to save the
the cloud data center is generally very far located as compared environment too.
to the fog nodes. In this paper, we proposed a method for task offloading to fog
EEC = Task size*Energy required to process one unit of data by nodes and cloud datacenter using various parameters. In this,
cloud datacenter (Energy required to process whole data by the involvement of users is also very high.
cloud datacenter)
ECM = Energy required to transfer the result to the mobile This is a theoretically proposed algorithm, so in the future, we
would like to implement this proposed algorithm in a real fog
device by cloud datacenter.
computing environment or in a simulated environment using
EM = Energy required to run the task on the mobile device
FogSim simulation toolkit and also provide node to node
itself migration of task in fog computing environment and along with
a better way to handle the task on cloud datacenter whether if
the task is offloaded from a mobile device or any fog node
148 10th International Conference on Cloud Computing, Data Science & Engineering (Confluence)
REFERENCES 29th International Conference on Advanced Information Networking
and Applications. IEEE, 2015.
[8] S. Delfin, S.P. Sivasanker, N. Raj and A. Anand, “Fog computing: A
[1] S. Zahra, M. Alam, Q. Javaid, A. Wahid, N. Javaid, S.U.R. Malik and new era of cloud computing." 2019 3rd International Conference on
M.K. Khan, “Fog computing over IoT: A secure deployment and formal Computing Methodologies and Communication (ICCMC). IEEE, 2019.
verification,” IEEE Access 5 (2017): 27132-27144.
[9] F. Haouari, R. Faraj and J.M. Alja’am, “Fog computing potentials,
[2] M.A. Rodrigue and R. Buyya, “A taxonomy and survey on scheduling applications, andcChallenges," 2018 International Conference on
algorithms for scientific workflows in IaaS cloud computing Computer and Applications (ICCA). IEEE, 2018.
environments,” Concurrency and Computation: Practice and Experience,
29(8), 2017. [10] J. K. Zao, T. T. Gan, C. K. You, C. E. Chung, Y. T. Wang, S.J.R.
Méndez, et al., “Pervasive brain monitoring and data sharing based on
[3] H.A. Khattak, H. Arshad, S.U. Islam, G. Ahmed, S. Jabbar, A.M. Sharif multi-tier distributed computing and linked data technology.” Frontiers
and S. Khalid, “Utilization and load balancing in fog servers for health in human neuroscience, 8, 370, 2014.
applications." EURASIP Journal on Wireless Communications and
Networking 2019.1 (2019): 91. [11] R. Jindal, N. Kumar, and H. Nirwan, “A survey on cloud to fog
evolution” unpublished.
[4] S. Khan, S. Parkinson and Y. Qin, "Fog computing security: a review of
current applications and security solutions," Journal of Cloud [12] Y. Sun, and N. Zhang, “A resource-sharing model based on a repeated
Computing 6.1 (2017): 19. game in fog computing.” Saudi journal of biological sciences, 24(3),
687-694, 2017.
[5] D. Poola, M.A. Salehi, K. Ramamohanarao and R. Buyya, “Fog
computing: A taxonomy, survey and future directions,” Internet of [13] M. Aazam, S. Zeadally, and K. A. Harras. "Offloading in fog computing
Everything (pp. 103-130). Springer, 2016. for IoT: Review, enabling technologies, and research opportunities."
Future Generation Computer Systems 87: 278-289,2018.
[6] C. Puliafito, E. Mingozzi, F. Longo, A. Puliafito and O. Rana, “ Fog
computing for the Internet of Things: A Survey,” ACM Transactions on [14] A. Khakimov, A. Muthanna, and M. S. A. Muthanna. "Study of fog
Internet Technology, Vol. 19, No. 2, Article 18, 2019 . computing structure." IEEE Conference of Russian Young Researchers
in Electrical and Electronic Engineering (EIConRus). IEEE, 2018.
[7] A. Mohammad, and E. N. Huh. "Fog computing micro datacenter based
dynamic resource estimation and pricing model for IoT." 2015 IEEE
10th International Conference on Cloud Computing, Data Science & Engineering (Confluence) 149