1. uc/os-ii File structure
2. UC/OS-II Components
Uc/os-ii can be broadly divided into the core of the system (including task scheduling), task management, time management, multitasking synchronization and communication, memory management, CPU migration and other parts.
(1) Core (OSCORE.C): UC/OS-II processing core, including initialization, start-up, interrupt management, clock interrupt, task scheduling and event processing for the basic maintenance of the system functions.
(2) Task management (OSTASK.C): Contains functions that are closely related to task operations, including task creation, deletion, suspend, and recovery, Uc/os II is dispatched as a basic unit of tasks.
(3) Clock section (OSTIME.C): the smallest clock unit in the UC/OS-II is the Timetick (Clock beat), which includes clock-related functions such as time delay, clock setup, and clock recovery.
(4) Multitasking synchronization and communication (OSMBOX.C, OSQ.C, OSSEM.C, OSMUTEX.C, OSFLAG.C): Contains event management functions involving Mbox, Msgq, Sem, Mutex, flag, etc.
(5) Memory Management Section (OSMEM.C): Mainly used to build a private memory partition management mechanism, which contains functions such as creating mempart, requesting/releasing Mempart, obtaining partition information, etc.
(6) CPU Interface part: UC/OS-II for specific CPU porting part, due to the SP and other system pointers, usually written in assembly language, including task switching, interrupt processing and other content.
3. Uc/os-ii Task Status
In Uc/os-ii, a task is a thread, and the task can assume that the CPU belongs entirely to itself. The task has its own stack and CPU registers, and is given a certain priority. A task may be in sleep, ready, running, waiting, or interrupting one of the service states.
4. Comparison of Uc/os-ii and VxWorks
UC/OS-II Kernel Architecture parsing (2)---uc/os-ii basic introduction (GO)