A detailed overview of real-time multitasking operating systems?

Source: Internet
Author: User
Keywords Program Ape
Tags applied different hard it is learned multitasking operating operating systems

I have just tasted a real time system in college, the work of these years has not been exposed to such knowledge, has been forgotten almost, with the impression that the things learned at that time.

Real-time systems are very different from the systems we normally use. Real time system has soft real-time and hard real-time points, soft real-time is applied to if the failure of a task does not immediately cause property loss or personal injury or loss is acceptable, and hard if the failure of the task will result in property loss or personal injury and other unacceptable major accidents, it can be seen, Soft real-time is mainly used in commercial and industrial, hard real-time system should be used in military and personal security equivalent areas such as civil aviation.

A notable feature of real-time systems is that any task must be completed within the specified time, one of the tasks here is the execution of the process, it differs from the Non-real-time system is the task scheduling algorithm, the task of the Non-real-time system is based on priority scheduling, such as a number of suspended threads, The operating system calculates the priority of different tasks based on various algorithms (some are fixed-time slices, there are also the shortest first, or the longest priority, so that they are queued to perform according to priority, each task to run a certain amount of time after the suspension of the next task, of course, this is for a single CPU. The real-time system will arrange the task queue according to the end time of the task, and get the most CPU time for the task closest to the deadline. Of course, it can be considered that the algorithm of real-time system is a special priority algorithm.

Although the shortest priority algorithm in the non real time system is very close to the idea of real time system, but it is worth mentioning that, in real-time systems, the scheduling thread is enforced, that is, regardless of whether the current task CP time is used up, every time (this time is a fixed value), will run a scheduling thread, such as, Run 5 milliseconds every 100 milliseconds, and when the time is up, the scheduler is forced to switch to the scheduling process, where the scheduling process will reorder the existing tasks while it is running. Therefore, in theory, the real-time system will never crash.

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.