Micro-Controller Operating Systems: Difference between revisions

Content deleted Content added
m Whitespace characters cut to standardize, aid edits via mobile devices. Cut needless carriage returns in sections.
Template:Infobox OS; WP:REFerences: plain text > WP:CITations; parameters: updates, reorders, adds, fills, author > last + first, conform to master templates. WP:LINKs: updates, adds. Small WP:EoS WP:TERSE WP:COPYEDITs, cut needless word repeats. Nonlead-word nonproper noun MOS:CAPS, MOS:HEADings-MOS:HEADCAPS > sentence case. WP:SLASH > and. Cut needless carriage return in paragraph.
Line 1:
{{Cleanup|reason=this article does not read like a good encyclopedia article.|date=February 2016}}
 
{{Infobox OS
| name = MicroC/OS
Line 6 ⟶ 4:
| caption =
| developer = Micrium, Inc.,<br/>Silicon Labs
| family =
| source model = [[Open Source]], Apache license (as of 2020)
| working state = Current
| source model = [[Open-source Sourcesoftware|Open-source]], Apache license (as of 2020)
| released = {{Start date and age|1991}}
| supported platforms = [[ARM Cortex-M#Cortex-M3|ARM Cortex-M3]], [[ARM Cortex-M#Cortex-M4|Cortex-M4F]], [[ARM7#ARM7TDMI|ARM7TDMI]]; [[Atmel AVR]]; [[eSi-RISC]], and many others.
| ui = μC/[[Graphical user interface|GUI]]
| family = [[Real-time operating system]]s
| latest release version = OS-III
| latest release date = {{Start date and age|2016}}
| repo = {{URL|github.com/SiliconLabs}}
| marketing target = [[Embedded device]]s
| programmed in = [[ANSI C]]
| kernel type = [[Microkernel]]
| language = English
| supported platforms = [[ARM Cortex-M#Cortex-M3|ARM Cortex-M3]], [[ARM Cortex-M#Cortex-M4|Cortex-M4F]], [[ARM7#ARM7TDMI|ARM7TDMI]]; [[Atmel AVR]]; [[eSi-RISC]], and many others.
| working state = Current
| familykernel type = [[Real-time operating system|Real-time]] [[microkernel]]s
| license = [[Open Source]] as of 2020. Previously [[Commercial software|Commercial]], [[freeware]] education use.
| ui = μC/[[Graphical user interface|GUI]]
| license = [[OpenApache SourceLicense|Apache]] as of 2020.; Previouslyformer [[Commercial software|Commercial]], [[freeware]] education use.
| website = {{URL|www.micrium.com/products}}
| repo = {{URL|github.com/SiliconLabs}}
}}
'''Micro-Controller Operating Systems''' ('''MicroC/OS''', stylized as '''μC/OS''') is a [[real-time operating system]] (RTOS) designed by Jean J. Labrosse in 1991. It is a priority-based [[Preemption (computing)|preemptive]] [[Real-time computing|real-time]] kernel for [[microprocessor]]s, written mostly in the programming language [[C (programming language)|C]]. It is intended for use in [[embedded system]]s.
 
MicroC/OS allows defining several functions in C, each of which can execute as an independent thread or task. Each task runs at a different priority, and runs as if it owns the [[central processing unit]] (CPU). Lower priority tasks can be preempted by higher priority tasks at any time. Higher priority tasks use operating system (OS) services (such as a delay or event) to allow lower priority tasks to execute. OS services are provided for managing tasks and memory, communicating between tasks, and timing.<ref>{{cite web |url=http://people.ece.cornell.edu/land/courses/ece5760/NiosII_muCOS/ |title=NiosII GCC with MicroC/OS |author=<!--Not statedUnstated--> |date=June 2006 |website=School of Electrical and Computer Engineering |publisher=Cornell University |access-date=25 April 2017}}</ref>
 
==History==
The MicroC/OS kernel was published originally in a three-part article in Embedded Systems Programming magazine and the book ''μC/OS The Real-Time Kernel'' by Labrosse.<ref>{{cite book |last=Labrosse |first=Jean J. Labrosse|date=15 June 2002 ({{ISBN|0title=μC/OS The Real-87930Time Kernel |edition=2nd |publisher=CRC Press |isbn=978-444-81578201037}}).</ref> The authorHe intended at first to simply describe the internals of a [[Software portability|portable]] operating systemOS he had developed for his own use, but later developed the OSit as a commercial product in versions II and III.
 
==μC/OS-II==
Line 54 ⟶ 52:
*Waiting (for an event)
*Interrupted ([[Interrupt handler|interrupt service routine]] (ISR))
Further, it can manage up to 64 tasks. However, it is recommended that eight of these tasks be reserved for μC/OS-II, leaving an application up to 56 tasks.<ref>{{cite book|last=Labrosse|first=Jean J.|title=MicroC/OS-II: The Real Time Kernel|page=77|edition=Second2nd}}</ref>
 
===Kernels===
The [[Kernel (operating system)|kernel]] is the name given to the program that does most of the housekeeping tasks for the operating system. The boot loader hands control over to the kernel, which initializes the various devices to a known state and makes the computer ready for general operations.<ref>[[Wikiversity:Operating Systems/Kernel Models#Monolithic Kernel]]</ref> The kernel is responsible for managing tasks (i.e., for managing the CPU's time) and communicating between tasks.<ref>{{cite book|last=Labrosse|first=Jean J.|title=MicroC/OS-II: The Real Time Kernel|page=39|edition=Second2nd}}</ref> The fundamental service provided by the kernel is [[context switch]]ing.
 
The [[scheduler]] is the part of the kernel responsible for determining which task runs next.<ref name="LabrosseP40">{{cite book|last=Labrosse|first=Jean J.|title=MicroC/OS-II: The Real Time Kernel|page=40|edition=Second2nd}}</ref> Most real-time kernels are priority based. In a priority-based kernel, control of the CPU is always given to the highest priority task ready to run. Two types of priority-based kernels exist: [[Computer multitasking#Cooperative multitasking|non-preemptive]] and [[Preemption (computing)|preemptive]]. Nonpreemptive kernels require that each task do something to explicitly give up control of the CPU.<ref name="LabrosseP40" /> A preemptive kernel is used when system responsiveness is more important. Thus, μC/OS-II and most commercial real-time kernels are preemptive.<ref>{{cite book|last=Labrosse|first=Jean J.|title=MicroC/OS-II: The Real Time Kernel|page=42|edition=Second2nd}}</ref> The highest priority task ready to run is always given control of the CPU.
 
===Assigning tasks===
Line 73 ⟶ 71:
*Change a task's priority
*Suspend and resume a task
*Get information about a task<ref>{{cite book|last=Labrosse|first=Jean J.|title=MicroC/OS-II: The Real Time Kernel|pages=45–49|edition=Second2nd}}</ref>
 
===Managing memory===
To avoid [[Fragmentation (computing)|fragmentation]], μC/OS-II allows applications to obtain fixed-sized memory blocks from a [[Memory management (operating systems)#Partitioned allocation|partition]] made of a contiguous memory area. All memory blocks are the same size, and the partition contains an [[integral]] number of blocks. Allocation and deallocation of these memory blocks is done in constant time and is a [[deterministic system]].<ref>{{cite book|last=Labrosse|first=Jean J.|title=MicroC/OS-II: The Real Time Kernel|pages=273–285|edition=Second2nd}}</ref>
 
===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=Second2nd}}</ref>
 
After a ''clock tick'' is determined, tasks can be:
Line 129 ⟶ 127:
A port involves three aspects: CPU, OS, and board specific (BSP) code. μC/OS-II and μC/OS-III have ports for most popular processors and boards in the market and are suitable for use in [[safety critical]] embedded systems such as aviation, medical systems, and nuclear installations. A μC/OS-III port involves writing or changing the contents of three kernel specific files: <code>OS_CPU.H</code>, <code>OS_CPU_A.ASM</code>, and <code>OS_CPU_C.C</code>. It is necessary to write or change the content of three CPU specific files: <code>CPU.H</code>, <code>CPU_A.ASM</code>, and <code>CPU_C.C</code>. Finally create or change a board support package (BSP) for the evaluation board or target board being used. A μC/OS-III port is similar to a μC/OS-II port. There are significantly more ports than listed here, and ports are subject to continuous development. Both μC/OS-II and μC/OS-III are supported by popular [[Transport Layer Security|SSL/TLS]] libraries such as [[wolfSSL]], which ensure security across all connections.
 
==Licensing Changechange==
After acquisition by Silicon Labs, Micrium in 2020 has changed to an[[open-source Open Sourcemodel]] licensing model in February 2020. This includes uC/OS III, all prior versions, all components: (USB, [[file system]], GUI, TCP/IP, etc).
 
==Documentation and Supportsupport==
InSupport additionis toavailable via a typical support forum, aand numberseveral of well-writtencomprehensive books, areseveral available.tailored Booksto area availablegiven microcontroller architecture and development platform, as free PDFs, or foras low-cost purchase asin hard-cover books. APaid numbersupport ofis booksavailable arefrom eachMicrium tailoredand toother a particular microcontroller architecture / development platformparties.
Paid support is available from Micrium and others.
 
==References==
Line 146 ⟶ 143:
==External links==
*{{Official website|www.micrium.com/products}}
*{{githubGitHub|SiliconLabs}}
*[http://people.ece.cornell.edu/land/courses/ece5760/NiosII_muCOS/uC_Functions.html Summary of Commonly Used uC/OS-II Functions and Data Structures]
*[http://people.ece.cornell.edu/land/courses/ece5760/NiosII_muCOS/ NiosII GCC with MicroC/OS]