## 1 Introduction  
Mobile Edge Computing (MEC) is a computing methodology that can work on the cloud's resource in terms of providing application and content closer to users at the edge network within the Radio Access Network (RAN) [1]. Some applications, such as Augmented Reality (AR), real-time gaming, Virtual reality (VR), and remote sensing, can immediately process data for data offloading and downloading by user devices [2; 3]. Nowadays, we are moving towards technologies of smart healthcare, such as Internet-of-Medical-Things (IoMTs) or Sensor Nodes (SNs). Those technologies need SNs and edge computing to enable an efficient healthcare system, which requires real-time health monitoring using medical care applications on wearable gadgets or cellphones. Sensors that are equipped on the IoMT devices generate enormous amounts of data, and those data are transported to the edge server or cloud computing server, where intensive data processing is conducted. Finally, the health information is sent back to end users (e.g., doctors, nurses, and patients) for further disease analysis [4]. To overcome the high-latency issue, the edge computing paradigm has been used, where in the edge environment extends the cloud environment and catersto IoMT applications at the edge network [5; 6]. Edge computing is equipped with limited capacity of computation resources and batteries based on its physical size, and it can be deployed across the edge of the networks [7]. To ensure reliable SN performance for real-time health monitoring and long battery lifetime, an AI-enabled energy management technique is required to reduce the overall energy consumption of SNs and improve their battery lifetime [8]. Currently, the solutions being considered to handle the battery lifetime of SNs are to offload the computation-intensive tasks to a higher-level infrastructure, known as edge computing. However, task offloading has become a research trend in many prior works, focusing on when and where to offload the computation-intensive workload of SNs to the edge network or cloud [9]. MEC servers can be deployed with Roadside Units (RSUs) for Internet of Vehicles (IoV), where computing resources are available for tasks offloaded from user devices [10; 11; 12; 13]. These applications also require significant computation resources and must adhere to strict time constraints [14; 15]. The computing tasks or data gathered by user devices have a limited upper-bound delay, and exceeding this delay can lead to task failures. Existing studies in the field of computation offloading primarily focus on offloading decisions, determining which tasks should be executed locally or offloaded to the edge server [16; 17; 18; 19]. Researchers consider various attributes of tasks, such as computational intensity, data dependency, deadline constraints, and sensitivity to network latency. These characteristics influence the decision-making process regarding whether a task is suitable for offloading and where it should be offloaded. Different optimization objectives may guide offloading decisions, such as minimizing latency, conserving energy, maximizing resource utilization, or improving Quality of Service (QoS). Researchers explore various trade-offs between these objectives and develop algorithms that balance conflicting goals effectively. Existing studies in the field of computation offloading aim to develop intelligent decision-making mechanisms that optimize the allocation of computational tasks across distributed computing resources, thereby improving system performance, efficiency, and user experience. Due to this challenge, we also aim to improve the performance of user devices to be effectively utilized in edge computing systems by introducing the resource optimization method via Lagrangian duality optimization and integrating it with the newly developed offloading decision by assigning priority to saving computing power on each user device as well as considering the time constraints of IoT applications utilized in our model.