## 1 Introduction  
Cloud computing is a development in technology that emphasizes how we create apps, design computer systems, and use already-existing services to produce software. It is based on the idea of \"dynamic provisioning\", which applies to computing power, storage, networking, and infrastructure for information technology (IT) in general, as well as services. The National Institute of Standards and Technology (NIST) defined the cloud as \"a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction\" [1]. This cloud model is composed of five essential characteristics, which are on-demand self-service; three service models, which are Software as a Service (SaaS), Platform as a Service (PaaS), and Infrastructure as a Service (IaaS); and four deployment models, which are the private cloud, community cloud, public cloud, and hybrid cloud. Cloud services are provided to the Internet of Things devices (IoT); the IoT is a network of physical items (called \"things\") that are constructed with various sensors, software, and other technologies in order to connect with other devices and systems over the internet and share data with them. These gadgets range from simple household items to high-tech tools used in industry. Experts think that by 2025, there will be 75 billion connected IoT devices. Today, there are more than 15 billion IoT devices that are connected [2,3]. Energy consumption is a significant concern because a large number of devices need to be online. All these devicesrequire a lot of data storage, computing power, and other resources [4] because of the time it takes for data to travel between the cloud and an IoT device. The applications that need real-time processing, like healthcare, vehicles, augmented reality, elder care, and industrial robots, are not easy to use with the cloud's storage and processing capabilities to obtain real-time services. Cisco proposed the idea of fog computing as a solution to this problem; it is essentially an expansion of cloud computing [5]. Fog computing was created to be a small cloud between the central cloud and IoT devices. The main advantage of this is that it reduces the distance between the cloud and IoT devices for real-time services. All of the client computers that are part of the fog network make up the devices layer of the architecture's top level. Between the endpoints and the cloud lies a layer of networking equipment known as the fog layer [6]. The cloud layer is depicted at the bottom, and the third layer is the cloud layer, which serves as the storage and processing hub for IoT devices. The proximity of the fog layer to the end devices means that edge devices can process Internet of Things (IoT) tasks much more quickly than the cloud [7]. Reduced latency, enhanced resource utilization, and reduced energy use are some crucial methods used to process them by building a scheduling algorithm to maximize system performance; however, sophisticated scheduling algorithms are required because the fog layer typically has fewer resources than the cloud. Task scheduling in cloud computing is an NP-hard problem. Therefore, we can maintain and build new scheduling algorithms to enhance the system's performance. Time and resource sharing, priority scheduling, and queuing approaches are just a few of the scheduling policies that can play a role in fog computing. In order to minimize power consumption and maximize response times for real-time applications, efficient scheduling is essential. In conclusion, the Internet of Things (IoT) is rapidly expanding, and the massive amounts of data it generates necessitate a lot of space, a lot of processing power, and a lot of other resources. The cloud can facilitate the management of such data streams, but it is not designed for use in real-time processing environments.