Real- time systems are considered as one of the most important topics that have attracted the attention of researchers in various scientific and technical fields due to their widespread in many fields of communication, informatics, operating systems and automatic control systems. The basic idea in real- time systems is the execution of a set of tasks that are assigned to CPUs, within a time constraint associated with each of them, and this time constraint is called a deadline. Task scheduling in real- time systems is the main factor in determining the success or failure of the system. Therefore, many studies have imposed suggestions and hypotheses for improving scheduling, according to the underlined platform, whether it is single- processor, multi- processor, or multi- core processor. Researchers have recently focused on studying and providing solutions to scheduling problems, taking into account energy consumption since energy consumption today plays an important role in determining the efficiency and reliability of the system. Energy consumption can be saved either statically by turning the processor into sleep mode or dynamically by changing the frequency of the processor cores and thus reducing power consumption. However, a slight increase in frequency leads to executing more tasks in less time and thus can lead to an increase in the efficiency of the real- time system by reducing tasks which may miss its deadline at the time of execution. In this research, a new method has been proposed to control the processor frequency in an optimal manner that makes a balanced trade- off between power consumption and execution of tasks in real- time systems.