As wireless communication technologies advance rapidly, more and more devices are connected via the Internet of Things. This gives rise to numerous IoT applications that generate large volumes of data. Processing these data not only demands computing resources but also consumes significant energy. The emergence of mobile edge computing (MEC) offers a promising paradigm for overcoming the weaknesses of traditional public clouds. As MEC servers are much closer to Internet of Things devices than the public cloud, the transmission delay can be significantly reduced. Nevertheless, the deployment of MEC systems still faces several challenges, including resource allocation and offloading decisions. This paper proposes a joint resource allocation and partial task offloading simulation model for MEC systems that minimizes system costs, including processing time and energy consumption. A mathematical optimization problem is formulated, and a solution algorithm is presented. The simulation results are offered to show the effectiveness of the proposed solution algorithm.