operating-systemembedded

The definitions of "Application" by Microsoft and uC/OS differ


uC/OS-III User's Manual says:

The design process of a real-time application involves splitting the work into tasks(also called threads), and each task responsible for a portion of the job.

From this quote, we can inferred that an application consists of tasks (threads).

Also, In Processes and Threads from Microsoft:

An application consists of one or more processes

Why different difinition?

Is this because uC/OS-III is for embedded environment and Microsoft is for PC environment?


Solution

  • In a PC environment, a process is basically the same thing as a program. A process has an address space - a chunk of virtual memory that can only be accessed by that process. It consists of one or several threads, executing in the same address space, sharing the same memory. Different threads can run on different CPU cores, executing simultaneously.

    On embedded RTOS systems, we don't really have all the dead weight of a hosted system process. Traditionally, RTOS therefore speaks of tasks, which is essentially the same thing as a thread. Except most microcontrollers are still single core, so the multi-tasking is simulated through task switches, everything running on one core. Older PC worked in the same manner.

    Traditional microcontrollers don't have virtual memory, but addresses physical memory addresses directly. Therefore anything running on the microcontroller can access anything, by default.

    Nowadays, upper-end embedded systems and hosted system are smeared together, as are the concepts. High-end microcontrollers have memory mapping units (MMU) capable of setting up virtual address spaces. PC programmers trinkle down into embedded systems and start looking for threads. And so on. The various concepts are blurring.