Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Micro-Controller Operating Systems

From Wikipedia, the free encyclopedia
Real-time operating system
Operating system
MicroC/OS (μC/OS)
DeveloperMicrium, Inc.,
Silicon Labs
Written inANSI C
Working stateCurrent
Source modelOpen-source as of 2020
Initial release1991; 34 years ago (1991)
Latest releaseOS-III / 2016; 9 years ago (2016)
Repositorygithub.com/weston-embedded/uC-OS3
Marketing targetEmbedded devices
Available inEnglish
Supported platformsARM Cortex-M3,-M4F,ARM7TDMI;Atmel AVR;eSi-RISC, and many others
Kernel typeReal-timemicrokernel
Default
user interface
μC/GUI
LicenseApache as of 2020; formerCommercial,freeware education use
Official websiteweston-embedded.com/micrium/overview
Operating system
Micrium OS
DeveloperSilicon Labs
Written inANSI C
Working stateCurrent
Source modelOpen-source
Initial release2020; 5 years ago (2020)
Latest releasePart of Gecko Platform 4.2.0.0,[1] part of Gecko SDK 4.2.0.0[2] / December 14, 2022; 2 years ago (2022-12-14)
Repositorygithub.com/SiliconLabs/gecko_sdk/tree/gsdk_4.2/platform/micrium_os
Marketing targetEmbedded devices
Available inEnglish
Supported platformsexclusively Silicon Labs silicon
Kernel typeReal-timemicrokernel
LicenseApache
Official websitewww.silabs.com/developers/micrium-os
Operating system
Cesium RTOS
DeveloperWeston Embedded Solutions
Written inANSI C
Working stateCurrent
Source modelCommercial
Initial releaseJune 23, 2020; 5 years ago (2020-06-23) (forked from uC/OS-III V3.08.00)[3]
Latest releaseCs/OS3 3.09.05[3] / April 22, 2025; 7 months ago (2025-04-22)[3]
Marketing targetEmbedded devices
Available inEnglish
Supported platforms50+ unclear whether there is a 1-to-1 overlap withμC/OS
Kernel typeReal-timemicrokernel
LicenseCommercial
Official websiteweston-embedded.com/products/cesium

Micro-Controller Operating Systems (MicroC/OS, stylized asμC/OS, orMicrium OS) is areal-time operating system (RTOS) designed by Jean J. Labrosse in 1991. It is a priority-basedpreemptivereal-time kernel formicroprocessors, written mostly in the programming languageC. It is intended for use inembedded systems.

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 thecentral 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.[4]

History

[edit]

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.[5] He intended at first to simply describe the internals of aportable OS he had developed for his own use, but later developed it as a commercial product in his own company Micrium, Inc. in versions II and III.

In 2016 Micrium, Inc. was acquired by Silicon Laboratories[6] and it was subsequently released as open-source under theApache license.

Silicon Labs continues to maintain an open-source product named Micrium OS for use on their own silicon[7] and a group of former Micrium, Inc. employees (including Labrosse) provides consultancy and support for bothμC/OS and Cesium RTOS, a proprietary fork made just after the open-source release.[8]

μC/OS-II

[edit]

Based on the source code written forμC/OS, and introduced as a commercial product in 1998,μC/OS-II is aportable, ROM-able,scalable, preemptive, real-time, deterministic, multitaskingkernel formicroprocessors, anddigital signal processors (DSPs). It manages up to 64 tasks. Its size can be scaled (between 5 and 24 Kbytes) to only contain the features needed for a given use.

Most ofμC/OS-II is written in highly portableANSI C, with target microprocessor-specific code written inassembly language. Use of the latter is minimized to easeporting to other processors.

Uses in embedded systems

[edit]

μC/OS-II was designed for embedded uses. If the producer has the propertoolchain (i.e., C compiler, assembler, and linker-locator[clarification needed]),μC/OS-II can be embedded as part of a product.

μC/OS-II is used in many embedded systems, including:

Task states

[edit]

μC/OS-II is amultitasking operating system. Each task is an infinite loop and can be in any one of the following five states (see figure below additionally)

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.[9]

Kernels

[edit]

Thekernel 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.[10] The kernel is responsible for managing tasks (i.e., for managing the CPU's time) and communicating between tasks.[11] The fundamental service provided by the kernel iscontext switching.

Thescheduler is the part of the kernel responsible for determining which task runs next.[12] 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:non-preemptive andpreemptive. Nonpreemptive kernels require that each task do something to explicitly give up control of the CPU.[12] A preemptive kernel is used when system responsiveness is more important. Thus,μC/OS-II and most commercial real-time kernels are preemptive.[13] The highest priority task ready to run is always given control of the CPU.

Assigning tasks

[edit]

Tasks with the highest rate of execution are given the highest priority usingrate-monotonic scheduling.[14] This scheduling algorithm is used in real-time operating systems (RTOS) with astatic-priority scheduling class.[15]

Managing tasks

[edit]

Incomputing, a task is a unit ofexecution. In someoperating systems, a task is synonymous with aprocess, in others with athread. Inbatch processing computer systems, a task is a unit of execution within ajob.The system user ofμC/OS-II is able to control the tasks by using the following features:

  • Task feature
  • Task creation
  • Task stack & stack checking
  • Task deletion
  • Change a task's priority
  • Suspend and resume a task
  • Get information about a task[16]

Managing memory

[edit]

To avoidfragmentation,μC/OS-II allows applications to obtain fixed-sized memory blocks from apartition made of a contiguous memory area. All memory blocks are the same size, and the partition contains anintegral number of blocks. Allocation and deallocation of these memory blocks is done in constant time and is adeterministic system.[17]

Managing time

[edit]

μ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, orHertz. The faster the tick rate, the moreoverheadμ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 aninterrupt from analternating current (AC) power line (50 or 60 Hz) signal. This periodic time source is termed a clock tick.[18]

After aclock tick is determined, tasks can be:

  • Delaying a task
  • Resume a delayed task

Communicating between tasks

[edit]

Intertask or interprocess communication inμC/OS-II occurs via:semaphores, message mailbox, message queues, tasks, andinterrupt service routines (ISRs). They can interact with each other when a task or an ISR signals a task through a kernel object called an event control block (ECB). The signal is considered to be an event.

μC/OS-III

[edit]

μC/OS-III is the acronym for Micro-Controller Operating Systems Version 3, introduced in 2009 and adding functionality to theμC/OS-II RTOS.

μC/OS-III offers all of the features and functions ofμC/OS-II. The biggest difference is the number of supported tasks.μC/OS-II allows only 1 task at each of 255 priority levels, for a maximum of 255 tasks.μC/OS-III allows any number of application tasks, priority levels, and tasks per level, limited only by processor access to memory.[19][20]

μC/OS-II andμC/OS-III are currently maintained by Micrium, Inc., a subsidiary of Silicon Labs, and can be licensed per product or per product line.

Uses in embedded systems

[edit]

The uses are the same as forμC/OS-II

Task states

[edit]

μC/OS-III is amultitasking operating system. Each task is an infinite loop and can be in any one of five states (dormant, ready, running, interrupted, or pending).μC/OS-III supports an unlimited number of task priorities but configuringμC/OS-III to have between 32 and 256 task priorities typically suits most embedded systems well.[21]

Round robin scheduling

[edit]

When two or more tasks have the same priority, the kernel allows one task to run for a predetermined amount of time, named aquantum, and then selects another task. This process is termedround robin scheduling or time slicing. The kernel gives control to the next task in line if:

  • The current task has no work to do during its time slice, or
  • The current task completes before the end of its time slice, or
  • The time slice ends.

Kernels

[edit]

The kernel functionality forμC/OS-III is the same as forμC/OS-II.

Managing tasks

[edit]

Task management also functions the same as forμC/OS-II. However,μC/OS-III supports multitasking and allows an application to have any number of tasks. The maximum number of tasks is limited by only the amount of computer memory (both code and data space) available to the processor.

A task can be implemented viarunning to scheduled completion, in which the task deletes itself when it is finished, or more typically as an infinite loop, waiting for events to occur and processing those events.

Managing memory

[edit]

Memory management is performed in the same way as inμC/OS-II.

Managing time

[edit]

μC/OS-III offers the same time managing features asμC/OS-II. It also provides services to applications so that tasks can suspend their execution for user-defined time delays. Delays are specified by a number of either clock ticks, or hours, minutes, seconds, andmilliseconds.

Communicating between tasks

[edit]

Sometimes, a task or ISR must communicate information to another task, because it isunsafe for two tasks to access the same specific data or hardware resource at once. This can be resolved via an information transfer, termed inter-task communication. Information can be communicated between tasks in two ways: through global data, or by sending messages.

When using global variables, each task or ISR must ensure that it has exclusive access to variables. If an ISR is involved, the only way to ensure exclusive access to common variables is to disableinterrupts. If two tasks share data, each can gain exclusive access to variables by either disabling interrupts, locking the scheduler, using asemaphore, or preferably, using amutual exclusion semaphore. Messages can be sent to either an intermediate object called amessage queue, or directly to a task, since inμC/OS-III, each task has its own built-in message queue. Use an external message queue if multiple tasks are to wait for messages. Send a message directly to a task if only one task will process the data received. While a task waits for a message to arrive, it uses no CPU time.

Ports

[edit]

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 insafety 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:OS_CPU.H,OS_CPU_A.ASM, andOS_CPU_C.C. 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 popularSSL/TLS libraries such aswolfSSL, which ensure security across all connections.

Licensing change

[edit]

After acquisition by Silicon Labs, Micrium in 2020 changed toopen-source model licensing in February 2020. This includes uC/OS III, all prior versions, all components: USB,file system, GUI, TCP/IP, etc.

Documentation and support

[edit]

Support is available via a typical support forum, and several comprehensive books, of which some are tailored to a given microcontroller architecture and development platform, as free PDFs, or as low-cost purchase in hard-cover. Paid support is available from Weston Embedded Solutions.

References

[edit]
  1. ^"Gecko Platform 4.2.0.0 GA"(PDF). 2022-12-14. Retrieved2023-01-04.
  2. ^"gecko_sdk Releases on github.com".GitHub. Retrieved2023-01-04.
  3. ^abc"Cs/OS3 Release Notes". Weston Embedded Solutions.
  4. ^"NiosII GCC with MicroC/OS".School of Electrical and Computer Engineering. Cornell University. June 2006. Retrieved25 April 2017.
  5. ^Labrosse, Jean J. (15 June 2002).μC/OS The Real-Time Kernel (2nd ed.). CRC Press.ISBN 978-1578201037.
  6. ^"What is Micrium?". Weston Embedded Solutions. Retrieved2023-01-04.
  7. ^"Micrium Software and Documentation". Retrieved2023-01-04.
  8. ^"Why Cesium RTOS?". Weston Embedded Solutions. Retrieved2023-01-04.
  9. ^Labrosse, Jean J.MicroC/OS-II: The Real Time Kernel (2nd ed.). p. 77.
  10. ^Wikiversity:Operating Systems/Kernel Models#Monolithic Kernel
  11. ^Labrosse, Jean J.MicroC/OS-II: The Real Time Kernel (2nd ed.). p. 39.
  12. ^abLabrosse, Jean J.MicroC/OS-II: The Real Time Kernel (2nd ed.). p. 40.
  13. ^Labrosse, Jean J.MicroC/OS-II: The Real Time Kernel (2nd ed.). p. 42.
  14. ^Liu, Chung Lang; Layland, James W. (1973). "Scheduling algorithms for multiprogramming in a hard real-time environment".Journal of the ACM.20 (1):46–61.CiteSeerX 10.1.1.36.8216.doi:10.1145/321738.321743.S2CID 59896693.
  15. ^Bovet, Daniel."Understanding The Linux Kernel". Archived fromthe original on 2014-09-21.
  16. ^Labrosse, Jean J.MicroC/OS-II: The Real Time Kernel (2nd ed.). pp. 45–49.
  17. ^Labrosse, Jean J.MicroC/OS-II: The Real Time Kernel (2nd ed.). pp. 273–285.
  18. ^Labrosse, Jean J.MicroC/OS-II: The Real Time Kernel (2nd ed.). pp. 145–152.
  19. ^"μC/OS-II and μC/OS-III Features Comparison".Micrium.
  20. ^"μC/OS-III overview".Micrium.
  21. ^"μC/OS-III™ Real-Time Operating System"(PDF).media.digikey.com.

Sources

[edit]

External links

[edit]
Operating
systems
POSIX support
Unix-like
LiteOS
Partial
TRON support
Partial
Capability-based
Java virtual machine
DOS
L4 kernel
Psion
Microsoft
IBM
Texas Instruments
DECPDP-11 &VAX
Low resource
Frameworks,kits
Developers
Kernels
L4 family
Macintosh hosted
Psion
Amiga-type
Operating
systems
POSIX support
Unix-like
Partial
Capability-based
L4 kernel
Java virtual machine
Macintosh hosted
Unix-like
Psion
  • EPOCSymbian OS
  • Amiga-type
    Microsoft
    AIM alliance
    Frameworks,kits
    Developers
    Retrieved from "https://en.wikipedia.org/w/index.php?title=Micro-Controller_Operating_Systems&oldid=1316453815"
    Categories:
    Hidden categories:

    [8]ページ先頭

    ©2009-2025 Movatter.jp