**Abstract**

The trend of fog computing has generated challenges to establish resource allocation provided by this type of environment, since, in fog environments, the computing resource setting occurs on demand and at the edge of the network. Thus, ensuring both environment performance and providing user satisfaction imposes a severe technical problem. Since distributed systems are context-aware systems, the quality of context design can be applied to manage customer service, which aims to improve QoS, and provides system performance, for a given context. So, in this chapter, we propose a model to obtain runtime improvement for individual users and improve the global system performance using the quality of context in fog computing environment. The contribution of this proposal is to provide a resource allocation model, and metrics, based on QoC to deal with different distributed computing scenarios, in order to coordinate and enhance the environmental performance and user satisfaction. Experimental results show that our model improves system performance and users' satisfaction. For measuring workloads, estimates of users'satisfaction were performed. The proposed model obtained average results between 80 and 100% of users'satisfaction acceptance, and a standard deviation adherent to a flat surface for workloads with a large number of tasks.

**Keywords:** distributed system, fog computing, resource allocation, quality of experience, throughput, quality of context, users satisfaction
