<s>
Micro-Controller	B-Operating_System
Operating	I-Operating_System
Systems	I-Operating_System
(	O
MicroC/OS	O
,	O
stylized	O
as	O
μC/OS	O
,	O
or	O
Micrium	O
OS	O
)	O
is	O
a	O
real-time	B-Operating_System
operating	I-Operating_System
system	I-Operating_System
(	O
RTOS	B-Operating_System
)	O
designed	O
by	O
Jean	O
J	O
.	O
Labrosse	O
in	O
1991	O
.	O
</s>
<s>
It	O
is	O
a	O
priority-based	O
preemptive	B-Operating_System
real-time	B-General_Concept
kernel	B-Operating_System
for	O
microprocessors	B-Architecture
,	O
written	O
mostly	O
in	O
the	O
programming	B-Language
language	I-Language
C	I-Language
.	O
It	O
is	O
intended	O
for	O
use	O
in	O
embedded	B-Architecture
systems	I-Architecture
.	O
</s>
<s>
MicroC/OS	O
allows	O
defining	O
several	O
functions	O
in	O
C	B-Language
,	O
each	O
of	O
which	O
can	O
execute	O
as	O
an	O
independent	O
thread	B-Operating_System
or	O
task	O
.	O
</s>
<s>
Each	O
task	O
runs	O
at	O
a	O
different	O
priority	O
,	O
and	O
runs	O
as	O
if	O
it	O
owns	O
the	O
central	B-General_Concept
processing	I-General_Concept
unit	I-General_Concept
(	O
CPU	O
)	O
.	O
</s>
<s>
Higher	O
priority	O
tasks	O
use	O
operating	B-General_Concept
system	I-General_Concept
(	O
OS	O
)	O
services	O
(	O
such	O
as	O
a	O
delay	O
or	O
event	O
)	O
to	O
allow	O
lower	O
priority	O
tasks	O
to	O
execute	O
.	O
</s>
<s>
The	O
MicroC/OS	O
kernel	B-Operating_System
was	O
published	O
originally	O
in	O
a	O
three-part	O
article	O
in	O
Embedded	B-Architecture
Systems	I-Architecture
Programming	O
magazine	O
and	O
the	O
book	O
μC/OS	O
The	O
Real-Time	B-General_Concept
Kernel	B-Operating_System
by	O
Labrosse	O
.	O
</s>
<s>
He	O
intended	O
at	O
first	O
to	O
simply	O
describe	O
the	O
internals	O
of	O
a	O
portable	B-Architecture
OS	O
he	O
had	O
developed	O
for	O
his	O
own	O
use	O
,	O
but	O
later	O
developed	O
it	O
as	O
a	O
commercial	B-Application
product	O
in	O
his	O
own	O
company	O
Micrium	O
,	O
Inc	O
.	O
in	O
versions	O
II	O
and	O
III	O
.	O
</s>
<s>
In	O
2016	O
Micrium	O
,	O
Inc	O
.	O
was	O
acquired	O
by	O
Silicon	O
Laboratories	O
and	O
it	O
was	O
subsequently	O
released	O
as	O
open-source	B-License
unde	O
the	O
Apache	B-Application
license	I-Application
.	O
</s>
<s>
Silicon	O
Labs	O
continues	O
to	O
maintain	O
an	O
open-source	B-License
product	O
named	O
Micrium	O
OS	O
for	O
use	O
on	O
their	O
own	O
silicon	O
and	O
a	O
group	O
of	O
former	O
Micrium	O
,	O
Inc	O
.	O
employees	O
(	O
including	O
Labrosse	O
)	O
provides	O
consultancy	O
and	O
support	O
for	O
both	O
μC/OS	O
and	O
Cesium	O
RTOS	B-Operating_System
,	O
a	O
proprietary	O
fork	O
made	O
just	O
after	O
the	O
open-source	B-License
release	O
.	O
</s>
<s>
Based	O
on	O
the	O
source	O
code	O
written	O
for	O
μC/OS	O
,	O
and	O
introduced	O
as	O
a	O
commercial	B-Application
product	O
in	O
1998	O
,	O
μC/OS	B-Operating_System
-II	I-Operating_System
is	O
a	O
portable	B-Architecture
,	O
ROM-able	O
,	O
scalable	B-Architecture
,	O
preemptive	B-Operating_System
,	O
real-time	B-General_Concept
,	O
deterministic	O
,	O
multitasking	B-Operating_System
kernel	B-Operating_System
for	O
microprocessors	B-Architecture
,	O
and	O
digital	B-Architecture
signal	I-Architecture
processors	I-Architecture
(	O
DSPs	O
)	O
.	O
</s>
<s>
Most	O
of	O
μC/OS	B-Operating_System
-II	I-Operating_System
is	O
written	O
in	O
highly	O
portable	B-Architecture
ANSI	O
C	B-Language
,	O
with	O
target	O
microprocessor-specific	O
code	O
written	O
in	O
assembly	B-Language
language	I-Language
.	O
</s>
<s>
μC/OS	B-Operating_System
-II	I-Operating_System
was	O
designed	O
for	O
embedded	O
uses	O
.	O
</s>
<s>
If	O
the	O
producer	O
has	O
the	O
proper	O
tool	O
chain	O
(	O
i.e.	O
,	O
C	B-Language
compiler	O
,	O
assembler	B-Language
,	O
and	O
linker-locator	O
)	O
,	O
μC/OS	B-Operating_System
-II	I-Operating_System
can	O
be	O
embedded	O
as	O
part	O
of	O
a	O
product	O
.	O
</s>
<s>
μC/OS	B-Operating_System
-II	I-Operating_System
is	O
used	O
in	O
many	O
embedded	B-Architecture
systems	I-Architecture
,	O
including	O
:	O
</s>
<s>
μC/OS	B-Operating_System
-II	I-Operating_System
is	O
a	O
multitasking	B-Operating_System
operating	I-Operating_System
system	I-Operating_System
.	O
</s>
<s>
However	O
,	O
it	O
is	O
recommended	O
that	O
eight	O
of	O
these	O
tasks	O
be	O
reserved	O
for	O
μC/OS	B-Operating_System
-II	I-Operating_System
,	O
leaving	O
an	O
application	O
up	O
to	O
56	O
tasks	O
.	O
</s>
<s>
The	O
kernel	B-Operating_System
is	O
the	O
name	O
given	O
to	O
the	O
program	O
that	O
does	O
most	O
of	O
the	O
housekeeping	O
tasks	O
for	O
the	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
The	O
boot	O
loader	O
hands	O
control	O
over	O
to	O
the	O
kernel	B-Operating_System
,	O
which	O
initializes	O
the	O
various	O
devices	O
to	O
a	O
known	O
state	O
and	O
makes	O
the	O
computer	O
ready	O
for	O
general	O
operations	O
.	O
</s>
<s>
The	O
kernel	B-Operating_System
is	O
responsible	O
for	O
managing	O
tasks	O
(	O
i.e.	O
,	O
for	O
managing	O
the	O
CPU	O
's	O
time	O
)	O
and	O
communicating	O
between	O
tasks	O
.	O
</s>
<s>
The	O
fundamental	O
service	O
provided	O
by	O
the	O
kernel	B-Operating_System
is	O
context	B-Operating_System
switching	I-Operating_System
.	O
</s>
<s>
The	O
scheduler	B-Algorithm
is	O
the	O
part	O
of	O
the	O
kernel	B-Operating_System
responsible	O
for	O
determining	O
which	O
task	O
runs	O
next	O
.	O
</s>
<s>
Most	O
real-time	B-General_Concept
kernels	B-Operating_System
are	O
priority	O
based	O
.	O
</s>
<s>
In	O
a	O
priority-based	O
kernel	B-Operating_System
,	O
control	O
of	O
the	O
CPU	O
is	O
always	O
given	O
to	O
the	O
highest	O
priority	O
task	O
ready	O
to	O
run	O
.	O
</s>
<s>
Two	O
types	O
of	O
priority-based	O
kernels	B-Operating_System
exist	O
:	O
non-preemptive	O
and	O
preemptive	B-Operating_System
.	O
</s>
<s>
Nonpreemptive	O
kernels	B-Operating_System
require	O
that	O
each	O
task	O
do	O
something	O
to	O
explicitly	O
give	O
up	O
control	O
of	O
the	O
CPU	O
.	O
</s>
<s>
A	O
preemptive	B-Operating_System
kernel	B-Operating_System
is	O
used	O
when	O
system	O
responsiveness	O
is	O
more	O
important	O
.	O
</s>
<s>
Thus	O
,	O
μC/OS	B-Operating_System
-II	I-Operating_System
and	O
most	O
commercial	B-Application
real-time	B-General_Concept
kernels	B-Operating_System
are	O
preemptive	B-Operating_System
.	O
</s>
<s>
Tasks	O
with	O
the	O
highest	O
rate	O
of	O
execution	O
are	O
given	O
the	O
highest	O
priority	O
using	O
rate-monotonic	B-Operating_System
scheduling	I-Operating_System
.	O
</s>
<s>
This	O
scheduling	B-Algorithm
algorithm	O
is	O
used	O
in	O
real-time	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
(	O
RTOS	B-Operating_System
)	O
with	O
a	O
static-priority	B-Operating_System
scheduling	I-Operating_System
class	I-Operating_System
.	O
</s>
<s>
In	O
some	O
operating	B-General_Concept
systems	I-General_Concept
,	O
a	O
task	O
is	O
synonymous	O
with	O
a	O
process	B-Operating_System
,	O
in	O
others	O
with	O
a	O
thread	B-Operating_System
.	O
</s>
<s>
In	O
batch	B-General_Concept
processing	I-General_Concept
computer	O
systems	O
,	O
a	O
task	O
is	O
a	O
unit	O
of	O
execution	O
within	O
a	O
job	B-Application
.	O
</s>
<s>
The	O
system	O
user	O
of	O
μC/OS	B-Operating_System
-II	I-Operating_System
is	O
able	O
to	O
control	O
the	O
tasks	O
by	O
using	O
the	O
following	O
features	O
:	O
</s>
<s>
To	O
avoid	O
fragmentation	B-Architecture
,	O
μC/OS	B-Operating_System
-II	I-Operating_System
allows	O
applications	O
to	O
obtain	O
fixed-sized	O
memory	O
blocks	O
from	O
a	O
partition	O
made	O
of	O
a	O
contiguous	O
memory	O
area	O
.	O
</s>
<s>
μC/OS	B-Operating_System
-II	I-Operating_System
requires	O
that	O
a	O
periodic	O
time	O
source	O
be	O
provided	O
to	O
keep	O
track	O
of	O
time	O
delays	O
and	O
timeouts	O
.	O
</s>
<s>
The	O
faster	O
the	O
tick	O
rate	O
,	O
the	O
more	O
overhead	O
μC/OS	B-Operating_System
-II	I-Operating_System
imposes	O
on	O
the	O
system	O
.	O
</s>
<s>
Tick	O
sources	O
can	O
be	O
obtained	O
by	O
dedicating	O
a	O
hardware	O
timer	O
,	O
or	O
by	O
generating	O
an	O
interrupt	B-Application
from	O
an	O
alternating	O
current	O
(	O
AC	O
)	O
power	O
line	O
(	O
50	O
or	O
60Hz	O
)	O
signal	O
.	O
</s>
<s>
Intertask	O
or	O
interprocess	O
communication	O
in	O
μC/OS	B-Operating_System
-II	I-Operating_System
occurs	O
via	O
:	O
semaphores	B-Operating_System
,	O
message	O
mailbox	B-Operating_System
,	O
message	B-Operating_System
queues	I-Operating_System
,	O
tasks	O
,	O
and	O
interrupt	B-General_Concept
service	I-General_Concept
routines	I-General_Concept
(	O
ISRs	O
)	O
.	O
</s>
<s>
They	O
can	O
interact	O
with	O
each	O
other	O
when	O
a	O
task	O
or	O
an	O
ISR	O
signals	O
a	O
task	O
through	O
a	O
kernel	B-Operating_System
object	O
called	O
an	O
event	O
control	O
block	O
(	O
ECB	O
)	O
.	O
</s>
<s>
μC/OS	O
-III	O
is	O
the	O
acronym	O
for	O
Micro-Controller	B-Operating_System
Operating	I-Operating_System
Systems	I-Operating_System
Version	O
3	O
,	O
introduced	O
in	O
2009	O
and	O
adding	O
functionality	O
to	O
the	O
μC/OS	B-Operating_System
-II	I-Operating_System
RTOS	B-Operating_System
.	O
</s>
<s>
μC/OS	O
-III	O
offers	O
all	O
of	O
the	O
features	O
and	O
functions	O
of	O
μC/OS	B-Operating_System
-II	I-Operating_System
.	O
</s>
<s>
μC/OS	B-Operating_System
-II	I-Operating_System
allows	O
only	O
1	O
task	O
at	O
each	O
of	O
255	O
priority	O
levels	O
,	O
for	O
a	O
maximum	O
of	O
255	O
tasks	O
.	O
</s>
<s>
μC/OS	O
-III	O
allows	O
any	O
number	O
of	O
application	O
tasks	O
,	O
priority	O
levels	O
,	O
and	O
tasks	O
per	O
level	O
,	O
limited	O
only	O
by	O
processor	O
access	O
to	O
memory	O
.	O
</s>
<s>
μC/OS	B-Operating_System
-II	I-Operating_System
and	O
μC/OS	O
-III	O
are	O
currently	O
maintained	O
by	O
Micrium	O
,	O
Inc.	O
,	O
a	O
subsidiary	O
of	O
Silicon	O
Labs	O
,	O
and	O
can	O
be	O
licensed	O
per	O
product	O
or	O
per	O
product	O
line	O
.	O
</s>
<s>
μC/OS	O
-III	O
is	O
a	O
multitasking	B-Operating_System
operating	I-Operating_System
system	I-Operating_System
.	O
</s>
<s>
When	O
two	O
or	O
more	O
tasks	O
have	O
the	O
same	O
priority	O
,	O
the	O
kernel	B-Operating_System
allows	O
one	O
task	O
to	O
run	O
for	O
a	O
predetermined	O
amount	O
of	O
time	O
,	O
named	O
a	O
quantum	O
,	O
and	O
then	O
selects	O
another	O
task	O
.	O
</s>
<s>
This	O
process	B-Operating_System
is	O
termed	O
round	B-Algorithm
robin	I-Algorithm
scheduling	I-Algorithm
or	O
time	O
slicing	O
.	O
</s>
<s>
The	O
kernel	B-Operating_System
gives	O
control	O
to	O
the	O
next	O
task	O
in	O
line	O
if	O
:	O
</s>
<s>
The	O
kernel	B-Operating_System
functionality	O
for	O
μC/OS	O
-III	O
is	O
the	O
same	O
as	O
for	O
μC/OS	B-Operating_System
-II	I-Operating_System
.	O
</s>
<s>
Task	O
management	O
also	O
functions	O
the	O
same	O
as	O
for	O
μC/OS	B-Operating_System
-II	I-Operating_System
.	O
</s>
<s>
However	O
,	O
μC/OS	O
-III	O
supports	O
multitasking	B-Operating_System
and	O
allows	O
an	O
application	O
to	O
have	O
any	O
number	O
of	O
tasks	O
.	O
</s>
<s>
A	O
task	O
can	O
be	O
implemented	O
viarunning	O
to	O
scheduled	B-Algorithm
completion	O
,	O
in	O
which	O
the	O
task	O
deletes	O
itself	O
when	O
it	O
is	O
finished	O
,	O
or	O
more	O
typically	O
as	O
an	O
infinite	O
loop	O
,	O
waiting	O
for	O
events	O
to	O
occur	O
and	O
processing	O
those	O
events	O
.	O
</s>
<s>
Memory	O
management	O
is	O
performed	O
in	O
the	O
same	O
way	O
as	O
in	O
μC/OS	B-Operating_System
-II	I-Operating_System
.	O
</s>
<s>
μC/OS	O
-III	O
offers	O
the	O
same	O
time	O
managing	O
features	O
as	O
μC/OS	B-Operating_System
-II	I-Operating_System
.	O
</s>
<s>
If	O
an	O
ISR	O
is	O
involved	O
,	O
the	O
only	O
way	O
to	O
ensure	O
exclusive	O
access	O
to	O
common	O
variables	O
is	O
to	O
disable	O
interrupts	B-Application
.	O
</s>
<s>
If	O
two	O
tasks	O
share	O
data	O
,	O
each	O
can	O
gain	O
exclusive	O
access	O
to	O
variables	O
by	O
either	O
disabling	O
interrupts	B-Application
,	O
locking	O
the	O
scheduler	B-Algorithm
,	O
using	O
a	O
semaphore	B-Operating_System
,	O
or	O
preferably	O
,	O
using	O
a	O
mutual	B-Operating_System
exclusion	I-Operating_System
semaphore	B-Operating_System
.	O
</s>
<s>
Messages	O
can	O
be	O
sent	O
to	O
either	O
an	O
intermediate	O
object	O
called	O
a	O
message	B-Operating_System
queue	I-Operating_System
,	O
or	O
directly	O
to	O
a	O
task	O
,	O
since	O
in	O
μC/OS	O
-III	O
,	O
each	O
task	O
has	O
its	O
own	O
built-in	O
message	B-Operating_System
queue	I-Operating_System
.	O
</s>
<s>
Use	O
an	O
external	O
message	B-Operating_System
queue	I-Operating_System
if	O
multiple	O
tasks	O
are	O
to	O
wait	O
for	O
messages	O
.	O
</s>
<s>
Send	O
a	O
message	O
directly	O
to	O
a	O
task	O
if	O
only	O
one	O
task	O
will	O
process	B-Operating_System
the	O
data	O
received	O
.	O
</s>
<s>
μC/OS	B-Operating_System
-II	I-Operating_System
and	O
μC/OS	O
-III	O
have	O
ports	O
for	O
most	O
popular	O
processors	O
and	O
boards	O
in	O
the	O
market	O
and	O
are	O
suitable	O
for	O
use	O
in	O
safety	B-Application
critical	I-Application
embedded	B-Architecture
systems	I-Architecture
such	O
as	O
aviation	O
,	O
medical	O
systems	O
,	O
and	O
nuclear	O
installations	O
.	O
</s>
<s>
A	O
μC/OS	O
-III	O
port	O
involves	O
writing	O
or	O
changing	O
the	O
contents	O
of	O
three	O
kernel	B-Operating_System
specific	O
files	O
:	O
OS_CPU.H	O
,	O
OS_CPU_A.ASM	O
,	O
and	O
OS_CPU_C.C.	O
</s>
<s>
A	O
μC/OS	O
-III	O
port	O
is	O
similar	O
to	O
a	O
μC/OS	B-Operating_System
-II	I-Operating_System
port	O
.	O
</s>
<s>
Both	O
μC/OS	B-Operating_System
-II	I-Operating_System
and	O
μC/OS	O
-III	O
are	O
supported	O
by	O
popular	O
SSL/TLS	B-Protocol
libraries	O
such	O
as	O
wolfSSL	B-Protocol
,	O
which	O
ensure	O
security	O
across	O
all	O
connections	O
.	O
</s>
<s>
After	O
acquisition	O
by	O
Silicon	O
Labs	O
,	O
Micrium	O
in	O
2020	O
changed	O
to	O
open-source	B-License
model	I-License
licensing	O
in	O
February	O
2020	O
.	O
</s>
<s>
This	O
includes	O
uC/OS	B-Operating_System
III	O
,	O
all	O
prior	O
versions	O
,	O
all	O
components	O
:	O
USB	O
,	O
file	B-Application
system	I-Application
,	O
GUI	B-Application
,	O
TCP/IP	O
,	O
etc	O
.	O
</s>
