The Internet of Things (IoT) creates a sprawling network where multiple devices can interact, enabling a variety of devices to communicate, collect information, and carry out tasks in support of services that end users may enjoy. Edge Computing, known for its lower latency compared to the Cloud, has sparked interest in managing the execution of tasks within a huge ecosystem that acts as a cover upon the IoT infrastructure. The primary challenge lies in maximizing the use of limited edge resources while minimizing response time, prompting numerous research endeavors. However, existing efforts often overlook shifts in the collected data that may affect the execution of tasks and the production of knowledge. This paper focuses on developing a mechanism that considers data and concept drifts to optimize the management of tasks. The ultimate goal is to maximize the accuracy levels while optimizing resource utilization, through a tasks’ offloading scheme that accounts for distribution-based similarity, offering substantial benefits in managing these constrained resources efficiently. The shifts in data can help determine if the execution of a task is efficient in a specific node and become part of a reasoning model that guides the offloading decisions. Finally, we evaluate our model using a large set of experimental scenarios.