ArticleslgStudy

science

Micro-Controller Operating Systems

Micro-Controller Operating Systems is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Micro-Controller Operating Systems rather than just read about it. In short: Micro-Controller Operating Systems (MicroC/OS, stylized as μC/OS, or Micrium OS) is a real-time operating system (RTOS) designed by Jean J. Labrosse in 1991.

Key takeaways

  • Micro-Controller Operating Systems belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Micro-Controller Operating Systems to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Micro-Controller Operating Systems from memory before moving on to harder problems.

Reference excerpt

Micro-Controller Operating Systems (MicroC/OS, stylized as μC/OS, or Micrium OS) is a real-time operating system (RTOS) designed by Jean J. Labrosse in 1991. It is a priority-based preemptive real-time kernel for microprocessors, written mostly in the programming language C. It is intended for use in embedded 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 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.

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. He intended at first to simply describe the internals of a portable 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 and it was subsequently released as open-source under the Apache license. Silicon Labs continues to maintain an open-source product named Micrium OS for use on their own silicon 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.

μ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 portable, ROM-able, scalable, preemptive, real-time, deterministic, multitasking kernel for microprocessors, and digital 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 portable ANSI C, with target microprocessor-specific code written in assembly language. Use of the latter is minimized to ease porting to other processors.

Uses in embedded systems μC/OS-II was designed for embedded uses. If the producer has the proper toolchain (i.e., C compiler, assembler, and linker-locator), μC/OS-II can be embedded as part of a product. μC/OS-II is used in many embedded systems, including:

Avionics Medical equipment and devices Data communications equipment White goods (appliances) Mobile phones, personal digital assistants (PDAs), MIDs Industrial controls Consumer electronics Automotive

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

Dormant Ready Running Waiting (for an event) Interrupted (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.

Kernels The 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. The kernel is responsible for managing tasks (i.e., for managing the CPU's time) and communicating between tasks. The fundamental service provided by the kernel is context switching. The scheduler is the part of the kernel responsible for determining which task runs next. 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 and preemptive. Nonpreemptive kernels require that each task do something to explicitly give up control of the CPU. A preemptive kernel is used when system responsiveness is more important. Thus, μC/OS-II and most commercial real-time kernels are preemptive. The highest priority task ready to run is always given control of the CPU.

Assigning tasks Tasks with the highest rate of execution are given the highest priority using rate-monotonic scheduling. This scheduling algorithm is used in real-time operating systems (RTOS) with a static-priority scheduling class.

Managing tasks In computing, a task is a unit of execution. In some operating systems, a task is synonymous with a process, in others with a thread. In batch processing computer systems, a task is a unit of execution within a job. 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

Managing memory To avoid fragmentation, μC/OS-II allows applications to obtain fixed-sized memory blocks from a 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.

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 μ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 Hz) signal. This periodic time source is termed a clock tick. After a clock tick is determined, tasks can be:

Delaying a task Resume a delayed task

Communicating between tasks Intertask or interprocess communication in μC/OS-II occurs via: semaphores, message mailbox, message queues, tasks, and interrupt 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.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Micro-Controller Operating Systems

Start with the simplest possible case. Write down what Micro-Controller Operating Systems claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Micro-Controller Operating Systems before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Micro-Controller Operating Systems ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Micro-Controller Operating Systems

In research
Micro-Controller Operating Systems appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Micro-Controller Operating Systems in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Micro-Controller Operating Systems is common in secondary-school and first-year university syllabi. It links to neighbouring topics ARM operating systems, Embedded operating systems, Microkernel-based operating systems, so understanding it makes those chapters shorter.
In everyday life
Look for Micro-Controller Operating Systems outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Micro-Controller Operating Systems in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Micro-Controller Operating Systems means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Micro-Controller Operating Systems out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Micro-Controller Operating Systems in simple terms?

Micro-Controller Operating Systems (MicroC/OS, stylized as μC/OS, or Micrium OS) is a real-time operating system (RTOS) designed by Jean J. Labrosse in 1991.

Why does Micro-Controller Operating Systems matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Micro-Controller Operating Systems?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Micro-Controller Operating Systems.

Tags

  • ARM operating systems
  • Embedded operating systems
  • Microkernel-based operating systems
  • Microkernels
  • Real-time operating systems

Keep exploring