Micro-Controller Operating Systems: Difference between revisions

Content deleted Content added
ce
m clean up, typo(s) fixed: between 5 to → between 5 and using AWB
Line 29:
 
==µC/OS-II==
Based on the source code written for µC/OS, and introduced as a commercial product in 1998, µC/OS-II is a [[Software portability|portable]], ROM-able, [[scalable]], preemptive, real-time, deterministic, multitasking [[Kernel (operating system)|kernel]] for [[microprocessor]]s, and [[digital signal processor]]s (DSPs). It manages up to 255 application tasks. Its size can be scaled (between 5 toand 24 Kbytes) to only contain the features needed for a given use.
 
Most of µC/OS-II is written in highly portable [[ANSI C]], with target microprocessor-specific code written in [[assembly language]]. Use of the latter is minimized to ease [[porting]] to other processors.
Line 78:
 
===Managing time===
µC/OS-II requires that a periodic time source be provided to keep track of time delays and timeouts. A tick should occur between 10 and 1000 times per second, or [[Hertz]]. The faster the tick rate, the more [[Overhead (computing)|overhead]] µC/OS-II imposes on the system. The frequency of the clock tick depends on the desired tick resolution of an application. Tick sources can be obtained by dedicating a hardware timer, or by generating an [[interrupt]] from an [[alternating current]] (AC) power line (50 or 60 &nbsp;Hz) signal. This periodic time source is termed a clock tick.<ref>{{cite book|last=Labrosse|first=Jean J.|title=MicroC/OS-II: The Real Time Kernel|pages=145–152|edition=Second}}</ref>
 
After a ''clock tick'' is determined, tasks can be:
Line 98:
 
===Task states===
µC/OS-III is a [[Computer multitasking|multitasking]] operating system. Each task is an infinite loop and can be in any one of five states (dormant, ready, running, interrupted, or pending). Task priorities can range from 0 (highest priority) to a maximum of 255 (lowest possible priority).
 
===Round robin scheduling===
When two or more tasks have the same priority, the kernel allows one task to run for a predetermined amount of time, named a ''quantum'', and then selects another task. This process is termed [[round robin scheduling]] or time slicing. The kernel gives control to the next task in line if: