Indonesian Journal of Electrical Engineering and Computer Science Vol. 27, No. 1, July 2022, pp. 466~477 ISSN: 2502-4752, DOI: 10.11591/ijeecs.v27.i1.pp466-477 466 Journal homepage: http://ijeecs.iaescore.com Cost-effective resource and task scheduling in fog nodes Ali Hussein Shamman, Hussein Ali Alasadi, Hussein Ali Ameen, Zaid Ibrahim Rasol, Hassan Muwafaq Gheni Department of Computer Engineering Techniques, Al-Mustaqbal University College, Babil, Iraq Article Info ABSTRACT Article history: Received Oct 20, 2021 Revised Apr 9, 2022 Accepted May 19, 2022 Cloud services are the cutting edge technology, however the growing demand for the internet of things has certain limitations which are high latency expectation and high cost of cloud resources, and this is caused by long-distance between application and cloud. Fog computing is a distributed extension of the cloud, which provide storage and computation at the network level. It consists of an internet of things (IoT) application, a fog control node, and a fog access node. This research works towards minimizing the cloud cost in scheduling. For this purpose, a cost-effective task and user scheduling algorithm are performed. The first task scheduling model is composed based on composers' roles after that task scheduling algorithm is performed to handle the various task at the fog access node in an optimized manner. Finally, the reallocation mechanism reduces the time and service delay. For the analysis purpose extensive simulation is carried out and performance statistics were compared with other existing algorithms. It was observed that the proposed algorithm provides highly cost-optimized user and task scheduling with better performance statistics and reduces the delay in the task by providing optimization in the concurrent task at the fog node. Keywords: Cloud Execution time Fog Internet of things Task scheduling This is an open access article under the CC BY-SA license. Corresponding Author: Hussein Ali Ameen Department of Computer Engineering Techniques, Al-Mustaqbal University College Babil 51001, Iraq Email: hussain.a.ameen@gmail.com 1. INTRODUCTION The emergence of cloud computing has expanded dramatically and is becoming increasingly attractive and a center of attraction for the industry as well as academia purpose as it provides services over the internet reduces user requirements for future planning and provides a flexible computing model and business purposes [1]-[3]. With current technological advancements, such as the internet of things (IoT), cyber-physical systems (CPS), and blockchain that are applied to an industrial area, various studies are showing that the IoT market will grow rapidly. It is estimated that the development of the number of IoT devices used in 2025 will reach 64 billion [4]. Using the internet of things internet connectivity is provided beyond mobile phones and laptops towards every possible thing or device that humans use in their delayed routine [3], [5]. Because of that, the need for cloud computing is increasing. Cloud computing is a computing model that makes it possible to access information or data through the internet network comfortably and on- demand to a collection of computing resources that can be configured together [4], [6]. Cloud computing is another stream of internet computing, in which all data is stored on the cloud or internet. These data are accessed by the user or client application by the network layer using the internet. Scalability and high- performance capability provide cost and time affecting benefits to many mobile phones and computers by increasing the data storage capacity and problem-solving at the server end [3], [7]. As the IoT device application increases the service request and response also increases, which is time, cost, and resource in-