The exponential growth of interconnected IoT devices, highlights the infrastructure limitations of Cloud-based computing approaches. In this context, novel solutions (i.e., Fog and Edge computing) aim to exploit a continuum resource space composed of nearby and mobile devices as a single heterogeneous and distributed system to move part of the computation closer to data sources. In this regard, the heterogeneous nature of these devices (performance, features, capabilities...) requires proper programming models and run-time management layers. This chapter proposes an overview of recent modeling premises and quantitative results in a resource management perspective through the BarMan framework, which combines a task-based programming model, a run-time resource manager, and the BeeR task distribution software to deploy use-case applications-modules across the boards of a real Fog cluster.