# Modeling and Simulation Tools for Fog Computing--A Comprehensive Survey from a Cost Perspective
## 4 Modeling Fog Computing Systems
The scheme considers monetary and time costs. * _Markov Chains and other models_: A Markov chain is a random process characterized by the memoryless property: future system states depend only on the present state and not on events thatoccurred in the past [45]. Markov chains allow identifying stimulating characteristics of complex systems, compacting potentially large mathematical models into a more concise representation, which can be quite helpful when studying the dynamics of these systems. There are a few works which adopt Markov chain models for fog computing systems. [PERSON] et al. [59] model the fog architecture using Markov chains and they compare the performance of hierarchical and flat architecture variants in terms of computational power and completion time of a task. In Reference [39], Markov decision processes, an extension to Markov chains, were used to optimize the operational cost in the computation migration problem. Markov decision processes are also used in Reference [45] to optimize offloading in mobile fog computing, that is, the transfer of computational tasks from mobile devices to fog servers. [PERSON] et al. [22] construct a theoretical model using a mathematical formulation to parametrize individual components of fog computing systems. The authors consider how to reduce the cost in terms of service latency and energy consumption. Regarding the second broad category, a conceptual model is an abstraction of a real system and it considers the systems as a collection of components which interact in various ways. Each component represents a class of devices or services in the real system, and is characterized by specific behaviors. [PERSON] et al. [31] propose a conceptual model to introduce an architectural structure for constructing, enhancing or expanding fog computing. A fog system is considered as a layered model consisting of fog nodes (physical or virtual) which interact and communicate with cloud and end-devices. This model aims to support the deployment of applications and services. [PERSON] et al. [60] design a conceptual migration framework. They use it for migration of virtual machines in order to minimize the downtime and the migration time. Table 2 summarizes the literature with respect to the modeling approach used. For every work, we include information about the actual problem studied by the authors, the targeted cost metrics and the simulation tool which was used to evaluate the models (if any). \begin{table}
\begin{tabular}{p{56.9 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Work** & **Problem Studied** & **Cost Metrics** & **Simulation Tool** \\ \hline \multicolumn{4}{c}{Analytical Models} \\ \hline
[61] & Sources of latency in health care applications & Communication latency, computation latency, and network latency & iFogSim [35] \\ \hline
[36] & Reduction of energy consumption and billing cost in audio/visual recognition and retrieval environment & Billing cost, energy consumption & N/A \\ \hline
[37] & Optimal distribution of processing load among the fog and the cloud & Transmission cost, processing cost per unit time, response time & Java Modeling Tool \\ \hline
[4,44] & Quality of service (QoS) in IoT networks & Service delay, propagation and transmission delays, processing delay & N/A \\ \hline
[42] & Allocation of fog computing resources under SLA and QoS constraints & CPU utilization, system response time, system loss rate, system throughput, number of messages & Java Modeling Tools of messages \\ \hline
[40] & Modeling a typical healthcare monitoring system & Computing cost, response time & Java Modeling Tools \\ \hline
[41] & Data management in mobile crowdsensing environments & energy consumption & N/A \\ \hline
[49] & Management system design for NFV customers and service providers & Capital expenditures (CAPEX) and operating expenses (OPEX) & N/A \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of modeling tools (N/A: not applicable).