Mainstream scheduling methods for real-time operating systems (RMS)

Source: Internet
Author: User

There are many Scheduling Methods in the operating system. The main scheduling algorithms are introduced here. The scheduling algorithms such as EDF are not described. Currently, scheduling theory of almost all real-time commercial operating systems is based on RMS theory. the following are some hypothesis theories based on RMS: 1. There is no resource sharing, no busy waiting, no mutex, and no semaphore between tasks. 2. The deadline for each task is periodic. 3. preemptible tasks are pre-emptible based on priorities. 4. The principle of task priority distribution is that tasks with shorter cycles have higher priority. 5. This theoretical model is ignored for Task Switching and consumption of pure kernel tasks. The following formula is based on a basic theory of RMS: U represents the cpu usage of the system, C Represents the specific running time of the task, and T represents the periodic task deadline, n is the number of tasks, and the right side of the equation is the theoretical real-time scheduling rate. We can see that the scheduling rate is only related to the number of tasks. The more tasks, the less the real-time scheduling rate. On the right side of the equation: we can see that the scheduling rate is 69% when the task is close to infinity. This formula can be used to approximate that 69% of tasks in the task system can be scheduled in real time, that is, they can be executed in the final period. About 31% of the tasks are not real-time. This theoretical model is completely feasible in practical application. Next, let's look at a practical example: Assume that there are three tasks P1, P2, P3, and the running time and cycle, for example. The formula can be used to calculate the cpu usage of the system. Theoretically, the real-time scheduling rate is 0.725 <= 0.77976, so all three tasks can be scheduled in real time. Understanding the principles of RMS may be of great help to the real-time operating system.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.