A Micro-Level Compensation-Based Cost Model for Resource Allocation in a Fog Environment
Fog computing aims to support applications requiring low latency and high scalability by using resources at the edge level. In general, fog computing comprises several autonomous mobile or static devices that share their idle resources to run different services. The providers of these devices also need to be compensated based on their device usage. In any fog-based resource-allocation problem, both cost and performance need to be considered for generating an efficient resource-allocation plan. Estimating the cost of using fog devices prior to the resource allocation helps to minimize the cost and maximize the performance of the system. In the fog computing domain, recent research works have proposed various resource-allocation algorithms without considering the compensation to resource providers and the cost estimation of the fog resources. Moreover, the existing cost models in similar paradigms such as in the cloud are not suitable for fog environments as the scaling of different autonomous resources with heterogeneity and variety of offerings is much more complicated. To fill this gap, this study first proposes a micro-level compensation cost model and then proposes a new resource-allocation method based on the cost model, which benefits both providers and users. Experimental results show that the proposed algorithm ensures better resource-allocation performance and lowers application processing costs when compared to the existing best-fit algorithm.
In recent years, Internet of Things (IoT) has become a significant influence for many industries because of various smart features enabled by the advancements in sensor and communication technologies. Recently, Intel announced Xeon D-2100 processor  with high computation power with low energy consumption, which is best suited for edge and fog computing environments. According to Gartner , the number of IoT devices will reach 20.8 billion by 2020. As the number of devices is rapidly growing and the data generated by these devices are also increasing at an alarming rate, considering the need for processing such data within the time bounds of an application, traditional cloud computing cannot be used due to the limitations such as high latency and limited network bandwidth. Hence, fog computing has evolved as an additional layer to the cloud. Fog computing is envisioned to empower the integration of computation and storage of idle autonomous end devices such as smartphones, tablets, laptops, and other stationary computation devices . Using these idle devices can improve the quality of services needed for executing IoT applications including disaster-related services . In a fog environment, anyone can participate as a provider by providing their computational resources to process time-sensitive applications. For example, recently, the general public contributed their mobile devices for a cancer research project DRUGS (Drug Repositioning Using Grids of Smartphones) . This project aims at using smartphone computing resources to process cancer data. Allocating resources in a vastly distributed heterogeneous device environment is a challenging task due to the variation in available device resources, which can result in variable response and completion times.
Use of resources, cost, and completion time are the parameters that need to be considered during the resource allocation. In the fog computing environment, researchers have only considered the use of resources and response time for allocating the resources without considering the cost . In the literature, there are many cost models and resource-allocation techniques proposed for cloud and other distributed computing paradigms. However, these are not directly applicable in the fog environment as the fog environment has unique characteristics such as high mobility, multiple ownership, and limited resources. Moreover, some works have proposed techniques to allocate the resources in fog by considering energy and latency [7,8]. However, in a realistic fog computing environment, the participating end-user devices (aka fog devices) should be compensated based on the resource usage and the quality of the device to ensure that the devices are reliably available . In such an environment, estimating resource costs before they are allocated and deployed, helps to provide cost-efficient IoT services to the users.
To our best knowledge, no research works have been done that allocate the resources in a fog environment by estimating the cost accurately. On the other hand, cloud resource-allocation techniques and cost models are not suitable for fog because of high heterogeneity and unreliability of fog resources. Since any device that has computation power, can act as a fog device, a fog computing environment is highly heterogeneous compared to the cloud. Moreover, the devices can register and unregister from the network very frequently because of the mobile nature of fog devices. Also, fog devices are not reliable because they are not entirely dedicated to the fog computations; only the idle resources can be used. The owner of the devices offering resources for services in a fog environment should be compensated in some ways for their resource offering. Existing cost models do not consider these fog-related characteristics and user compensation. Hence, a cost model is needed, which can precisely calculate the cost for the users before job submission by considering all these requirements. Moreover, providing an accurate cost estimation model prior to resource allocation is not a trivial task, due to the different resource configurations of fog devices and a large number of highly unreliable and distributed fog resources. As such, this paper tries to fill this gap by proposing a new model that estimates the cost in the fog environment. Based on the proposed cost model, the study further proposes a new resource-allocation algorithm called Fog Stable Matching Resource Allocation (FSMRA) algorithm using stable matching economic theory  which benefits both users and providers.
This paper has the following main contributions:
A micro-level cost model that takes into account user participation in fog computing environments.
A novel resource-allocation algorithm based on stable matching (FSMRA) is proposed that benefits both users and providers in the fog environment.
The rest of the paper is organized into five sections. Section 2 discusses some of the existing cost models in the literature. Section 3 discusses the problem statement and proposes a solution. Section 4 discusses the fog computing cost model. Section 5 describes the resource-allocation technique with a proposed stable matching algorithm in detail. Section 6 discusses the evaluation of the proposed algorithm. Section 7 concludes the paper.