Resource allocation in smart settings, more specifically in Internet of Things (IoT) transportation, is challenging due to the complexity and dynamic nature of fog computing. The demands of users may alter over time, necessitating more trustworthy resource allocation and administration. Effective resource allocation and management systems must be designed to accommodate changing user needs. Fog devices don’t just run fog-specific software. Resource and link failures could be brought on by the absence of centralised administration, device autonomy, and wireless communication in the fog environment. Resources must be allocated and managed effectively because the majority of fog devices are battery-powered. Latency-aware IoT applications, such as intelligent transportation, healthcare, and emergency response, are now pervasive as a result of the enormous growth of ubiquitous computing. These services generate a large amount of data, which requires edge processing. The flexibility and services on-demand for the cloud can successfully manage these applications. It’s not always advisable to manage IoT applications exclusively in the cloud, especially for latency-sensitive applications. Thus, fog computing has emerged as a bridge between the cloud and the devices it supports. This is typically how sensors and IoT devices are connected. These neighbouring Fog devices control storage and intermediary computation. In order to improve the Fog environment reliability in IoT-based systems, this paper suggests resource allocation and management strategy. When assigning resources, latency and energy efficiency are taken into account. Users may prioritise cost-effectiveness over speed in a fog. Simulation was performed in the iFogSim2 simulation tool, and performance was compared with one of the existing state-of-the-art strategy. A comparison of results shows that the proposed strategy reduced latency by 10.3% and energy consumption by 21.85% when compared with the existing strategy.