This paper discusses a dynamic task scheduling algorithm for multicore automotive engine control units (ECUs) to improve performance compared to the static priority scheduling recommended by AUTOSAR. The proposed scheduler aims to enhance CPU utilization, minimize preemption overhead, and ensure all tasks meet their real-time deadlines by dynamically assigning priorities based on slack. Simulation results demonstrate the effectiveness of the dynamic approach in optimizing task execution and addressing limitations of existing static scheduling methods.