## 1 Introduction
### Motivations, Main Contributions, and Organization of the Paper
The optimization is performed by task offloading and allocation of the per-core computing frequencies and up/down Cellular-WiFi bandwidths of the platform of Figure 1 in a _joint_ and _adaptive way_;
* resource allocation is performed by explicitly accounting for the _container-based virtualized_ nature of the reference platform of Figure 1. For this purpose, the _VirtFogSim_ toolbox relies on a gradient-based primal-dual iterative procedure that implements a set of ad-hoc designed _adaptive_ (e.g., time-varying) step-sizes: The goal is to speed up the convergence to the corresponding steady-states of the _per-core_ computing frequencies and _per-connection_ bandwidths to be dynamically allocated;
* it allows the user to test the energy-delay performances of six different task allocation strategies, namely the Genetic, Only-Mobile, Only-Fog, Only-Cloud, Only-Task Allocation, and Exhaustive-Search strategies (see Section 4), and to add new user-defined strategies;
* the code of the core engine of the simulator leverages the Parallel Toolbox of MATLAB, in order to exploit automatically the multi-core capability possibly retained by the execution environment of the simulator. Furthermore, regarding the consideration of the formats of rendering data supported by the proposed _VirtFogSim_ toolbox, we point out that it is equipped with a GUI that allows:  
* the display of the _dynamic time behavior_ of the performed resource allocation under the time-varying simulation environment set by the user and;
* the rendering of the data output by the simulator in tabular, bar-plot, and colored map graph formats (see Section 5). Finally, a last contribution of the paper concerns the actual test of the numerical and scalability capabilities of the proposed _VirtFogSim_ toolbox. In this regard, we point out that:  
* the adaptive capability and the energy-delay performance of the (aforementioned) six task allocation strategies have been checked and compared under three benchmark DAGs. They refer to different use cases featuring some computing, multimedia, and scientific applications of practical interest and exhibit different symmetric/asymmetric/pseudo-random topologies of various sizes and in/out node degrees;
* the scaling capability of the simulator has been numerically profiled in terms of both simulation times and volumes of data that are exchanged among the running cores. The rest of this contribution is organized as follows. After reviewing in Section 2 the related work on the current software tools for the simulation of Fog-Cloud computing platforms, in Section 3, we present the formal models describing the simulated technological platform of Figure 1. Section 4 is devoted to an in-depth description of the task offloading and dynamic resource allocation strategies supported by the current Version 4.0 of the _VirtFogSim_ toolbox, as well as their implementation on multi-core parallel hardware execution platforms. Afterward, Section 5 describes the associated graphic formats for the display of the rendered data. Section 6 focuses on: (i) checking the numerical capability of _VirtFogSim_; and (ii) testing the scalability of the simulator in terms of both simulation time and memory consumption on multi-core parallel hardware execution platforms. Some hints for possible future developments and the availability of the _VirtFogSim_ package are reported in the conclusive Sections 7 and 8. The reader may refer to Appendix A for the presentation of the dual-mode user interfaces of the _VirtFogSim_ toolbox and to the final Appendix B for the full list of the (settable) input parameters of the _VirtFogSim_ simulator and the corresponding meaning, roles, and measuring units.