<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xml:lang="en" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">CMC</journal-id>
<journal-id journal-id-type="nlm-ta">CMC</journal-id>
<journal-id journal-id-type="publisher-id">CMC</journal-id>
<journal-title-group>
<journal-title>Computers, Materials &#x0026; Continua</journal-title>
</journal-title-group>
<issn pub-type="epub">1546-2226</issn>
<issn pub-type="ppub">1546-2218</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">35602</article-id>
<article-id pub-id-type="doi">10.32604/cmc.2023.035602</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Latency-Aware Dynamic Second Offloading Service in SDN-Based Fog Architecture</article-title>
<alt-title alt-title-type="left-running-head">Latency-Aware Dynamic Second Offloading Service in SDN-Based Fog Architecture</alt-title>
<alt-title alt-title-type="right-running-head">Latency-Aware Dynamic Second Offloading Service in SDN-Based Fog Architecture</alt-title>
</title-group>
<contrib-group>
<contrib id="author-1" contrib-type="author">
<name name-style="western"><surname>AlShathri</surname><given-names>Samah Ibrahim</given-names></name></contrib>
<contrib id="author-2" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Hassan</surname><given-names>Dina S. M.</given-names></name><email>DSHassan@pnu.edu.sa</email></contrib>
<contrib id="author-3" contrib-type="author">
<name name-style="western"><surname>Chelloug</surname><given-names>Samia Allaoua</given-names></name></contrib>
<aff id="aff-1"><institution>Information Technology Department, College of Computer and Information Sciences, Princess Nourah bint Abdulrahman University</institution>, <addr-line>Riyadh, 84428</addr-line>, <country>Saudi Arabia</country></aff>
</contrib-group>
<author-notes>
<corresp id="cor1"><label>&#x002A;</label>Corresponding Author: Dina S. M. Hassan. Email: <email>DSHassan@pnu.edu.sa</email></corresp>
</author-notes>
<pub-date date-type="collection" publication-format="electronic"><year>2023</year></pub-date>
<pub-date date-type="pub" publication-format="electronic"><day>24</day><month>1</month><year>2023</year></pub-date>
<volume>75</volume>
<issue>1</issue>
<fpage>1501</fpage>
<lpage>1526</lpage>
<history>
<date date-type="received"><day>27</day><month>8</month><year>2022</year></date>
<date date-type="accepted"><day>14</day><month>12</month><year>2022</year></date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2023 AlShathri et al.</copyright-statement>
<copyright-year>2023</copyright-year>
<copyright-holder>AlShathri et al.</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_CMC_35602.pdf"></self-uri>
<abstract><p>Task offloading is a key strategy in Fog Computing (FC). The definition of resource-constrained devices no longer applies to sensors and Internet of Things (IoT) embedded system devices alone. Smart and mobile units can also be viewed as resource-constrained devices if the power, cloud applications, and data cloud are included in the set of required resources. In a cloud-fog-based architecture, a task instance running on an end device may need to be offloaded to a fog node to complete its execution. However, in a busy network, a second offloading decision is required when the fog node becomes overloaded. The possibility of offloading a task, for the second time, to a fog or a cloud node depends to a great extent on task importance, latency constraints, and required resources. This paper presents a dynamic service that determines which tasks can endure a second offloading. The task type, latency constraints, and amount of required resources are used to select the offloading destination node. This study proposes three heuristic offloading algorithms. Each algorithm targets a specific task type. An overloaded fog node can only issue one offloading request to execute one of these algorithms according to the task offloading priority. Offloading requests are sent to a Software Defined Networking (SDN) controller. The fog node and controller determine the number of offloaded tasks. Simulation results show that the average time required to select offloading nodes was improved by 33&#x0025; when compared to the dynamic fog-to-fog offloading algorithm. The distribution of workload converges to a uniform distribution when offloading latency-sensitive non-urgent tasks. The lowest offloading priority is assigned to latency-sensitive tasks with hard deadlines. At least 70&#x0025; of these tasks are offloaded to fog nodes that are one to three hops away from the overloaded node.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>Fog computing</kwd>
<kwd>offloading algorithm</kwd>
<kwd>latency-aware</kwd>
<kwd>software defined networking</kwd>
<kwd>SDN</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="s1"><label>1</label><title>Introduction</title>
<p>Traffic generated by smart and Internet of Things (IoT) devices is rapidly dominating the Internet. In 2021, hundreds of Zettabytes were processed by cloud data centers [<xref ref-type="bibr" rid="ref-1">1</xref>&#x2013;<xref ref-type="bibr" rid="ref-3">3</xref>], and it is expected that this number will double in the coming years. However, approximately 10&#x0025; of these data are critical [<xref ref-type="bibr" rid="ref-2">2</xref>,<xref ref-type="bibr" rid="ref-3">3</xref>]. Processing latency-sensitive tasks on remote cloud servers without violating their deadlines is a major challenge because all requests, regardless of their type, compete for Internet infrastructure. Furthermore, the vast increase in the number of requests due to unforeseen social, accidental, or environmental causes imposes a greater burden on network resources from a general perspective and on cloud data centers from a focused perspective. Introducing the paradigm of Fog Computing FC in 2012 [<xref ref-type="bibr" rid="ref-4">4</xref>] was an attempt to ensure that data are processed in the most efficient location by local fog servers to minimize latency, provide efficient Quality of Service QoS management, allow scalability, accept heterogeneity, and promote wireless access. These benefits have inspired the integration of FC with other network architectures, such as sensor networks [<xref ref-type="bibr" rid="ref-5">5</xref>&#x2013;<xref ref-type="bibr" rid="ref-7">7</xref>], IoT [<xref ref-type="bibr" rid="ref-8">8</xref>&#x2013;<xref ref-type="bibr" rid="ref-11">11</xref>], Internet of Vehicles (IoV) [<xref ref-type="bibr" rid="ref-12">12</xref>&#x2013;<xref ref-type="bibr" rid="ref-15">15</xref>], blockchain [<xref ref-type="bibr" rid="ref-16">16</xref>&#x2013;<xref ref-type="bibr" rid="ref-21">21</xref>], and big data analysis [<xref ref-type="bibr" rid="ref-22">22</xref>&#x2013;<xref ref-type="bibr" rid="ref-25">25</xref>]. Further integration with Software Defined Networking (SDN) [<xref ref-type="bibr" rid="ref-26">26</xref>] enhances performance. SDN applies flow rules to control traffic forwarding according to its features and type. Several studies have addressed the integration of SDN-based networks with FC [<xref ref-type="bibr" rid="ref-27">27</xref>&#x2013;<xref ref-type="bibr" rid="ref-31">31</xref>]. The results showed that the SDN architecture allowed fog networks to achieve efficient network management and promoted scalability while maintaining cost efficiency [<xref ref-type="bibr" rid="ref-32">32</xref>,<xref ref-type="bibr" rid="ref-33">33</xref>]. These benefits originate from the characteristics imposed by the architecture of SDN networks, which are based on centralized orchestration and traffic programmability. These properties eventually lead to agility and flexibility in network services performance.</p>
<p>Tasks that cannot be fully executed at end devices are offloaded to the fog nodes. Occasionally, fog nodes may become overloaded with a large number of requests. Traffic update requests sent to local fog nodes during traffic congestions or video streaming requests sent during key events are examples of fog node overload scenarios. Furthermore, the continuous growth in the number of users of cloud applications and rapid expansion in the deployment of IoT technologies may overwhelm the resources of fog nodes. Adding more fog nodes to reduce the workload is a static solution that cannot adapt to rapid and unexpected changes in the rate of generated requests. This may also be unjustified, especially if overloading is not the dominant state in all fog nodes. A second offloading was introduced as a dynamic solution that allowed fog nodes to exit the overloading state by redirecting a portion of the workload to other fog nodes. To propose an efficient offloading service, four main questions should be answered: How is the offloading node chosen [<xref ref-type="bibr" rid="ref-34">34</xref>&#x2013;<xref ref-type="bibr" rid="ref-47">47</xref>], how is the number of offloading nodes decided [<xref ref-type="bibr" rid="ref-37">37</xref>], what tasks are eligible for offloading [<xref ref-type="bibr" rid="ref-35">35</xref>] and how is the number of offloaded tasks determined [<xref ref-type="bibr" rid="ref-38">38</xref>]. The proposed dynamic offloading service attempts to address these questions. The service is implemented in an SDN-based FC network. In a distributed architecture (e.g., non-SDN-based), the overloaded node is usually responsible for sending offloading requests to other fog nodes, collecting replies, and executing the offloading algorithm to decide which node should be selected to offload tasks to. This policy overburdens the overloaded fog node and incurs large communication overhead. Hence, the system throughput and average response time may degrade significantly. In an SDN-based network, the controller is responsible for selecting an offloading node. It benefits from the global network view built based on the collected information sent by fog nodes and network infrastructure components.</p>
<p>In this paper, both fog nodes and SDN controllers participate in determining the offloading nodes and selecting the offloaded task set. To the best of our knowledge, no previous research in the field of offloading algorithms has considered the problem of dynamically determining the type and amount of offloaded tasks in an overloaded fog node and employed this information to select a number of offloading nodes using an SDN-based logically centralized architecture such that resource requirements and latency constraints of tasks are not violated and the time required to select offloading nodes is minimized. The major contributions of this study are as follows.
<list list-type="bullet">
<list-item><p>A dynamic latency-aware second offloading service exploits the SDN approach to determine offloading destinations and offloaded tasks by executing one of the following heuristic algorithms:
<list list-type="bullet">
<list-item><p>A greedy fog-to-cloud offloading algorithm selects task instances based on the value of the resources required. Tasks without latency constraints or latency-tolerant tasks are candidates for this type of offloading.</p></list-item>
<list-item><p>A greedy fog-to-fog offloading algorithm for latency-sensitive non-urgent tasks. It aims to offload tasks to fog nodes with the lowest resource utilization without violating latency constraints. The algorithm is executed if fog-to-cloud offloading cannot be applied.</p></list-item>
<list-item><p>The third proposed algorithm offloads latency-sensitive hard deadline tasks. A service is activated if this task type is the only one that exists. The algorithm selects the offloading fog nodes that achieve the lowest network latencies.</p></list-item>
</list></p></list-item>
<list-item><p>A policy for determining the size of the task set to be offloaded is also presented.</p></list-item>
<list-item><p>A performance evaluation study was conducted to assess the effectiveness of the proposed algorithm in reducing the time required to select offloading nodes, achieve a fair distribution of workload and guarantee the execution of hard deadline tasks.</p></list-item>
</list></p>
<p>The rest of the paper is organized as follows. Section 2 presents the motivation behind the proposed service. Section 3 presents a review of the related literature. Section 4 proposes a novel dynamic second offloading service based on the task type at the overloaded fog node. The performance evaluation is discussed in Section 5. Section 6 concludes the paper and presents future work.</p>
</sec>
<sec id="s2"><label>2</label><title>Motivations</title>
<p>Innovations in smart city solutions, such as intelligent utilities, buildings, and healthcare management systems, are evolving rapidly. As the complexity of intelligent management systems increases, tasks executed by those systems vary in their types and importance and have different latency constraints. One example is the intelligent transportation system. The system provides several services, such as enhancing public safety, managing traffic flows, enabling vehicle-to-everything communication, controlling bus pick up times, collecting tolls electronically, performing fleet control, and managing emissions. Owing to the perceived benefits of SDN and FC, instead of sending all tasks to cloud nodes, integrating the SDN-based FC paradigm with cloud architecture can improve throughput, reduce delays and enhance the user Quality of Experience (QoE). However, owing to the diversity of tasks, a task queue in a fog node may have tasks belonging to several services. Therefore, these tasks have different resource requirements and latency constraints. When applying the proposed dynamic offloading service to the previous example. If a fog node becomes overloaded, latency-tolerant tasks, such as emission monitoring tasks, will be offloaded before latency-sensitive tasks, such as pedestrian detection tasks. Similarly, the proposed service can be applied to Cloud-edge-based Automated Driving Platforms (ADP) and Advanced Driver Assistance Systems (ADAS). Furthermore, in some systems, the same application may create task instances with different latency constraints depending on the end device that created the task. In cloud-based Virtual Reality (VR), users of this type of VR services engage in a simulated environment rendered by the cloud and then stream to the user&#x2019;s headset. In [<xref ref-type="bibr" rid="ref-48">48</xref>], the authors discussed the effects of adding variable delays to certain responses to user actions in a VR environment. The experiment showed that small delays added to display updates in response to head movements resulted in more discomfort than relatively large delays added to display updates in response to joystick movements. Although both events activated the display update task, the delay that each task could endure differed. This wide variation in task requirements creates the need for offloading services that can efficiently select the most appropriate tasks for offloading and minimize the time required to select offloading nodes.</p>
</sec>
<sec id="s3"><label>3</label><title>Related Work</title>
<p>The task offloading technique transfers task execution from one node to another. Offloading algorithms can be categorized as first or second offloading algorithms. The lack of required resources at end devices is the main reason that thrusts the first offloading. The first offloading algorithm transfers a task from the node at which it is created to another node, where the execution of the task resumes as in [<xref ref-type="bibr" rid="ref-34">34</xref>&#x2013;<xref ref-type="bibr" rid="ref-37">37</xref>], [<xref ref-type="bibr" rid="ref-49">49</xref>,<xref ref-type="bibr" rid="ref-50">50</xref>]. However, a task may be offloaded once more using a second offloading algorithm for several reasons, such as adapting to node mobility [<xref ref-type="bibr" rid="ref-37">37</xref>], achieving load balancing [<xref ref-type="bibr" rid="ref-34">34</xref>,<xref ref-type="bibr" rid="ref-38">38</xref>], avoiding node overloading [<xref ref-type="bibr" rid="ref-44">44</xref>], and achieving QoS optimization [<xref ref-type="bibr" rid="ref-34">34</xref>,<xref ref-type="bibr" rid="ref-35">35</xref>]. Offloading may occur from the end device to the cloud server. However, device-to-cloud offloading increases latency and may result in missed deadlines, which may have serious consequences for hard-deadline, real-time tasks. The FC paradigm improves task response times by offloading them to local fog servers. As the number of offloaded tasks increases, fog nodes may become overloaded, and the overall performance may degrade sharply. Fog-to-fog offloading allows overloaded fog nodes to migrate tasks to other fog nodes that satisfy the requirements. Recently, there has been an evident increase in the volume of research that proposed task-offloading algorithms in FC.</p>
<p>In [<xref ref-type="bibr" rid="ref-34">34</xref>], IoT devices sent task offloading requests to fog nodes. The fog layer consists of a master fog node that collects offloading requests and performance data from the remaining fog nodes. The master fog node schedules offloaded tasks to fog nodes based on the collected information. The offloading algorithm was developed using an Ant Colony Optimization (ACO) probabilistic technique. The network architecture permits device-to-fog and fog-to-cloud offloading. Ordinary fog nodes do not enter an overloading state because the scheduling service is performed by the master node. Hence, fog-to-fog offloading is not required. Performance evaluation showed that ACO has a better response time than Round Robin (RR) algorithm and Particle Swarm Optimization (PSO) algorithm [<xref ref-type="bibr" rid="ref-34">34</xref>]. However, this model lacked scalability. As each task created in the IoT layer issues an offloading request, the master fog node, which is a single point of failure, may become a bottleneck as the number of requests increases.</p>
<p>In [<xref ref-type="bibr" rid="ref-35">35</xref>], the authors proposed a QoS optimization approach that triggers task computation offloading from end devices to fog nodes if better QoS can be achieved. The objective is to determine the optimal allocation of energy for real-time applications without missing task deadlines. The end device consists of sensors, a MultiProcessor System-on-Chip (MPSoC), and a low-power transceiver. MPSoC executes real-time applications and performs a local scheduling service that arranges the execution of applications while maintaining optimal energy allocation in two stages. In the first stage, the available energy of the end device is optimally allocated to the real-time task instances. The solution obtained in the first stage is the input for the second stage. In the second stage, the energy allocated to each task is optimally partitioned among the end-device components: the sensors, MPSoC, and transceiver. The output of this stage was sent as the input for the adaptive computation offloading algorithm executed at the fog node. For each locally running real-time task, if computation offloading achieves a better QoS when executed at the fog server, the task is offloaded. Otherwise, it is executed in the end device. If computational offloading occurs, the energy allocation algorithms of the device and components are recalled to be executed at the end device to reallocate the available energy. However, no offloading service was introduced, assuming that the end device and fog server entered an overload state. Furthermore, the proposed solution does not consider how global optimal energy allocation can be achieved in a network architecture with multiple end devices and several fog servers.</p>
<p>The idea presented in [<xref ref-type="bibr" rid="ref-36">36</xref>] considered a network scenario that includes IoT devices connected through multi-hop connections to fog nodes. The network scenario also incorporated an SDN controller that relies on southbound Application Programming Interfaces (APIs) to control the dynamic task offloading from IoT devices to fog nodes. Moreover, the authors of [<xref ref-type="bibr" rid="ref-36">36</xref>] proposed a bi-objective mathematical model for optimizing the delay and energy while satisfying the energy, flow conservation, bandwidth, and capacity requirements of the access points. The proposed optimization model is non-linear and has been transformed into an equivalent Integer Linear Program (ILP). The proposed solution, called Detour, represents an approximate greedy algorithm that decides for each IoT task whether to offload it or to process it locally according to where improvement in delay and energy consumption is determined. Detour assumes that each device has one task to execute and that all required data units and applications are available locally. However, this may not always be the case in FC. In several scenarios, device-to-fog offloading is required because IoT devices do not have the required data, processing power, or applications. Furthermore, the SDN controller is required to execute Detour for each newly created task. As the number of tasks increases, this may overload the SDN. In addition, determining how the offloading service is performed for concurrent tasks has not been considered.</p>
<p>In [<xref ref-type="bibr" rid="ref-37">37</xref>], the distributed control plan consists of multiple SDN controllers that communicate with each other using the east-west API. Each SDN controlled a set of fog nodes. The Mobile Node (MN) executes a delay-sensitive service to locally compute the feasibility of satisfying a task within the time limit. This was achieved by executing the local scheduling part of the hybrid scheduling algorithm proposed in [<xref ref-type="bibr" rid="ref-37">37</xref>]. If the service cannot be fully executed locally, the MN sends an offloading request along with its QoE requirement to the corresponding fog node. The fog node relays a request to its corresponding SDN controller. The controller begins the execution of the fog-scheduling part of the hybrid algorithm. The network status information was collected, and the mobile trajectory of the MN was predicted. The algorithm then uses Yen&#x2019;s k shortest path algorithm to determine the shortest path between the source and destination fog nodes. The data file related to the application was partitioned into file blocks. The SDN controller tests the feasibility of stratifying requests by assigning file blocks to fog nodes along that path. If the deadline cannot be met, the iteration continues until the optimal path that satisfies the request is determined. However, partitioning files into blocks that maintain the control flow of the program is a significant issue, and its cost should be considered.</p>
<p>The model introduced in [<xref ref-type="bibr" rid="ref-38">38</xref>] assumes that a fog node can offload a task to a neighboring fog node based on the decision of the SDN controller, which may allow a certain number of tasks to be offloaded while balancing the load between the deployed fog nodes. The solution adopted in [<xref ref-type="bibr" rid="ref-38">38</xref>] relies on Markov Decision Process (MDP) to consider the dynamic behavior of fog nodes as well as the uncertainties in terms of task demands. More specifically, the algorithm presented in [<xref ref-type="bibr" rid="ref-38">38</xref>] is a Quality (Q)-learning algorithm, which has been proposed for solving MDPs that consider dynamically changing task demands. The idea of the proposed algorithm is based on an agent that observes the environment, makes a decision, observes the new state, and then calculates the reward, which is a function of the utility, delay, and overload probability. However, a time complexity analysis of the algorithm was not provided. Although Q-learning algorithms achieve convergence in polynomial time, if the proposed algorithm cannot guarantee convergence time, it cannot be used to offload latency-sensitive tasks.</p>
<p>The authors in [<xref ref-type="bibr" rid="ref-39">39</xref>] proposed a framework for an IoT network that employs FC by adding a layer of fog nodes controlled and managed by a logically decentralized SDN network. Network architecture adopts a three-tier fog SDN-based architecture. However, it is integrated with blockchain technology to incorporate its benefits. The algorithm starts by authenticating an IoT node using a cloud server. The cloud server then starts the address detection process. In this process, ISP refers to an SDN controller that determines the location of the device. The SDN controller builds a routing table with all possible routes between the device and the IoT cloud. Once the best route is determined, data migration between the IoT cloud and the assigned fog node commences. The fog node is also responsible for synchronizing data with the cloud server. The SDN controller, based on a certain set of parameters [<xref ref-type="bibr" rid="ref-39">39</xref>], decides whether to allow offloaded data from fog nodes to be processed at OpenFlow (OF)-switches that have certain computation resources or to be offloaded to a cloud server. However, the allocation policy from fog to OF-switches was not motioned. Furthermore, fog-to-fog offloading was not considered.</p>
<p>In [<xref ref-type="bibr" rid="ref-40">40</xref>], the authors proposed an offloading algorithm for Energy IoT (EIoT) devices in smart grids. The algorithm aims to achieve energy efficiency without violating the delay constraints. EIoT devices offload tasks to fog nodes if they cannot be executed locally because of limited computation or energy resources. Both EIoT devices and fog nodes create preference lists. The EIoT preference list ranks fog nodes, which can be associated with, in descending order, according to the weighted difference between energy efficiency and delay. Similarly, each fog node applies the same procedure to EIoT devices. Fog nodes accept association requests from EIoT devices if the total number of concurrently executed tasks at the fog node does not exceed the maximum limit. Otherwise, the fog nodes use their preference lists to select the more preferable devices without exceeding the maximum number of concurrent tasks. The remaining devices that failed to associate with fog nodes started a new iteration. The process continues until each device is associated with a fog node or until there are no more fog nodes to which to assign devices. In the latter case, fog-to-fog offloading may solve the problem of unassigned requests and balance the network load. However, fog-to-fog offloading was not considered in the proposed service. Moreover, the algorithm only considers transmission and processing delays when computing the delay model.</p>
<p>The authors in [<xref ref-type="bibr" rid="ref-41">41</xref>] introduced an offloading algorithm based on Evolutionary Genetic Algorithm (EGA), which aims to minimize energy consumption in vehicular networks. Fog nodes execute the offloading algorithm to decide whether to offload requests received from vehicular applications to cloud servers or to execute them locally at fog nodes. The algorithm starts by generating several offloading solutions. In each solution, requests were randomly allocated to fog or cloud nodes. Solutions are then evaluated to exclude infeasible solutions according to a fitness function that results in accepting a solution if it does not violate latency constraints and leads to a total energy consumption that is close to the optimal value [<xref ref-type="bibr" rid="ref-41">41</xref>]. Subsequently, a crossover operation is performed to generate offspring solutions that converge to the optimal solution. After crossover, a mutation is performed to avoid converging to local optima. The algorithm terminates when the maximum number of generations is produced or when the target fitness score is attained. However, the distributed execution of the algorithm at each fog server may not lead to a globally optimal solution because fog-to-fog offloading was not considered. Moreover, the triggering event at which the offloading algorithm started to execute was not mentioned.</p>
<p>In [<xref ref-type="bibr" rid="ref-42">42</xref>], the authors proposed fog-assisted data services for n a heterogeneous vehicular communication environment. Four communication types are permitted between network nodes: device-to-cloud, device-to-fog, fog-to-fog, and device-to-device. The bitwise XOR coding technique was used to encode and decode the data packets. The aim is to encode data items that satisfy the maximum number of requests with a minimum delay. To achieve this, the authors proposed a greedy heuristic scheduling algorithm to identify the highest priority clique. The proposed scheduling algorithm has three main phases: initializing the clique, updating the clique, and identifying the clique with maximum priority. The first phase starts with an empty clique, searches the graph to identify the vertex with the maximum priority, and then appends it to the clique. In the second phase, the remaining vertices are traversed to add a maximum degree vertex to the clique. The search is completed when there are no more vertices to be found. After identifying all the cliques in the graph, the maximum priority clique was selected. The SDN controller notifies the cloud node, which in turn responds by encoding the corresponding data items, and then broadcasts the encoded packet. Since device-to-cloud communication is unavoidable, executing latency-sensitive tasks may not be feasible in such architectures. In addition, selecting the highest priority clique may lead to starvation. However, no anti-starvation policy has been mentioned.</p>
<p>An SDN-based offloading policy was presented in [<xref ref-type="bibr" rid="ref-43">43</xref>]. This policy exploited underutilized mobile units and parked vehicles as fog nodes. A variant of the conventional three-tier network architecture was presented. The architecture has three layers: a conventional fog-node layer, an SDN layer, and Offload Destination (OLD) layer. The SDN layer consists of an SDN controller and a set of OF-switches. The OLD layer includes the cloud and mobile fog nodes. To overcome the single point of failure deficiency that originates from using one SDN controller, a local SDN agent is installed at the fog nodes and executes two main control functions. The first control function calculates the time required to fully execute the task, and the second determines the feasibility of the request [<xref ref-type="bibr" rid="ref-43">43</xref>]. An SDN-offloading policy was proposed to select the optimal OLD that can satisfy the request. However, the cost of maintaining a dynamic network topology that includes mobile fog nodes was not addressed. Moreover, using vehicles and mobile devices as fog nodes raises several concerns, such as network and endpoint security, energy consumption, protecting user privacy, and remote management.</p>
<p>In [<xref ref-type="bibr" rid="ref-44">44</xref>], the authors proposed a new dynamic fog-to-fog offloading service. They selected logically centralized, physically distributed SDN-based network architecture. In the network, the SDN controller is responsible for monitoring and collecting the status of network infrastructure elements such as SDN switches and fog nodes, while the fog orchestrator controls the operation of fog nodes. Upon receiving an offloading request from an overloaded fog node, the fog orchestrator starts an offloading service that performs two main tasks. First, a list of node IDs that satisfies the request is created. These nodes are then ranked according to their computation and network capabilities. Finally, the best fog node was assigned as the target offloading node. In the worst-case scenario, nearly all the remaining fog nodes may be on the candidate list. For <italic>m</italic> fog nodes and <italic>n</italic> candidate nodes, the time complexity for selecting the optimal offloading node is <italic>O(n&#x2009;&#x002B;&#x2009;m)</italic>. The authors introduced a threshold value to limit the number of candidate fog nodes, particularly in large networks. However, the authors did not provide criteria for selecting a threshold value. Moreover, no conditions were mentioned regarding the tasks selected for offloading from an overloaded node.</p>
<p>In the fog-based architecture proposed in [<xref ref-type="bibr" rid="ref-45">45</xref>], the fog layer is an ad hoc network. If the queuing waiting time at any fog node exceeds an offloading threshold value, the fog node sends an offloading request to the best neighboring fog node with the minimum value for the summation of queuing and propagation delays. The threshold is dynamically updated based on the node workload and availability of the remaining neighbors. If all neighboring fog nodes are overloaded, the request is sent to the cloud server. The proposed offloading service was applied to urgent and non-urgent tasks. However, priority assigning policies and deadline handling of urgent tasks were not mentioned. In addition, it was not specified if offloading was performed between one or k-hop neighbors. Offloading between one-hop neighbors prevents a balanced workload distribution among all the fog nodes. However, offloading tasks between k-hop distant neighbors involve routing costs.</p>
<p>Fuzzy decision-based task offloading management was proposed in [<xref ref-type="bibr" rid="ref-46">46</xref>]. An orchestrator layer is responsible for executing the fuzzy logic rules to determine the target offloading node, which can be a local edge node, neighboring edge node, or cloud node. The offloading decision was made for each new task created by a user device. The task orchestrator management node is also responsible for sending the task to the selected offloading node, collecting the results after execution, and sending the results back to the local edge node. Hence, the orchestrator node is a bottleneck and may become congested as the number of tasks created increases. Authors in [<xref ref-type="bibr" rid="ref-47">47</xref>] proposed an optimization algorithm for resource allocation and load balancing. In the proposed system architecture, the organizer module decides which tasks are offloaded to which fog nodes. The aim is to achieve load balancing and reduce delays. However, the system lacks scalability because all requests have to be managed through a centralized decision-maker module, which represents a performance bottleneck at high network loads. A summary of the reviewed task offloading algorithms is presented in <xref ref-type="table" rid="table-1">Table 1</xref>.</p>
<table-wrap id="table-1"><label>Table 1</label><caption><title>Summary of reviewed task offloading algorithms</title></caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">Ref.</th>
<th align="left">Offloading decision</th>
<th align="left">Offloading service is triggered</th>
<th align="left">Offloading is performed from</th>
<th align="left">Number of offloaded tasks per request</th>
<th align="left">SDN-based</th>
<th align="left">Application</th>
<th align="left">Main contribution</th>
<th align="left">Main issue which was not considered</th>
<th align="left">Complexity analysis derived</th>
<th align="left">Performance evaluation tool</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">[<xref ref-type="bibr" rid="ref-34">34</xref>]</td>
<td align="left">Centralized</td>
<td align="left">For each new task</td>
<td align="left">-Device-to-fog<break/>-Fog-to-cloud</td>
<td align="left">One</td>
<td align="left">No</td>
<td align="left">General</td>
<td align="left">Load balancing</td>
<td align="left">Scalability</td>
<td align="left">No</td>
<td align="left">Simulation using MATLAB</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="ref-35">35</xref>]</td>
<td align="left">Centralized</td>
<td align="left">For each new task</td>
<td align="left">Device-to-fog</td>
<td align="left">One</td>
<td align="left">No</td>
<td align="left">IIoT</td>
<td align="left">QoS optimization</td>
<td align="left">Overloading</td>
<td align="left">No</td>
<td align="left">Experimental using MPSoC</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="ref-36">36</xref>]</td>
<td align="left">Centralized</td>
<td align="left">For each new task</td>
<td align="left">Device-to-fog</td>
<td align="left">One</td>
<td align="left">Yes</td>
<td align="left">General</td>
<td align="left">QoS optimization</td>
<td align="left">Concurrent tasks</td>
<td align="left">Yes</td>
<td align="left">Simulation using Mininet &#x0026; POX</td>
</tr>
<tr>
<td align="left">&#x00A0;[<xref ref-type="bibr" rid="ref-37">37</xref>]</td>
<td align="left">Distributed</td>
<td align="left">For each task cannot be fully executed locally</td>
<td align="left">Device-to-fog</td>
<td align="left">One</td>
<td align="left">Yes</td>
<td align="left">Vehicular</td>
<td align="left">Partitioning the Execution of a single task on multiple fog-nodes</td>
<td align="left">Cost and feasibility of partitioning data file into the required number of blocks</td>
<td align="left">No</td>
<td align="left">Simulation using Mininet</td>
</tr>
<tr>
<td align="left" rowspan="2">[<xref ref-type="bibr" rid="ref-38">38</xref>]</td>
<td align="left" rowspan="2">Centralized</td>
<td align="left">Policy not mentioned</td>
<td align="left">-Device-to-fog</td>
<td align="left">One</td>
<td align="left" rowspan="2">Yes</td>
<td align="left" rowspan="2">General</td>
<td align="left" rowspan="2">Load balancing</td>
<td align="left" rowspan="2">Execution of latency-sensitive tasks</td>
<td align="left" rowspan="2">No</td>
<td align="left" rowspan="2">Simulation tool not mentioned</td>
</tr>
<tr>
<td align="left">According to states of fog nodes</td>
<td align="left">-Fog-to-Fog</td>
<td align="left">Varies</td>
</tr>
<tr>
<td align="left" rowspan="2">[<xref ref-type="bibr" rid="ref-39">39</xref>]</td>
<td align="left" rowspan="2">Logically distributed</td>
<td align="left">For each new task</td>
<td align="left">Device-to-fog/cloud</td>
<td align="left" rowspan="2">One</td>
<td align="left" rowspan="2">Yes</td>
<td align="left" rowspan="2">IoT</td>
<td align="left" rowspan="2">Reduce data latency</td>
<td align="left" rowspan="2">Fog-to-fog offloading</td>
<td align="left" rowspan="2">No</td>
<td align="left" rowspan="2">Experimental using testbed &#x0026; simulation using iFogSim</td>
</tr>
<tr>
<td align="left">For each task cannot be fully executed</td>
<td align="left">fog-to-Openflow switches/cloud</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="ref-40">40</xref>]</td>
<td align="left">Distributed</td>
<td align="left">For each new task</td>
<td align="left">Device-to-fog</td>
<td align="left">One</td>
<td align="left">No</td>
<td align="left">EIoT</td>
<td align="left">QoS optimization</td>
<td align="left">Overloading</td>
<td align="left">Yes</td>
<td align="left">Simulation using MATLAB</td>
</tr>
<tr>
<td align="left" rowspan="2">[<xref ref-type="bibr" rid="ref-41">41</xref>]</td>
<td align="left" rowspan="2">Distributed</td>
<td align="left">-For each new task</td>
<td align="left">-Device-to-fog</td>
<td align="left" rowspan="2">One</td>
<td align="left" rowspan="2">No</td>
<td align="left" rowspan="2">Vehicular</td>
<td align="left" rowspan="2">Minimize energy consumption</td>
<td align="left" rowspan="2">Fog-to-fog offloading</td>
<td align="left" rowspan="2">No</td>
<td align="left" rowspan="2">Simulation using MATLAB</td>
</tr>
<tr>
<td align="left">-For a set of tasks</td>
<td align="left">-Fog-to-cloud</td>
</tr>
<tr>
<td align="left" rowspan="2">[<xref ref-type="bibr" rid="ref-42">42</xref>]</td>
<td align="left" rowspan="2">Centralized</td>
<td align="left" rowspan="2">For each new task</td>
<td align="left">Device-to-Cloud/fog/<break/>device</td>
<td align="left" rowspan="2">Varies</td>
<td align="left" rowspan="2">Yes</td>
<td align="left" rowspan="2">Vehicular</td>
<td align="left" rowspan="2">Minimize total service delay</td>
<td align="left" rowspan="2">Delay sensitive constraints were not accounted for in computing the priority</td>
<td align="left" rowspan="2">No</td>
<td align="left" rowspan="2">Simulation using MATLAB</td>
</tr>
<tr>
<td align="left">Fog-to-fog/cloud</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="ref-43">43</xref>]</td>
<td align="left">Centralized</td>
<td align="left">For each new task</td>
<td align="left">-Device-to-Fog<break/>-Device-to-Cloud</td>
<td align="left">One</td>
<td align="left">Yes</td>
<td align="left">Vehicular</td>
<td align="left">Minimize total service delay</td>
<td align="left">network and endpoint security, energy consumption, protecting user privacy and remote management</td>
<td align="left">No</td>
<td align="left">Simulation using MATLAB</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="ref-44">44</xref>]</td>
<td align="left">Logically<break/>Centralized</td>
<td align="left">Overloaded node, task unspecified</td>
<td align="left">-Device-to-fog<break/>-Fog-to-fog</td>
<td align="left">Unspecified</td>
<td align="left">Yes</td>
<td align="left">General</td>
<td align="left">Select optimal offloading fog node</td>
<td align="left">What tasks are selected for offloading</td>
<td align="left">Yes</td>
<td align="left">Mininet</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="ref-45">45</xref>]</td>
<td align="left">Centralized</td>
<td align="left">If queuing waiting time at any fog node exceeds an offloading threshold value</td>
<td align="left">-Device-to-fog<break/>-Fog-to-fog</td>
<td align="left">One</td>
<td align="left">No</td>
<td align="left">Vehicular</td>
<td align="left">Dynamically Controlling Offloading Thresholds</td>
<td align="left">Priority assigning policy and deadline handling of urgent tasks</td>
<td align="left">Yes</td>
<td align="left">Simulation using iFogSim</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="ref-46">46</xref>]</td>
<td align="left">Centralized</td>
<td align="left">For each new task</td>
<td align="left">-Device-to-edge<break/>-Device-to-Cloud<break/>-Edge-to-Edge</td>
<td align="left">One</td>
<td align="left">No</td>
<td align="left">General</td>
<td align="left">Select optimal offloading node based on fuzzy logic rules</td>
<td align="left">Scalability since, orchestrator node is a bottleneck</td>
<td align="left">No</td>
<td align="left">Simulation using EdgeCloudSim</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="ref-47">47</xref>]</td>
<td align="left">Centralized</td>
<td align="left">For each new task</td>
<td align="left">Device-to-fog</td>
<td align="left">One</td>
<td align="left">No</td>
<td align="left">Healthcare</td>
<td align="left">Select optimal fog node based on load-balancing algorithm</td>
<td align="left">Scalability because all tasks are offloaded to fog nodes through single organizer module</td>
<td align="left">No</td>
<td align="left">Simulation using iFogSim</td>
</tr>
<tr>
<td align="left">Proposed service</td>
<td align="left">Logically<break/>Centralized</td>
<td align="left">Overloaded node, task offloaded according to type</td>
<td align="left">-Device-to-fog<break/>-Fog-to-fog<break/>-Fog-to-Cloud</td>
<td align="left">-One<break/>-Task set<break/>-Task set</td>
<td align="left">Yes</td>
<td align="left">General</td>
<td align="left">Set task offloading priority, determine the size of offloaded tasks, and minimize the time required to select offloading nodes</td>
<td align="left">mobility-aware task offloading</td>
<td align="left">Yes</td>
<td align="left">Custom simulation tool</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s4"><label>4</label><title>Proposed Service</title>
<p>This section presents the proposed dynamic offloading service. Section 4.1 describes the system model. The proposed offloading algorithms are presented in Section 4.2. Section 4.3 discusses the effect of offloading on task latency and deadline calculations. Section 4.4 discusses complexity analysis.</p>
<sec id="s4_1"><label>4.1</label><title>System Model</title>
<p>The first layer of the proposed network architecture includes smart and IoT devices. In this layer, nodes are connected via wireless or wired links to the fog nodes. The second layer consists of a set of <italic>m</italic> identical fog nodes at both the hardware and software levels. These nodes can be deployed in public areas, such as road networks, industrial zones, and airports, and in private areas, such as smart factories and hospitals. The fog nodes are connected to a set of core SDN switches. The third layer consists of similar SDN controllers that run the same set of applications and provide identical services. Network events received by a controller are flooded to the remaining controllers using the east-west interface. Hence, a global network view is created at each SDN node [<xref ref-type="bibr" rid="ref-26">26</xref>,<xref ref-type="bibr" rid="ref-51">51</xref>], and redundancy and scalability are maintained. The SDN architecture is connected to the cloud via backbone routers. In the SDN-based fog architecture shown in <xref ref-type="fig" rid="fig-1">Fig. 1</xref>, SDN nodes form a fully connected network to share information and distribute workloads. Each controller manages and monitors a set of SDN switches and fog nodes. However, this assignment can change according to network status. The out-of-band control mode is selected to send monitoring and management information, install flow rules in SDN switches, and send offloading decisions to fog nodes via the southbound interface. Open Network Operating System (ONOS) [<xref ref-type="bibr" rid="ref-51">51</xref>] is deployed to support SDN-based fog architecture.</p>
<fig id="fig-1"><label>Figure 1</label><caption><title>SDN-based fog architecture</title></caption><graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_35602-fig-1.tif"/></fig>
<p>Offloading can occur once or twice. The first offloading occurs from device-to-fog. Essentially, tasks are offloaded if they cannot be fully executed at the node that is currently running the task. This occurs when tasks require specific services that cannot be locally satisfied using available resources. However, the device must first send an association request to the nearest fog node. When the association process completes, the end device may offload the task to the fog node. The second offloading occurs from fog-to-fog or fog-to-cloud. The offloading destinations are determined by the SDN controller. If a fog node is overloaded, it sends an offloading request to the SDN controller. Based on the global network view, the controller selects the offloading nodes which can execute the tasks without violating latency constraints. Then, the IDs of the offloading nodes and information about selected routes are sent to the overloaded fog node, which initiates the offloading process.</p>
<p>Two issues must be addressed before presenting the formulation of the problem. The first issue is to determine when a fog node is considered overloaded. The second is to determine the type and number of offloaded tasks. An overloaded server experiences noticeable throughput degradation. Therefore, servers often have threshold monitoring tools that identify performance issues by applying threshold rules that define acceptable system performance. These rules are usually set during system configuration, and the node is considered overloaded if a threshold value is reached. In this study, it is assumed that a fog node is overloaded if any of its resources has reached the threshold value. That is because; a resource is considered performance-critical if it is over-utilized. In addition, the maximum resource utilization ratio represents the fog node utilization. For example, if the Central Processing Unit (CPU), physical memory, and disk utilization are 20&#x0025;, 45&#x0025;, and 10&#x0025;, respectively. Then, the utilization of the fog node is 45&#x0025;, which is the maximum resource utilization value calculated at that node. Hence, if node utilization is <italic>u</italic>, then it is guaranteed that any resource in that node has utilization &#x2264; <italic>u</italic>.</p>
</sec>
<sec id="s4_2"><label>4.2</label><title>The Dynamic Offloading Service</title>
<p>In the proposed service, determining which tasks qualify for offloading depends on the offloading source and destination nodes. For device-to-fog offloading, each task that could not be fully executed at the end device was offloaded to the nearest fog node. Hence, in this case, the number of offloaded tasks per request is one, and offloading is performed for any task type, as shown in Algorithm 1. For fog-to-fog and fog-to-cloud offloading requests, an overloaded fog node <italic>i</italic> is responsible for selecting the type of tasks to be offloaded and sending the list of candidate tasks for offloading <inline-formula id="ieqn-1"><mml:math id="mml-ieqn-1"><mml:msubsup><mml:mrow><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> to the SDN controller. The set of all the tasks running on fog node <italic>i</italic> is <italic>T<sub>i</sub></italic> where <italic>1</italic>&#x2009;&#x2264;&#x2009;<italic>n</italic><inline-formula id="ieqn-2"><mml:math id="mml-ieqn-2"><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mrow><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:msubsup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>&#x2009;&#x003C;&#x2009;<italic>n(T<sub>i</sub>).</italic> The list is sent to the SDN controller, which invokes a dynamic offloading service that selects the offloaded tasks, and assigns them to fog or cloud nodes without violating the latency constraints of those tasks. Additionally, it installs the flow rules in SDN switches based on the optimized route selected according to network status.
</p>
<fig id="fig-6">
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_35602-fig-6.tif"/>
</fig>
<p>The SDN controller has a number of utilization vectors <italic>n</italic>. Each utilization vector <inline-formula id="ieqn-3"><mml:math id="mml-ieqn-3"><mml:mi>U</mml:mi><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> has a certain threshold <inline-formula id="ieqn-4"><mml:math id="mml-ieqn-4"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, where <italic>j&#x2009;&#x003D;&#x2009;0, 1, 2,&#x2026;, n&#x2009;&#x2212;&#x2009;1</italic>. The utilization step <inline-formula id="ieqn-5"><mml:math id="mml-ieqn-5"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> between any two consecutive thresholds is fixed, and the value of <inline-formula id="ieqn-6"><mml:math id="mml-ieqn-6"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is determined as follows.
<disp-formula id="eqn-1"><label>(1)</label><mml:math id="mml-eqn-1" display="block"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-7"><mml:math id="mml-ieqn-7"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:math></inline-formula>. The number of utilization vectors <italic>n</italic> depends on the maximum utilization <inline-formula id="ieqn-8"><mml:math id="mml-ieqn-8"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and the value of <inline-formula id="ieqn-9"><mml:math id="mml-ieqn-9"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> as follows.
<disp-formula id="eqn-2"><label>(2)</label><mml:math id="mml-eqn-2" display="block"><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:mfrac></mml:math></disp-formula></p>
<p>As mentioned in Section 4.1, threshold rules determine system acceptable performance. If the utilization of a fog node exceeds the value of <inline-formula id="ieqn-10"><mml:math id="mml-ieqn-10"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, the node is considered overloaded. During network configuration, the default <inline-formula id="ieqn-11"><mml:math id="mml-ieqn-11"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> value is determined based on normal network load conditions. Fog node <italic>i</italic> sends its resource utilization value <italic>u<sub>i</sub></italic> to the SDN controller. The controller records <italic>u<sub>i</sub></italic> in the fog utilization array <italic>UF</italic>. The ID of fog node <italic>i</italic> is recorded in the corresponding utilization vector<inline-formula id="ieqn-12"><mml:math id="mml-ieqn-12"><mml:mi>U</mml:mi><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, according to the following condition:
<disp-formula id="eqn-3"><label>(3)</label><mml:math id="mml-eqn-3" display="block"><mml:mi>I</mml:mi><mml:msub><mml:mi>D</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2208;</mml:mo><mml:mi>U</mml:mi><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">&#x2194;</mml:mo><mml:mi>U</mml:mi><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>&#x003C;</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2264;</mml:mo><mml:mi>U</mml:mi><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></disp-formula></p>
<p>The controller uses the size of the utilization vectors to monitor the status of the fog nodes and determine the next <inline-formula id="ieqn-13"><mml:math id="mml-ieqn-13"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>value. Because the value of <inline-formula id="ieqn-14"><mml:math id="mml-ieqn-14"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> determines the size of offloaded tasks, it should be adjusted to avoid network congestion. At a high load, many fog nodes can become overloaded. Hence, the default <inline-formula id="ieqn-15"><mml:math id="mml-ieqn-15"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> value may lead to network congestion owing to offloading large amounts of traffic sent from overloaded nodes. In contrast, at low load conditions where few fog nodes are overloaded, raising the value of <inline-formula id="ieqn-16"><mml:math id="mml-ieqn-16"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> reduces the number of offloading requests. The length of the last utilization vector <inline-formula id="ieqn-17"><mml:math id="mml-ieqn-17"><mml:mi>L</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>U</mml:mi><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> and a predetermined factor <italic>f</italic> control the value of the next <inline-formula id="ieqn-18"><mml:math id="mml-ieqn-18"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> as shown in <xref ref-type="disp-formula" rid="eqn-4">Eq. (4)</xref>, where <italic>m</italic> is the number of fog nodes, and <inline-formula id="ieqn-19"><mml:math id="mml-ieqn-19"><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>d</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the number of utilization vectors based on <inline-formula id="ieqn-20"><mml:math id="mml-ieqn-20"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> default value:
<disp-formula id="eqn-4"><label>(4)</label><mml:math id="mml-eqn-4" display="block"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mtext mathvariant="italic">current</mml:mtext></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mi>f</mml:mi></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo><mml:mi>L</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>U</mml:mi><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2265;</mml:mo><mml:mi>m</mml:mi><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>d</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mtext mathvariant="italic">current</mml:mtext></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mn>0</mml:mn><mml:mo>&#x003C;</mml:mo><mml:mi>L</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>U</mml:mi><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x003C;</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mi>m</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>d</mml:mi></mml:mrow></mml:msub></mml:mfrac></mml:mrow></mml:mstyle></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mtext mathvariant="italic">current</mml:mtext></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mo>&#x00D7;</mml:mo><mml:mi>f</mml:mi><mml:mo>,</mml:mo><mml:mi>L</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>U</mml:mi><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mtd></mml:mtr></mml:mtable><mml:mo fence="true" stretchy="true" symmetric="true"></mml:mo></mml:mrow></mml:math></disp-formula></p>
<p>Any fog node that fulfills the condition <italic>u<sub>i</sub></italic>&#x2009;&#x003E;&#x2009;<italic>U<sub>max</sub></italic> is considered overloaded, and it starts to execute the task selection algorithm to determine the number and type of tasks to be offloaded. Assume that application <italic>al</italic> is running on node <italic>i</italic> where <italic>l&#x2009;&#x003D;&#x2009;1, 2, &#x2026;, A<sub>i</sub></italic>, and <italic>A<sub>i</sub></italic> is the total number of applications running on fog node <italic>i</italic>. Application <italic>al</italic> has a number of instances <inline-formula id="ieqn-21"><mml:math id="mml-ieqn-21"><mml:msubsup><mml:mrow><mml:mi>I</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula>. Hence, the task instance utilization <inline-formula id="ieqn-22"><mml:math id="mml-ieqn-22"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> is given in <xref ref-type="disp-formula" rid="eqn-5">Eq. (5)</xref>, and the total utilization <inline-formula id="ieqn-23"><mml:math id="mml-ieqn-23"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula>of each application <italic>a<sub>l</sub></italic> is given in <xref ref-type="disp-formula" rid="eqn-6">Eq. (6)</xref>:
<disp-formula id="eqn-5"><label>(5)</label><mml:math id="mml-eqn-5" display="block"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mo movablelimits="true" form="prefix">max</mml:mo><mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mn>2</mml:mn></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>z</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi>r</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mtext mathvariant="italic">where</mml:mtext></mml:mrow><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mi>I</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup><mml:mo>,</mml:mo></mml:math></disp-formula>
<disp-formula id="eqn-6"><label>(6)</label><mml:math id="mml-eqn-6" display="block"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mo movablelimits="true" form="prefix">max</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:msubsup><mml:mrow><mml:mo>&#x2211;</mml:mo></mml:mrow><mml:mrow><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msubsup><mml:mrow><mml:mi>I</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:msubsup><mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi>r</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mo>&#x2211;</mml:mo></mml:mrow><mml:mrow><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msubsup><mml:mrow><mml:mi>I</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:msubsup><mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mn>2</mml:mn></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi>r</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mo>&#x2211;</mml:mo></mml:mrow><mml:mrow><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msubsup><mml:mrow><mml:mi>I</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:msubsup><mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>z</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi>r</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>,</mml:mo></mml:math></disp-formula>where z is the number of resources at fog node <italic>i</italic> and the value of <inline-formula id="ieqn-24"><mml:math id="mml-ieqn-24"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> is normalized using min-max normalization. <xref ref-type="table" rid="table-2">Table 2</xref> lists the main notations used in this section.</p>
<table-wrap id="table-2"><label>Table 2</label><caption><title>Main notations</title></caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">Symbol</th>
<th align="left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><italic>M</italic></td>
<td>Number of fog-nodes in the network</td>
</tr>
<tr>
<td align="left"><italic>A<sub>i</sub></italic></td>
<td>Number of applications running on fog node <italic>i</italic></td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-25"><mml:math id="mml-ieqn-25"><mml:msubsup><mml:mrow><mml:mi>a</mml:mi></mml:mrow><mml:mrow><mml:mi>l</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td>Application <italic>a<sub>l</sub></italic> running on fog node <italic>i</italic></td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-26"><mml:math id="mml-ieqn-26"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:msubsup><mml:mrow><mml:mi>a</mml:mi></mml:mrow><mml:mrow><mml:mi>l</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>Task instance of <inline-formula id="ieqn-27"><mml:math id="mml-ieqn-27"><mml:msubsup><mml:mrow><mml:mi>a</mml:mi></mml:mrow><mml:mrow><mml:mi>l</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-28"><mml:math id="mml-ieqn-28"><mml:msubsup><mml:mrow><mml:mi>I</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td>Number of instances of application <italic>a<sub>i</sub></italic> running on fog node <italic>i</italic></td>
</tr>
<tr>
<td align="left"><italic>T<sub>i</sub></italic></td>
<td>Set of all tasks at fog node <italic>i</italic></td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-29"><mml:math id="mml-ieqn-29"><mml:msubsup><mml:mrow><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td>set of candidate tasks for offloading running on fog node <italic>i</italic></td>
</tr>
<tr>
<td align="left"><italic>u<sub>i</sub></italic></td>
<td>Utilization of fog node <italic>i</italic></td>
</tr>
<tr>
<td align="left"><italic>N</italic></td>
<td>Number of utilization vectors</td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-30"><mml:math id="mml-ieqn-30"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>Utilization threshold, where <italic>j&#x2009;&#x003D;&#x2009;0, 1, .., n&#x2212;1</italic></td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-31"><mml:math id="mml-ieqn-31"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>Utilization step between any two consecutive utilization thresholds</td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-32"><mml:math id="mml-ieqn-32"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>Maximum utilization for any fog node</td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-33"><mml:math id="mml-ieqn-33"><mml:mi>U</mml:mi><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>Utilization vector of <italic>U<sub>j</sub></italic></td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-34"><mml:math id="mml-ieqn-34"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td>Task instance utilization at fog node <italic>i</italic></td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-35"><mml:math id="mml-ieqn-35"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td>Total utilization of application <italic>a<sub>l</sub></italic></td>
</tr>
<tr>
<td align="left"><italic>Z</italic></td>
<td>Number of resources at fog node <italic>i</italic></td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-36"><mml:math id="mml-ieqn-36"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>z</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td>Total utilization of resource <italic>R<sub>z</sub></italic> at fog node <italic>i</italic></td>
</tr>
<tr>
<td align="left"><italic>UF</italic></td>
<td>Fog utilization array</td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-37"><mml:math id="mml-ieqn-37"><mml:mi>L</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>U</mml:mi><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula></td>
<td>Length of the last utilization vector</td>
</tr>
<tr>
<td align="left"><italic>OLTS<sub>i</sub></italic></td>
<td>Offloaded task set for fog node <italic>i</italic></td>
</tr>
<tr>
<td align="left"><italic>OLFS<sub>i</sub></italic></td>
<td>Offloading fog set for fog node <italic>i</italic></td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-38"><mml:math id="mml-ieqn-38"><mml:mi>L</mml:mi><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:msubsup><mml:mrow><mml:mi>a</mml:mi></mml:mrow><mml:mrow><mml:mi>l</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>Maximum allowed latency of <inline-formula id="ieqn-39"><mml:math id="mml-ieqn-39"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:msubsup><mml:mrow><mml:mi>a</mml:mi></mml:mrow><mml:mrow><mml:mi>l</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:msub></mml:math></inline-formula></td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-40"><mml:math id="mml-ieqn-40"><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>Latency of route c from best route matrix</td>
</tr>
<tr>
<td align="left"><inline-formula id="ieqn-41"><mml:math id="mml-ieqn-41"><mml:mi>B</mml:mi><mml:mi>R</mml:mi><mml:msub><mml:mi>M</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>Best-route matrix for fog node <italic>i</italic></td>
</tr>
<tr>
<td align="left"/>
<td align="left"/>
</tr>
</tbody>
</table>
</table-wrap>
<p>Each fog node has three task vectors that are continuously maintained. The first task vector <italic>V<sub>1</sub></italic> has the task ID and <inline-formula id="ieqn-42"><mml:math id="mml-ieqn-42"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> of latency-tolerant tasks such as file storage, file management, and environmental monitoring tasks. In this vector, tasks are ranked according to the value of<inline-formula id="ieqn-43"><mml:math id="mml-ieqn-43"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup><mml:mo>.</mml:mo></mml:math></inline-formula> Tasks in the second and third vectors are ranked according to the value of latency. The second vector <italic>V<sub>2</sub></italic> has the task ID, value of<inline-formula id="ieqn-44"><mml:math id="mml-ieqn-44"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula>, and latency of delay-sensitive non-urgent tasks such as video streaming and online gaming tasks. The third vector <italic>V<sub>3</sub></italic> has the task ID, value of<inline-formula id="ieqn-45"><mml:math id="mml-ieqn-45"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula>, and latency of delay-sensitive hard deadline tasks such as autonomous driving tasks. All vectors are ranked in descending order, as shown in Algorithm 2.
</p>
<fig id="fig-7">
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_35602-fig-7.tif"/>
</fig>
<p>Once a fog node enters an overloaded state (<italic>u<sub>i</sub></italic>&#x2009;&#x003E;&#x2009;<italic>U<sub>max</sub></italic>), it sends an offloading request to the SDN controller. There are three types of offloading requests. The first type is fog-to-cloud offloading. It is the only allowed type of offloading in an overloaded fog node if the length of <italic>V<sub>1</sub>&#x2009;&#x2260;&#x2009;0</italic>. In this case, the SDN controller optimizes a route between the fog node and the backbone router then the offloading process commences, as shown in Algorithm 3 (Fog-to-Cloud Offloading FCO). Then, <italic>V<sub>1</sub></italic> is updated. If <italic>u<sub>i</sub>&#x2009;&#x003E;&#x2009;U<sub>max</sub></italic> and <italic>V<sub>1</sub></italic> is empty, the second type of offloading (i.e., Utilization-based Fog-to-Fog Offloading UFFO) is activated. The request holds an ordered list according to the latency of all candidates in <italic>V<sub>2</sub></italic>. Similarly, if the lengths of <italic>V<sub>1</sub></italic> and <italic>V<sub>2</sub></italic> are equal to zero, all tasks in the overloaded node are critical and latency-sensitive tasks. Hence, the third type of offloading (i.e., Latency-based Fog-to-Fog Offloading LFFO) is activated.
</p>
<fig id="fig-8">
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_35602-fig-8.tif"/>
</fig>
<p>In the proposed network architecture, the SDN controller determines the best route, according to the target metric, from each fog node as the source node to every other node as a possible destination in the network. For each fog node, the SDN controller creates a Best-Route Matrix (BRM), as shown in Algorithm 4, which stores information about routes as follows.
<list list-type="bullet">
<list-item><p>For a fog node <italic>i</italic>, each row in the matrix has four elements:
<list list-type="bullet">
<list-item><p>The ID of the destination fog node.</p></list-item>
<list-item><p>The total transmission and propagation delays along the selected route Lc.</p></list-item>
<list-item><p>The hop count</p></list-item>
</list></p></list-item>
<list-item><p>Elements of the matrix are arranged in ascending order according to the value of latency.</p></list-item>
<list-item><p>In the case of a tie, the hop count is used to break the tie. If it still holds, the lowest node ID breaks the tie.</p></list-item>
</list></p>
<p>Once the SDN controller receives a fog-to-fog offloading request and <italic>V<sub>2</sub></italic> is not empty, it executes a greedy heuristic offloading algorithm that allocates the offloaded tasks to the best utilization fog nodes that do not violate latency constraints, as shown in Algorithm 5 (UFFO algorithm). The proposed algorithm returns two values. The first is the offloaded task set <inline-formula id="ieqn-57"><mml:math id="mml-ieqn-57"><mml:mi>O</mml:mi><mml:mi>L</mml:mi><mml:mi>T</mml:mi><mml:msub><mml:mi>S</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, and the second is the offloading node set <inline-formula id="ieqn-58"><mml:math id="mml-ieqn-58"><mml:mi>O</mml:mi><mml:mi>L</mml:mi><mml:mi>F</mml:mi><mml:msub><mml:mi>S</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. At the start of execution, <inline-formula id="ieqn-59"><mml:math id="mml-ieqn-59"><mml:mi>O</mml:mi><mml:mi>L</mml:mi><mml:mi>T</mml:mi><mml:msub><mml:mi>S</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-60"><mml:math id="mml-ieqn-60"><mml:mi>O</mml:mi><mml:mi>L</mml:mi><mml:mi>F</mml:mi><mml:msub><mml:mi>S</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> are empty. As long as the latency condition in line 4 holds true, the best utilization node is selected as per lines 5&#x2013;8. If the utilization condition in line 15 holds, then the corresponding entities from lines 16 to 18 are updated. The process terminates if the condition in line 22 holds or if the end of the task list is reached.
</p>
<fig id="fig-9">
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_35602-fig-9.tif"/>
</fig>
<fig id="fig-10">
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_35602-fig-10.tif"/>
</fig>
<p>Algorithm 6 (LFFO algorithm) starts by initializing the offloaded task set <inline-formula id="ieqn-88"><mml:math id="mml-ieqn-88"><mml:mrow><mml:mi mathvariant="bold-italic">O</mml:mi><mml:mi mathvariant="bold-italic">L</mml:mi><mml:mi mathvariant="bold-italic">T</mml:mi></mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">S</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and the offloading node set<inline-formula id="ieqn-89"><mml:math id="mml-ieqn-89"><mml:mrow><mml:mi mathvariant="bold-italic">O</mml:mi><mml:mi mathvariant="bold-italic">L</mml:mi><mml:mi mathvariant="bold-italic">F</mml:mi></mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">S</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. To add task instances in <inline-formula id="ieqn-90"><mml:math id="mml-ieqn-90"><mml:mrow><mml:mi mathvariant="bold-italic">O</mml:mi><mml:mi mathvariant="bold-italic">L</mml:mi><mml:mi mathvariant="bold-italic">T</mml:mi></mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">S</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, the algorithm identifies which tasks from the set of candidates can be offloaded without violating latency constraints. The algorithm compares the maximum allowed latency of the task with the latency recorded in <inline-formula id="ieqn-91"><mml:math id="mml-ieqn-91"><mml:mrow><mml:mi mathvariant="bold-italic">B</mml:mi><mml:mi mathvariant="bold-italic">R</mml:mi></mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">M</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. If <inline-formula id="ieqn-92"><mml:math id="mml-ieqn-92"><mml:mi mathvariant="bold-italic">L</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">t</mml:mi><mml:mrow><mml:msubsup><mml:mrow><mml:mi mathvariant="bold-italic">a</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="bold-italic">l</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="bold-italic">i</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:msub><mml:mo>&#x003E;</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">L</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">c</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, then the task may be offloaded. If the utilization condition in line 6 holds, then <inline-formula id="ieqn-93"><mml:math id="mml-ieqn-93"><mml:mrow><mml:mi mathvariant="bold-italic">O</mml:mi><mml:mi mathvariant="bold-italic">L</mml:mi><mml:mi mathvariant="bold-italic">F</mml:mi></mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">S</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is updated with the ID of the offloading fog node and task instances are added to<inline-formula id="ieqn-94"><mml:math id="mml-ieqn-94"><mml:mrow><mml:mi mathvariant="bold-italic">O</mml:mi><mml:mi mathvariant="bold-italic">L</mml:mi><mml:mi mathvariant="bold-italic">T</mml:mi></mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">S</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. Otherwise, the next<inline-formula id="ieqn-95"><mml:math id="mml-ieqn-95"><mml:msub><mml:mi mathvariant="bold-italic">L</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">c</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is checked. Because the first row <inline-formula id="ieqn-96"><mml:math id="mml-ieqn-96"><mml:mrow><mml:mi mathvariant="bold-italic">B</mml:mi><mml:mi mathvariant="bold-italic">R</mml:mi></mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">M</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> has the lowest latency, and the first task instance in the offloading request has the highest maximum latency, if the latency condition as per line 4 in LFFO fails, no tasks can be offloaded from that fog node and the comparison stops because all subsequent route latencies are higher than<inline-formula id="ieqn-97"><mml:math id="mml-ieqn-97"><mml:mi mathvariant="bold-italic">L</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">t</mml:mi><mml:mrow><mml:msubsup><mml:mrow><mml:mi mathvariant="bold-italic">a</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="bold-italic">l</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="bold-italic">i</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:msub></mml:math></inline-formula>. If the utilization condition in line 6 does not hold, the latency condition is checked for the next entry in <inline-formula id="ieqn-98"><mml:math id="mml-ieqn-98"><mml:mrow><mml:mi mathvariant="bold-italic">B</mml:mi><mml:mi mathvariant="bold-italic">R</mml:mi></mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">M</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>.</p>
<p>For both algorithms UFFO and LFFO, if <inline-formula id="ieqn-99"><mml:math id="mml-ieqn-99"><mml:mo>&#x2211;</mml:mo><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup><mml:mo>&#x003C;</mml:mo><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> the next task candidate is checked and <inline-formula id="ieqn-100"><mml:math id="mml-ieqn-100"><mml:mi>O</mml:mi><mml:mi>L</mml:mi><mml:mi>T</mml:mi><mml:msub><mml:mi>S</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-101"><mml:math id="mml-ieqn-101"><mml:mi>O</mml:mi><mml:mi>L</mml:mi><mml:mi>F</mml:mi><mml:msub><mml:mi>S</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> are updated until<inline-formula id="ieqn-102"><mml:math id="mml-ieqn-102"><mml:mo>&#x2211;</mml:mo><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup><mml:mo>&#x2265;</mml:mo><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> or the end of the offloading candidate list is reached. The values of <inline-formula id="ieqn-103"><mml:math id="mml-ieqn-103"><mml:mi>O</mml:mi><mml:mi>L</mml:mi><mml:mi>T</mml:mi><mml:msub><mml:mi>S</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-104"><mml:math id="mml-ieqn-104"><mml:mi>O</mml:mi><mml:mi>L</mml:mi><mml:mi>F</mml:mi><mml:msub><mml:mi>S</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and the information about optimized routes are sent to the overloaded node to start the offloading process.
</p>
<fig id="fig-11">
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_35602-fig-11.tif"/>
</fig>
</sec>
<sec id="s4_3"><label>4.3</label><title>Computing Task Latency and Deadline</title>
<p>The service discipline is performed using the preemptive Earliest Deadline First (EDF) algorithm, which assigns dynamic priorities to tasks according to their deadlines. The queuing model at the&#x00A0;fog node is an M/G/1/./EDF queue which was presented in [<xref ref-type="bibr" rid="ref-52">52</xref>]. Hence, when a task that has the nearest deadline arrives at the ready queue, it is assigned the highest priority and preempts the currently executing task. It has been proven that under normal operating conditions (i.e., when a fog node is not overloaded), EDF is an optimal scheduling algorithm for real-time independent tasks [<xref ref-type="bibr" rid="ref-52">52</xref>,<xref ref-type="bibr" rid="ref-53">53</xref>]. However, offloading a task from one node to another requires recalculations of deadlines. That compensates for the time consumed in the transmission and propagation delays. Consider the following example in <xref ref-type="fig" rid="fig-2">Fig. 2</xref>, a task with a total of 10&#x2005;ms of computation time has arrived at the ready queue of an end device at 100&#x2005;ms. It was executed for 2&#x2005;ms at the end device and then offloaded to an overloaded fog node and waited in the queue for 1&#x2005;ms.</p>
<fig id="fig-2"><label>Figure 2</label><caption><title>Deadline recalculation example</title></caption><graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_35602-fig-2.tif"/></fig>
<p>Subsequently, it was offloaded again to Node B to complete the remaining 8&#x2005;ms of its execution time. However, transmission and propagation delays were not considered. Assume that Node B finished task execution after 190&#x2005;ms (i.e., before the deadline). However, the result still needs 35&#x2005;ms to return to the end device. It would arrive at 225&#x2005;ms; hence, the task misses the deadline. To rectify this, the deadlines must be recalculated before the task is offloaded. In the same example, the deadline at Node A should be no more than 193&#x2005;ms and at Node B no more than 162&#x2005;ms. Accordingly, during the first offloading, the end device recalculates the deadline before offloading the task. For the second offloading, the SDN controller recalculates the deadline by subtracting the latency from Node A to B, which consists of transmission and propagation latencies in addition to the time consumed in executing the offloading algorithm. As mentioned in Section 4.1, the network architecture has identical fog nodes; hence, the processing delay is the same for all the nodes.</p>
</sec>
<sec id="s4_4"><label>4.4</label><title>Complexity Analysis</title>
<p>The SDN controller executes Algorithm 4 when the network status changes. That may occur because of changes in the device or network configuration: a network link is down, device failure, or network congestion. The worst time complexity of the algorithm is <inline-formula id="ieqn-119"><mml:math id="mml-ieqn-119"><mml:mi>O</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>m</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mn>1</mml:mn><mml:mo>+</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>g</mml:mi><mml:mi>m</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. The worst time complexity of the FCO algorithm is <inline-formula id="ieqn-120"><mml:math id="mml-ieqn-120"><mml:mi>O</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>A</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, where<inline-formula id="ieqn-121"><mml:math id="mml-ieqn-121"><mml:msub><mml:mi>A</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the number of running applications in fog node <italic>i</italic>. Assume that the best utilization node is the last node in BRMi. Accordingly, the worst time complexity of the UFFO algorithm is<inline-formula id="ieqn-122"><mml:math id="mml-ieqn-122"><mml:mi>O</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mrow><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:msubsup><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2217;</mml:mo><mml:mi>m</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, where <inline-formula id="ieqn-123"><mml:math id="mml-ieqn-123"><mml:mi>n</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mrow><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:msubsup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is the number of candidate tasks for offloading. The worst-case scenario of the LFFO algorithm assumes that the first half of the fog nodes in <inline-formula id="ieqn-124"><mml:math id="mml-ieqn-124"><mml:mi>B</mml:mi><mml:mi>R</mml:mi><mml:msub><mml:mi>M</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> are overloaded and that all elements in <inline-formula id="ieqn-125"><mml:math id="mml-ieqn-125"><mml:mi>B</mml:mi><mml:mi>R</mml:mi><mml:msub><mml:mi>M</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> do not violate the latency condition. Hence, the worst time complexity is <inline-formula id="ieqn-126"><mml:math id="mml-ieqn-126"><mml:mi>O</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mrow><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:msubsup><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2217;</mml:mo><mml:mi>m</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>.</p>
</sec>
</sec>
<sec id="s5"><label>5</label><title>Performance Evaluations</title>
<p>The performance evaluations were performed using Apache NetBeans [<xref ref-type="bibr" rid="ref-54">54</xref>]. The offloading algorithms were written in Java. The custom simulator built in [<xref ref-type="bibr" rid="ref-55">55</xref>] was updated to include the fog and SDN layers. The fog layer has three sizes: 16, 32, and 64 nodes. For the three fog layer sizes, three network dimensions were selected (200&#x2005;m&#x2009;<inline-formula id="ieqn-127"><mml:math id="mml-ieqn-127"><mml:mo>&#x00D7;</mml:mo></mml:math></inline-formula>&#x2009;200&#x2005;m, 400&#x2005;m&#x2009;<inline-formula id="ieqn-128"><mml:math id="mml-ieqn-128"><mml:mo>&#x00D7;</mml:mo></mml:math></inline-formula>&#x2009;400&#x2005;m, and 800&#x2005;m&#x2009;<inline-formula id="ieqn-129"><mml:math id="mml-ieqn-129"><mml:mo>&#x00D7;</mml:mo></mml:math></inline-formula>&#x2009;800&#x2005;m). The numbers of end devices associated with 16, 32, and 64 fog nodes are 400, 800, and 1600 devices, respectively. The mobility mode for end devices was disabled, and transmission ranges were: 40, 60, 80, and 100&#x2005;m. The SDN network was simulated as a binary tree network in which 16, 32, and 64 fog nodes are connected to sets of 15, 31, or 63 OF-switches, respectively. The root switch was connected to the SDN controller. The tasks were created using a traffic generator. Then, they are randomly assigned to end devices, which offload those tasks to fog nodes. The physical server that ran the simulation had four cores and eight virtual threads with 16&#x2005;GB of RAM.</p>
<sec id="s5_1"><label>5.1</label><title>Simulation Setup</title>
<p>The task type and required resources (i.e., CPU, memory, disk, and bandwidth) were randomly assigned for each task. However, when evaluating the impact of offloading on a certain performance metric, task type distribution can be biased. The proposed algorithms were compared with the Dynamic Fog-to-Fog (DF2F) offloading algorithm presented in [<xref ref-type="bibr" rid="ref-44">44</xref>]. The average simulation results were based on 20 executions for each algorithm for each network size. Because DF2F did not specify the selection methodology of offloaded tasks, all compared algorithms used one task instance per application. The values of simulation parameters are listed in <xref ref-type="table" rid="table-3">Table 3</xref>.</p>
<table-wrap id="table-3"><label>Table 3</label><caption><title>Values of simulation parameters</title></caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th align="left">Parameter</th>
<th align="center">Value</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Number of fog-nodes in the network</td>
<td align="center">16, 32 and 64 nodes</td>
</tr>
<tr>
<td align="left">Number of SDN switches</td>
<td align="center">15, 31 and 63 switches</td>
</tr>
<tr>
<td align="left">CPU utilization range</td>
<td align="center">0.25&#x2013;0.8</td>
</tr>
<tr>
<td align="left">Memory utilization range</td>
<td align="center">0.25&#x2013;0.8</td>
</tr>
<tr>
<td align="left">Bandwidth range</td>
<td align="center">15&#x2013;50&#x2005;Mbps</td>
</tr>
<tr>
<td align="left">Server to switch latency</td>
<td align="center">2&#x2005;ms</td>
</tr>
<tr>
<td align="left">Switch to switch latency</td>
<td align="center">1&#x2005;ms</td>
</tr>
<tr>
<td align="left">End device to fog server latency</td>
<td align="center">1&#x2005;ms</td>
</tr>
<tr>
<td align="left">Latency of <italic>V<sub>1</sub></italic> tasks</td>
<td align="center">No limits assigned</td>
</tr>
<tr>
<td align="left">Latency of <italic>V<sub>2</sub></italic> tasks</td>
<td align="center">50&#x2013;300&#x2005;ms</td>
</tr>
<tr>
<td align="left">Latency of <italic>V<sub>3</sub></italic> tasks</td>
<td align="center">50&#x2013;100&#x2005;ms</td>
</tr>
<tr>
<td align="left">Task arrival rate according to the number of fog nodes</td>
<td align="center">(200, 400, 800) task/s for (16, 32, 64) fog nodes</td>
</tr>
<tr>
<td align="left"><italic>U<sub>s(Default)</sub></italic></td>
<td align="center">0.2</td>
</tr>
<tr>
<td align="left"><italic>F</italic></td>
<td align="center">2</td>
</tr>
<tr>
<td align="left"><italic>U<sub>max</sub></italic></td>
<td align="center">0.8</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Because no delay is assigned to latency-tolerant tasks, all the required resources for these tasks can be selected randomly. The ranges used in the simulation were 1&#x0025;&#x2013;10&#x0025; of the CPU time, 10&#x2013;300&#x2005;MB of memory, and 15&#x2013;50&#x2005;Mbps of required bandwidth. The corresponding values for latency-sensitive non-urgent tasks were as follows: from 0.1&#x0025; to 2&#x0025; of CPU time and from 1 to 100&#x2005;MB of memory size. For latency-sensitive urgent tasks, the values range from 0.1&#x0025; to 0.5&#x0025; of the CPU time and from 1 to 50&#x2005;MB of memory. The required bandwidth for latency-sensitive tasks was computed according to the assigned latency. If the value exceeded the bandwidth range (i.e., from 15 to 50&#x2005;Mbps), task CPU time and memory size were reselected.</p>
</sec>
<sec id="s5_2"><label>5.2</label><title>Results and Discussion</title>
<p>The comparison with DF2F was performed for fog-to-fog requests because fog-to-cloud offloading was not addressed in [<xref ref-type="bibr" rid="ref-44">44</xref>]. For the proposed algorithms, <inline-formula id="ieqn-130"><mml:math id="mml-ieqn-130"><mml:msubsup><mml:mrow><mml:mi mathvariant="bold-italic">U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">a</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">l</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">r</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="bold-italic">i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> for each task was computed based on the required resources. The value of <italic>u<sub>i</sub></italic> is calculated based on the resource consumption of all tasks at fog node <italic>i</italic>. The average time required to select an offloading node was improved by 33.34&#x0025; when compared to DF2F, as shown in <xref ref-type="fig" rid="fig-3">Fig. 3a</xref>. For the three proposed algorithms, increasing the number of nodes increased the selection interval, as shown in <xref ref-type="fig" rid="fig-3">Fig. 3b</xref>.</p>
<fig id="fig-3"><label>Figure 3</label><caption><title>Average time required to select an offloading node</title></caption><graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_35602-fig-3.tif"/></fig>
<p>The proposed algorithms outperformed the offloading node selection time achieved by DF2F for two main reasons. First, for every offloading request, the DF2F algorithm executes two main functions. The first function finds all available nodes that can satisfy the offloading request. The output of the first function is the input for the second function, which selects the node with the highest final resource score [<xref ref-type="bibr" rid="ref-44">44</xref>]. As mentioned in Section 3, the time complexity for offloading a task using DF2F is<inline-formula id="ieqn-131"><mml:math id="mml-ieqn-131"><mml:mi>O</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mi>m</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. However, the time complexity of UFFO or LFFO is <inline-formula id="ieqn-132"><mml:math id="mml-ieqn-132"><mml:mi>O</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>m</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> when one task is offloaded per request, as in DF2F. Second, to compute the final resource score in DF2F, the second function calculates the individual score for each resource in each fog node in the list of available nodes. Thus, the optimal offloading node is determined. Each offloading request requires the computation of the final resource score before selecting the node with the highest score. Hence, the algorithm adopts a sequential execution. However, in the proposed service, it is assumed that all fog nodes are identical. Hence, the resource requirements of a task at any fog node are the same. The service selects optimal tasks for offloading according to their type and latency constraints. The selection of offloading node is determined based on the offloading service type. In the UFFO algorithm, the optimal offloading node is the node with the lowest utilization value that does not violate the latency constraints of the task. In the LFFO algorithm, the optimal offloading node is the one that has the lowest route latency, which does not violate utilization constraints. In both algorithms, no calculations are performed on individual resources. Both algorithms used the available data in the <italic>UF</italic> and <inline-formula id="ieqn-133"><mml:math id="mml-ieqn-133"><mml:mi>B</mml:mi><mml:mi>R</mml:mi><mml:msub><mml:mi>M</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> matrices. Because of the SDN centralized architecture that supports the global network view, these matrices are updated continuously regardless of the presence of offloading requests.</p>
<p><xref ref-type="fig" rid="fig-4">Figs. 4a</xref> and <xref ref-type="fig" rid="fig-4">4c</xref> show utilization snapshots of two 32-fog node networks before offloading starts. The main requirement is to evaluate the impact of offloading on the fairness of utilization distribution for fog nodes. <xref ref-type="fig" rid="fig-4">Fig. 4b</xref> shows the utilization after performing fog-to-fog offloading for latency-sensitive non-urgent tasks. Nodes with high utilization but not yet overloaded are grey-colored, as shown in <xref ref-type="fig" rid="fig-4">Figs. 4a</xref> and <xref ref-type="fig" rid="fig-4">4b</xref>. These were not selected to be offloading destinations. Except for these nodes, the utilization of nodes converges to be a uniform distribution. <xref ref-type="fig" rid="fig-4">Fig. 4d</xref> shows the utilization of fog nodes for latency-sensitive urgent tasks after executing the LFFO algorithm. The utilization of Node 1 changed from 29&#x0025; to 74&#x0025; because it offered the best latency to Nodes 4 and 5. However, offloading tasks from Node 5 to Node 6 was avoided because the best latency route may not be the one with the shortest hop count.</p>
<fig id="fig-4"><label>Figure 4</label><caption><title>Utilization snapshot comparison (a) utilization of fog nodes before offloading, (b) utilization of fog nodes after executing UFFO, (c) utilization of fog nodes before offloading, (d) utilization of fog nodes after executing LFFO</title></caption><graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_35602-fig-4.tif"/></fig>
<p>The distribution of the average hop distance between overloaded and offloading nodes is shown in <xref ref-type="fig" rid="fig-5">Fig. 5</xref>. A comparison of the average hop distance between LFFO and DF2F algorithms is shown in <xref ref-type="fig" rid="fig-5">Fig. 5a</xref>. In both algorithms, most offloading nodes are selected from the set of neighbors three hops away from the overloaded node. As depicted in <xref ref-type="fig" rid="fig-5">Fig. 5b</xref>, the average hop distance distribution has a descending pattern regardless of the network size. Fog nodes three hops away from the overloaded nodes have the highest ratio of assigned offloading requests. The average hop distance ratio decreases as the hop count increases because the LFFO algorithm selects offloading nodes with the lowest latency. A fog node is selected if all fog nodes at smaller hop distances cannot satisfy the request. However, the distribution of hop distance has an opposite pattern for nodes with one and three hop counts. That is greatly affected by the binary tree architecture because the number of possible offloading nodes doubles as the test for these nodes moves up one level in the tree. That doubles the probability of choosing an offloading node at the current level if no offloading nodes are selected in the previous level. For example, in a 16-fog node network, assume that Node 7 is overloaded. If Node 8 is not selected as an offloading node, the probability that one of the Nodes 5 or 6 is selected doubles. However, this probability is reduced to half of its value each time the network size doubles. That explains the gradual increase in the ratio of offloading nodes selected from the set of nearest neighbors.</p>
<fig id="fig-5"><label>Figure 5</label><caption><title>The distribution of average hop distance between overloaded and offloading nodes; (a) The distribution of average hop distance comparison between DF2F and LFFO; (b) The distribution of average hop distance comparison of LFFO algorithm for 16, 32, and 64 fog nodes</title></caption><graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_35602-fig-5.tif"/></fig>
<p>As previously mentioned in Section 1, the four main questions that govern the design of offloading algorithms shall be addressed during the design of the offloading service. The proposed dynamic offloading service answered these questions as follows.
<list list-type="bullet">
<list-item><p>Tasks selected for offloading are determined based on their types. The selection of tasks and offloading type is determined according to data stored in <italic>V<sub>1</sub></italic>, <italic>V<sub>2</sub></italic> and <italic>V<sub>3</sub></italic>.</p></list-item>
<list-item><p>The number of offloaded tasks depends on the value of <italic>U<sub>s</sub></italic>, which is determined using <xref ref-type="disp-formula" rid="eqn-4">Eq. (4)</xref>, and the value of <inline-formula id="ieqn-134"><mml:math id="mml-ieqn-134"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula>, for the FCO algorithm, or the value of <inline-formula id="ieqn-135"><mml:math id="mml-ieqn-135"><mml:msubsup><mml:mrow><mml:mi>U</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>l</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula>, for Algorithms UFFO and LFFO.</p></list-item>
<list-item><p>The selection of offloading fog nodes was based on the type of offloading service provided by FCO, UFFO, or LFFO algorithms. FCO offloads tasks to cloud nodes, whereas algorithms UFFO and LFFO select offloading fog nodes, as mentioned earlier.</p></list-item>
<list-item><p>The number of offloading nodes varied according to the offloading algorithm. FCO does not determine the number of offloading nodes because it is beyond the scope of this study because all offloaded tasks are assigned to cloud servers according to allocation decisions determined by the cloud resource allocation scheduler. In algorithms UFFO and LFFO, the number of offloading nodes is determined according to the utilization of fog nodes and the value of <italic>U<sub>s</sub></italic>.</p></list-item>
</list></p>
</sec>
</sec>
<sec id="s6"><label>6</label><title>Conclusion and Future Work</title>
<p>This paper proposes three offloading algorithms, each of which targets a specific type of task. FCO algorithm offloads latency-tolerant tasks from an overloaded fog node to the cloud server. The UFFO algorithm selects offloading nodes for non-urgent latency-sensitive tasks. The LFFO algorithm determines offloading nodes for latency-sensitive urgent tasks. Candidate tasks for offloading are selected by the overloaded node; subsequently, the offloading request is sent to the SDN controller. The main motivation behind this approach is to increase the interval in which a fog node remains in the non-overloaded state. This is achieved by determining the maximum number of tasks that can be offloaded without causing network congestion. The highest offloading priority is given to latency-tolerant tasks, while latency-sensitive urgent tasks get the lowest offloading priority. The participation of fog nodes and SDN controllers in choosing offloaded tasks reduces the time required to select offloading nodes by 33&#x0025;. However, the effect of mobility on the proposed service was not considered. It is assumed that end devices remain associated with the same fog node during the entire interval of task execution. Hence, in the future, we will consider developing a mobility-aware task offloading algorithm in a clustered SDN-based FC network. In addition, developing an energy consumption optimization approach that allocates energy based on the task type, level of importance, and latency constraints, will also be considered.</p>
</sec>
</body>
<back>
<ack>
<p>The authors would like to thank the support of the <funding-source>Deanship of Scientific Research at Princess Nourah bint Abdulrahman University</funding-source>. This research project was funded by the <funding-source>Deanship of Scientific Research, Princess Nourah bint Abdulrahman University</funding-source>, through the Program of Research Funding after Publication, Grant No. (<award-id>PRFA&#x2013;P&#x2013;42&#x2013;10</award-id>).</p>
</ack>
<sec><title>Funding Statement</title>
<p>This research project was funded by the Deanship of Scientific Research, Princess Nourah bint Abdulrahman University, through the Program of Research Funding after Publication, Grant No. (PRFA&#x2013;P&#x2013;42&#x2013;10).</p></sec>
<sec sec-type="COI-statement"><title>Conflicts of Interest</title>
<p>The authors declare that they have no conflicts of interest to report regarding the present study.</p></sec>
<ref-list content-type="authoryear"><title>References</title>
<ref id="ref-1"><label>[1]</label><mixed-citation publication-type="other">&#x201C;<article-title>Cisco annual Internet report (2018&#x2013;2023) white paper</article-title>,&#x201D; Cisco, <year>2020</year>. [Online]. Available: <ext-link ext-link-type="uri" xlink:href="https://www.cisco.com/c/en/us/solutions/collateral/executive-perspectives/annual-internet-report/white-paper-c11-741490.html">https://www.cisco.com/c/en/us/solutions/collateral/executive-perspectives/annual-internet-report/white-paper-c11-741490.html</ext-link>.</mixed-citation></ref>
<ref id="ref-2"><label>[2]</label><mixed-citation publication-type="other">&#x201C;<article-title>Redefine connectivity by building a network to support the Internet of things</article-title>,&#x201D; Cisco-Colt, <year>2019</year>. [Online]. Available: <ext-link ext-link-type="uri" xlink:href="https://www.cisco.com/c/dam/en/us/solutions/service-provider/pdfs/a-network-to-support-iot.pdf">https://www.cisco.com/c/dam/en/us/solutions/service-provider/pdfs/a-network-to-support-iot.pdf</ext-link>.</mixed-citation></ref>
<ref id="ref-3"><label>[3]</label><mixed-citation publication-type="web">&#x201C;<article-title>Cisco global cloud index: Forecast and methodology (2016&#x2013;2021)</article-title>,&#x201D; Cisco, <year>2018</year>. [Online]. Available: <ext-link ext-link-type="uri" xlink:href="https://virtualization.network/Resources/Whitepapers/0b75cf2e-0c53-4891-918e-b542a5d364c5_white-paper-c11-738085.pdf">https://virtualization.network/Resources/Whitepapers/0b75cf2e-0c53-4891-918e-b542a5d364c5_white-paper-c11-738085.pdf</ext-link>.</mixed-citation></ref>
<ref id="ref-4"><label>[4]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>F.</given-names> <surname>Bonomi</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Milito</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Zhu</surname></string-name> and <string-name><given-names>S.</given-names> <surname>Addepalli</surname></string-name></person-group>, &#x201C;<article-title>Fog computing and its role in the internet of things</article-title>,&#x201D; in <conf-name>Proc. MCC</conf-name>, <conf-loc>Helsinki, Finland</conf-loc>, pp. <fpage>13</fpage>&#x2013;<lpage>15</lpage>, <year>2012</year>.</mixed-citation></ref>
<ref id="ref-5"><label>[5]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>H. -J.</given-names> <surname>Cha</surname></string-name>, <string-name><given-names>H. -K.</given-names> <surname>Yang</surname></string-name> and <string-name><given-names>Y. -J.</given-names> <surname>Song</surname></string-name></person-group>, &#x201C;<article-title>A study on the design of fog computing architecture using sensor networks</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>18</volume>, no. <issue>11</issue>, pp. <fpage>3633</fpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-6"><label>[6]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>A. K.</given-names> <surname>Idrees</surname></string-name> and <string-name><given-names>A. K. M.</given-names> <surname>Al-Qurabat</surname></string-name></person-group>, &#x201C;<article-title>Energy-efficient data transmission and aggregation protocol in periodic sensor networks based fog computing</article-title>,&#x201D; <source>Journal of Network and Systems Management</source>, vol. <volume>29</volume>, no. <issue>1</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>24</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-7"><label>[7]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>Q.</given-names> <surname>Yaseen</surname></string-name>, <string-name><given-names>F.</given-names> <surname>AlBalas</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Jararweh</surname></string-name> and <string-name><given-names>M.</given-names> <surname>Al-Ayyoub</surname></string-name></person-group>, &#x201C;<article-title>A fog computing based system for selective forwarding detection in mobile wireless sensor networks</article-title>,&#x201D; in <conf-name>Proc. FAS&#x002A;W</conf-name>, <conf-loc>Augsburg, Germany</conf-loc>, pp. <fpage>256</fpage>&#x2013;<lpage>262</lpage>, <year>2016</year>.</mixed-citation></ref>
<ref id="ref-8"><label>[8]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Ni</surname></string-name>, <string-name><given-names>K.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>X.</given-names> <surname>Lin</surname></string-name> and <string-name><given-names>X.</given-names> <surname>Shen</surname></string-name></person-group>, &#x201C;<article-title>Securing fog computing for internet of things applications: Challenges and solutions</article-title>,&#x201D; <source>IEEE Communications Surveys &#x0026; Tutorials</source>, vol. <volume>20</volume>, no. <issue>1</issue>, pp. <fpage>601</fpage>&#x2013;<lpage>628</lpage>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-9"><label>[9]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>T.</given-names> <surname>Wang</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Qiu</surname></string-name>, <string-name><given-names>A. K.</given-names> <surname>Sangaiah</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Xu</surname></string-name> and <string-name><given-names>A.</given-names> <surname>Liu</surname></string-name></person-group>, &#x201C;<article-title>Energy-efficient and trustworthy data collection protocol based on mobile fog computing in internet of things</article-title>,&#x201D; <source>IEEE Transactions on Industrial Informatics</source>, vol. <volume>16</volume>, no. <issue>5</issue>, pp. <fpage>3531</fpage>&#x2013;<lpage>3539</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-10"><label>[10]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>X.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Liu</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Ji</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Zhang</surname></string-name> and <string-name><given-names>V. C.</given-names> <surname>Leung</surname></string-name></person-group>, &#x201C;<article-title>Optimizing resources allocation for fog computing-based internet of things networks</article-title>,&#x201D; <source>IEEE Access</source>, vol. <volume>7</volume>, pp. <fpage>64907</fpage>&#x2013;<lpage>64922</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-11"><label>[11]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>Ahmed</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Mumtaz</surname></string-name>, <string-name><given-names>S. M.</given-names> <surname>Zaidi</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Hafeez</surname></string-name>, <string-name><given-names>S. A.</given-names> <surname>Zaidi</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Distributed fog computing for internet of things (IoT) based ambient data processing and analysis</article-title>,&#x201D; <source>Electronics</source>, vol. <volume>9</volume>, no. <issue>11</issue>, pp. <fpage>1756</fpage>&#x2013;<lpage>1775</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-12"><label>[12]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>Wazid</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Bagga</surname></string-name>, <string-name><given-names>A. K.</given-names> <surname>Das</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Shetty</surname></string-name>, <string-name><given-names>J. J.</given-names> <surname>Rodrigues</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>AKM-IoV: Authenticated key management protocol in fog computing-based internet of vehicles deployment</article-title>,&#x201D; <source>IEEE Internet of Things Journal</source>, vol. <volume>6</volume>, no. <issue>5</issue>, pp. <fpage>8804</fpage>&#x2013;<lpage>8817</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-13"><label>[13]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Thakur</surname></string-name> and <string-name><given-names>R.</given-names> <surname>Malekian</surname></string-name></person-group>, &#x201C;<article-title>Fog computing for detecting vehicular congestion, an internet of vehicles based approach: A review</article-title>,&#x201D; <source>IEEE Intelligent Transportation Systems Magazine</source>, vol. <volume>11</volume>, no. <issue>2</issue>, pp. <fpage>8</fpage>&#x2013;<lpage>16</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-14"><label>[14]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>T.</given-names> <surname>Abar</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Rachedi</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Ben Letaifa</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Fabian</surname></string-name> and <string-name><given-names>S.</given-names> <surname>El Asmi</surname></string-name></person-group>, &#x201C;<article-title>FellowMe cache: Fog computing approach to enhance (QoE) in internet of vehicles</article-title>,&#x201D; <source>Future Generation Computer Systems</source>, vol. <volume>113</volume>, pp. <fpage>170</fpage>&#x2013;<lpage>182</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-15"><label>[15]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>W.</given-names> <surname>Zhang</surname></string-name> and <string-name><given-names>G.</given-names> <surname>Li</surname></string-name></person-group>, &#x201C;<article-title>An efficient and secure data transmission mechanism for internet of vehicles considering privacy protection in fog computing environment</article-title>,&#x201D; <source>IEEE Access</source>, vol. <volume>8</volume>, pp. <fpage>64461</fpage>&#x2013;<lpage>64474</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-16"><label>[16]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M. S.</given-names> <surname>Eddine</surname></string-name>, <string-name><given-names>M. A.</given-names> <surname>Ferrag</surname></string-name>, <string-name><given-names>O.</given-names> <surname>Friha</surname></string-name> and <string-name><given-names>L.</given-names> <surname>Maglaras</surname></string-name></person-group>, &#x201C;<article-title>EASBF: An efficient authentication scheme over blockchain for fog computing-enabled internet of vehicles</article-title>,&#x201D; <source>Journal of Information Security and Applications</source>, vol. <volume>59</volume>, pp. <fpage>102802</fpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-17"><label>[17]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>S.</given-names> <surname>Tuli</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Mahmud</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Tuli</surname></string-name> and <string-name><given-names>R.</given-names> <surname>Buyya</surname></string-name></person-group>, &#x201C;<article-title>FogBus: A blockchain-based lightweight framework for edge and fog computing</article-title>,&#x201D; <source>Journal of Systems and Software</source>, vol. <volume>154</volume>, pp. <fpage>22</fpage>&#x2013;<lpage>36</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-18"><label>[18]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>D.</given-names> <surname>Wu</surname></string-name> and <string-name><given-names>N.</given-names> <surname>Ansari</surname></string-name></person-group>, &#x201C;<article-title>A cooperative computing strategy for blockchain-secured fog computing</article-title>,&#x201D; <source>IEEE Internet of Things Journal</source>, vol. <volume>7</volume>, no. <issue>7</issue>, pp. <fpage>6603</fpage>&#x2013;<lpage>6609</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-19"><label>[19]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>K.</given-names> <surname>Lei</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Du</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Huang</surname></string-name> and <string-name><given-names>T.</given-names> <surname>Jin</surname></string-name></person-group>, &#x201C;<article-title>Groupchain: Towards a scalable public blockchain in fog computing of IoT services computing</article-title>,&#x201D; <source>IEEE Transactions on Services Computing</source>, vol. <volume>13</volume>, no. <issue>2</issue>, pp. <fpage>252</fpage>&#x2013;<lpage>262</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-20"><label>[20]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>P.</given-names> <surname>Kochovski</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Gec</surname></string-name>, <string-name><given-names>V.</given-names> <surname>Stankovski</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Bajec</surname></string-name> and <string-name><given-names>P. D.</given-names> <surname>Drobintsev</surname></string-name></person-group>, &#x201C;<article-title>Trust management in a blockchain based fog computing platform with trustless smart oracles</article-title>,&#x201D; <source>Future Generation Computer Systems</source>, vol. <volume>101</volume>, pp. <fpage>747</fpage>&#x2013;<lpage>759</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-21"><label>[21]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>N.</given-names> <surname>Islam</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Faheem</surname></string-name>, <string-name><given-names>I. U.</given-names> <surname>Din</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Talha</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Guizani</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>A blockchain-based fog computing framework for activity recognition as an application to e-healthcare services</article-title>,&#x201D; <source>Future Generation Computer Systems</source>, vol. <volume>100</volume>, pp. <fpage>569</fpage>&#x2013;<lpage>578</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-22"><label>[22]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>T. S.</given-names> <surname>Darwish</surname></string-name> and <string-name><given-names>K. A.</given-names> <surname>Bakar</surname></string-name></person-group>, &#x201C;<article-title>Fog based intelligent transportation big data analytics in the internet of vehicles environment: Motivations, architecture, challenges, and critical issues</article-title>,&#x201D; <source>IEEE Access</source>, vol. <volume>6</volume>, pp. <fpage>15679</fpage>&#x2013;<lpage>15701</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-23"><label>[23]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>R. K.</given-names> <surname>Barik</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Dubey</surname></string-name>, <string-name><given-names>A. B.</given-names> <surname>Samaddar</surname></string-name>, <string-name><given-names>R. D.</given-names> <surname>Gupta</surname></string-name> and <string-name><given-names>P. K.</given-names> <surname>Ray</surname></string-name></person-group>, &#x201C;<article-title>FogGIS: Fog computing for geospatial big data analytics</article-title>,&#x201D; in <conf-name>Proc. UPCON</conf-name>, <conf-loc>Varanasi, India</conf-loc>, pp. <fpage>613</fpage>&#x2013;<lpage>618</lpage>, <year>2016</year>.</mixed-citation></ref>
<ref id="ref-24"><label>[24]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>W.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Zhang</surname></string-name> and <string-name><given-names>H. C.</given-names> <surname>Chao</surname></string-name></person-group>, &#x201C;<article-title>Cooperative fog computing for dealing with big data in the internet of vehicles: Architecture and hierarchical resource management</article-title>,&#x201D; <source>IEEE Communications Magazine</source>, vol. <volume>55</volume>, no. <issue>12</issue>, pp. <fpage>60</fpage>&#x2013;<lpage>67</lpage>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-25"><label>[25]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>B.</given-names> <surname>Tang</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Chen</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Hefferman</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Wei</surname></string-name>, <string-name><given-names>H.</given-names> <surname>He</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>A hierarchical distributed fog computing architecture for big data analysis in smart cities</article-title>,&#x201D; in <conf-name>Proc. ASE</conf-name>, <conf-loc>Kaohsiung, Taiwan</conf-loc>, pp. <fpage>1</fpage>&#x2013;<lpage>28</lpage>, <year>2015</year>.</mixed-citation></ref>
<ref id="ref-26"><label>[26]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>O.</given-names> <surname>Salman</surname></string-name>, <string-name><given-names>I.</given-names> <surname>Elhajj</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Chehab</surname></string-name> and <string-name><given-names>A.</given-names> <surname>Kayssi</surname></string-name></person-group>, &#x201C;<article-title>IoT survey: An SDN and fog computing perspective</article-title>,&#x201D; <source>Computer Networks</source>, vol. <volume>143</volume>, pp. <fpage>221</fpage>&#x2013;<lpage>246</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-27"><label>[27]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Y.</given-names> <surname>Bi</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Han</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Lin</surname></string-name>, <string-name><given-names>Q.</given-names> <surname>Deng</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Guo</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Mobility support for fog computing: An SDN approach</article-title>,&#x201D; <source>IEEE Communications Magazine</source>, vol. <volume>56</volume>, no. <issue>5</issue>, pp. <fpage>53</fpage>&#x2013;<lpage>59</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-28"><label>[28]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>A. J.</given-names> <surname>Kadhim</surname></string-name> and <string-name><given-names>S. A.</given-names> <surname>Seno</surname></string-name></person-group>, &#x201C;<article-title>Maximizing the utilization of fog computing in internet of vehicle using SDN</article-title>,&#x201D; <source>IEEE Communications Letters</source>, vol. <volume>23</volume>, no. <issue>1</issue>, pp. <fpage>140</fpage>&#x2013;<lpage>143</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-29"><label>[29]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>Arif</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Wang</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Wang</surname></string-name> and <string-name><given-names>T.</given-names> <surname>Peng</surname></string-name></person-group>, &#x201C;<article-title>SDN-Based secure VANETs communication with fog computing</article-title>,&#x201D; in <conf-name>Proc. SpaCCS</conf-name>, <conf-loc>Melbourne, NSW, Australia</conf-loc>, pp. <fpage>46</fpage>&#x2013;<lpage>59</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-30"><label>[30]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Gao</surname></string-name>, <string-name><given-names>K. O.</given-names> <surname>Agyekum</surname></string-name>, <string-name><given-names>E. B.</given-names> <surname>Sifah</surname></string-name>, <string-name><given-names>K. N.</given-names> <surname>Acheampong</surname></string-name>, <string-name><given-names>Q.</given-names> <surname>Xia</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>A blockchain-SDN-enabled internet of vehicles environment for fog computing and 5G networks</article-title>,&#x201D; <source>IEEE Internet of Things Journal</source>, vol. <volume>7</volume>, no. <issue>5</issue>, pp. <fpage>4278</fpage>&#x2013;<lpage>4291</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-31"><label>[31]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>A. J.</given-names> <surname>Kadhim</surname></string-name> and <string-name><given-names>S. A.</given-names> <surname>Seno</surname></string-name></person-group>, &#x201C;<article-title>Energy-efficient multicast routing protocol based on SDN and fog computing for vehicular networks</article-title>,&#x201D; <source>Ad. Hoc. Networks</source>, vol. <volume>84</volume>, pp. <fpage>68</fpage>&#x2013;<lpage>81</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-32"><label>[32]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Y.</given-names> <surname>Xiao</surname></string-name> and <string-name><given-names>M.</given-names> <surname>Krunz</surname></string-name></person-group>, &#x201C;<article-title>Dynamic network slicing for scalable fog computing systems with energy harvesting</article-title>,&#x201D; <source>IEEE Journal on Selected Areas in Communications</source>, vol. <volume>36</volume>, no. <issue>12</issue>, pp. <fpage>2640</fpage>&#x2013;<lpage>2654</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-33"><label>[33]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>Arif</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Wang</surname></string-name>, <string-name><given-names>V. E.</given-names> <surname>Balas</surname></string-name>, <string-name><given-names>O.</given-names> <surname>Geman</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Castiglione</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>SDN based communications privacy-preserving architecture for VANETs using fog computing</article-title>,&#x201D; <source>Vehicular Communications</source>, vol. <volume>26</volume>, pp. <fpage>100265</fpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-34"><label>[34]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M. K.</given-names> <surname>Hussein</surname></string-name> and <string-name><given-names>M. H.</given-names> <surname>Mousa</surname></string-name></person-group>, &#x201C;<article-title>Efficient task offloading for IoT-based applications in fog computing using ant colony optimization</article-title>,&#x201D; <source>IEEE Access</source>, vol. <volume>8</volume>, pp. <fpage>37191</fpage>&#x2013;<lpage>37201</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-35"><label>[35]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>K.</given-names> <surname>Cao</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Zhou</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Xu</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Wei</surname></string-name> and <string-name><given-names>S.</given-names> <surname>Hu</surname></string-name></person-group>, &#x201C;<article-title>Exploring renewable-adaptive computation offloading for hierarchical QoS optimization in fog computing</article-title>,&#x201D; <source>IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems</source>, vol. <volume>39</volume>, no. <issue>10</issue>, pp. <fpage>2095</fpage>&#x2013;<lpage>2108</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-36"><label>[36]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>S.</given-names> <surname>Misra</surname></string-name> and <string-name><given-names>N.</given-names> <surname>Saha</surname></string-name></person-group>, &#x201C;<article-title>Detour: Dynamic task offloading in software-defined fog for IoT applications</article-title>,&#x201D; <source>IEEE Journal on Selected Areas in Communications</source>, vol. <volume>37</volume>, no. <issue>5</issue>, pp. <fpage>1159</fpage>&#x2013;<lpage>1166</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-37"><label>[37]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>C.</given-names> <surname>Lin</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Han</surname></string-name>, <string-name><given-names>X.</given-names> <surname>Qi</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Guizani</surname></string-name> and <string-name><given-names>L.</given-names> <surname>Shu</surname></string-name></person-group>, &#x201C;<article-title>A distributed mobile fog computing scheme for mobile delay-sensitive applications in SDN-enabled vehicular networks</article-title>,&#x201D; <source>IEEE Transactions on Vehicular Technology</source>, vol. <volume>69</volume>, no. <issue>5</issue>, pp. <fpage>5481</fpage>&#x2013;<lpage>5493</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-38"><label>[38]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>J. Y.</given-names> <surname>Baek</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Kaddoum</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Garg</surname></string-name>, <string-name><given-names>K.</given-names> <surname>Kaur</surname></string-name> and <string-name><given-names>V.</given-names> <surname>Gravel</surname></string-name></person-group>, &#x201C;<article-title>Managing fog networks using reinforcement learning based load balancing algorithm</article-title>,&#x201D; in <conf-name>Proc. WCNC</conf-name>, <conf-loc>Marrakech, Morocco</conf-loc>, pp. <fpage>1</fpage>&#x2013;<lpage>7</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-39"><label>[39]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Muthanna</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Ateya</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Khakimov</surname></string-name>, <string-name><given-names>I.</given-names> <surname>Gudkova</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Abuarqoub</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Secure and reliable IoT networks using fog computing with software-defined networking and blockchain</article-title>,&#x201D; <source>Journal of Sensor and Actuator Networks</source>, vol. <volume>8</volume>, no. <issue>1</issue>, pp. <fpage>15</fpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-40"><label>[40]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Y.</given-names> <surname>Wei</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Yang</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Wang</surname></string-name>, <string-name><given-names>X.</given-names> <surname>Chen</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Li</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Delay and energy-efficiency-balanced task offloading for electric internet of things</article-title>,&#x201D; <source>Electronics</source>, vol. <volume>11</volume>, no. <issue>6</issue>, pp. <fpage>839</fpage>, <year>2022</year>.</mixed-citation></ref>
<ref id="ref-41"><label>[41]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>H.</given-names> <surname>Materwala</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Ismail</surname></string-name>, <string-name><given-names>R. M.</given-names> <surname>Shubair</surname></string-name> and <string-name><given-names>R.</given-names> <surname>Buyya</surname></string-name></person-group>, &#x201C;<article-title>Energy-SLA-aware genetic algorithm for edge&#x2013;cloud integrated computation offloading in vehicular networks</article-title>,&#x201D; <source>Future Generation Computer Systems</source>, vol. <volume>135</volume>, pp. <fpage>205</fpage>&#x2013;<lpage>222</lpage>, <year>2022</year>.</mixed-citation></ref>
<ref id="ref-42"><label>[42]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>K.</given-names> <surname>Xiao</surname></string-name>, <string-name><given-names>K.</given-names> <surname>Liu</surname></string-name>, <string-name><given-names>X.</given-names> <surname>Xu</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Zhou</surname></string-name> and <string-name><given-names>L.</given-names> <surname>Feng</surname></string-name></person-group>, &#x201C;<article-title>Efficient fog-assisted heterogeneous data services in software defined VANETs</article-title>,&#x201D; <source>Journal of Ambient Intelligence and Humanized Computing</source>, vol. <volume>12</volume>, pp. <fpage>261</fpage>&#x2013;<lpage>273</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-43"><label>[43]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>A. A.</given-names> <surname>Khadir</surname></string-name> and <string-name><given-names>S. A.</given-names> <surname>Seno</surname></string-name></person-group>, &#x201C;<article-title>SDN-Based offloading policy to reduce the delay in fog-vehicular networks</article-title>,&#x201D; <source>Peer-to-Peer Networking and Applications</source>, vol. <volume>14</volume>, pp. <fpage>1261</fpage>&#x2013;<lpage>1275</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-44"><label>[44]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>L. A.</given-names> <surname>Phan</surname></string-name>, <string-name><given-names>D. T.</given-names> <surname>Nguyen</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Lee</surname></string-name>, <string-name><given-names>D. H.</given-names> <surname>Park</surname></string-name> and <string-name><given-names>T.</given-names> <surname>Kim</surname></string-name></person-group>, &#x201C;<article-title>Dynamic fog-to-fog offloading in SDN-based fog computing systems</article-title>,&#x201D; <source>Future Generation Computer Systems</source>, vol. <volume>117</volume>, pp. <fpage>486</fpage>&#x2013;<lpage>497</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-45"><label>[45]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>F.</given-names> <surname>Alenizi</surname></string-name> and <string-name><given-names>O.</given-names> <surname>Rana</surname></string-name></person-group>, &#x201C;<article-title>Dynamically controlling offloading thresholds in fog systems</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>21</volume>, no. <issue>7</issue>, pp. <fpage>2512</fpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-46"><label>[46]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M. D.</given-names> <surname>Hossain</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Sultana</surname></string-name>, <string-name><given-names>M. A.</given-names> <surname>Hossain</surname></string-name>, <string-name><given-names>M. I.</given-names> <surname>Hossain</surname></string-name>, <string-name><given-names>L. N.</given-names> <surname>Huynh</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Fuzzy decision-based efficient task offloading management scheme in multi-tier MEC-enabled networks</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>21</volume>, no. <issue>4</issue>, pp. <fpage>1484</fpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-47"><label>[47]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>S.</given-names> <surname>Khan</surname></string-name>, <string-name><given-names>I. A.</given-names> <surname>Shah</surname></string-name>, <string-name><given-names>N.</given-names> <surname>Tairan</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Shah</surname></string-name> and <string-name><given-names>M. F.</given-names> <surname>Nadeem</surname></string-name></person-group>, &#x201C;<article-title>Optimal resource allocation in fog computing for healthcare applications</article-title>,&#x201D; <source>Computers, Materials &#x0026; Continua</source>, vol. <volume>71</volume>, no. <issue>3</issue>, pp. <fpage>6147</fpage>&#x2013;<lpage>6163</lpage>, <year>2022</year>.</mixed-citation></ref>
<ref id="ref-48"><label>[48]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>K.</given-names> <surname>Brunnstr&#x00F6;m</surname></string-name>, <string-name><given-names>E.</given-names> <surname>Dima</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Qureshi</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Johanson</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Anderssonv</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Latency impact on quality of experience in a virtual reality simulator for remote control of machines</article-title>,&#x201D; <source>Signal Processing: Image Communication</source>, vol. <volume>89</volume>, pp. <fpage>116005</fpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-49"><label>[49]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Y.</given-names> <surname>Tu</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Chen</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Yan</surname></string-name> and <string-name><given-names>X.</given-names> <surname>Zhou</surname></string-name></person-group>, &#x201C;<article-title>Task offloading based on LSTM prediction and deep reinforcement learning for efficient edge computing in IoT</article-title>,&#x201D; <source>Future Internet</source>, vol. <volume>14</volume>, no. <issue>2</issue>, pp. <fpage>30</fpage>, <year>2022</year>.</mixed-citation></ref>
<ref id="ref-50"><label>[50]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>S. I.</given-names> <surname>AlShathri</surname></string-name>, <string-name><given-names>S. A.</given-names> <surname>Chelloug</surname></string-name> and <string-name><given-names>D. S. M.</given-names> <surname>Hassan</surname></string-name></person-group>, &#x201C;<article-title>Parallel meta-heuristics for solving dynamic offloading in fog computing mathematics</article-title>,&#x201D; <source>Mathematics</source>, vol. <volume>10</volume>, no. <issue>8</issue>, pp. <fpage>1258</fpage>, <year>2022</year>.</mixed-citation></ref>
<ref id="ref-51"><label>[51]</label><mixed-citation publication-type="other">&#x201C;<article-title>SDN control plane performance: Raising the bar on SDN performance, scalability, and high availability</article-title>,&#x201D; ONOS project, <year>2017</year>. [Online]. Available: <ext-link ext-link-type="uri" xlink:href="https://wiki.onosproject.org/download/attachments/13994369/Whitepaper-%20ONOS%20Kingfisher%20release%20performance.pdf?version=1">https://wiki.onosproject.org/download/attachments/13994369/Whitepaper-%20ONOS%20Kingfisher%20release%20performance.pdf?version=1</ext-link>.</mixed-citation></ref>
<ref id="ref-52"><label>[52]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>V. G.</given-names> <surname>Abhaya</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Tari</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Zeephongsekul</surname></string-name> and <string-name><given-names>A. Y.</given-names> <surname>Zomaya</surname></string-name></person-group>, &#x201C;<article-title>Performance analysis of EDF scheduling in a multi-priority preemptive M/G/1 queue</article-title>,&#x201D; <source>IEEE Transactions on Parallel and Distributed Systems</source>, vol. <volume>25</volume>, no. <issue>8</issue>, pp. <fpage>2149</fpage>&#x2013;<lpage>2158</lpage>, <year>2014</year>.</mixed-citation></ref>
<ref id="ref-53"><label>[53]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>&#x0141;.</given-names> <surname>Kruk</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Lehoczky</surname></string-name>, <string-name><given-names>K.</given-names> <surname>Ramanan</surname></string-name> and <string-name><given-names>S.</given-names> <surname>Shreve</surname></string-name></person-group>, &#x201C;<article-title>Heavy traffic analysis for EDF queues with reneging</article-title>,&#x201D; <source>Annals of Applied Probability</source>, vol. <volume>21</volume>, no. <issue>2</issue>, pp. <fpage>484</fpage>&#x2013;<lpage>545</lpage>, <year>2011</year>.</mixed-citation></ref>
<ref id="ref-54"><label>[54]</label><mixed-citation publication-type="other">Apache NetBeans 12.5. [Online]. Available: <ext-link ext-link-type="uri" xlink:href="https://netbeans.apache.org/">https://netbeans.apache.org/</ext-link>.</mixed-citation></ref>
<ref id="ref-55"><label>[55]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>D. S. M.</given-names> <surname>Hassan</surname></string-name>, <string-name><given-names>H. M. A.</given-names> <surname>Fahmy</surname></string-name> and <string-name><given-names>A. M.</given-names> <surname>Bahaa-ElDin</surname></string-name></person-group>, &#x201C;<article-title>RCA: Efficient connected dominated clustering algorithm for mobile ad hoc networks</article-title>,&#x201D; <source>Computer Networks</source>, vol. <volume>75</volume>, pp. <fpage>177</fpage>&#x2013;<lpage>191</lpage>, <year>2014</year>.</mixed-citation></ref>
</ref-list>
</back>
</article>