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 The kernel functionality for μC/OS-III is the same as for μC/OS-II. Managing tasks 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 Memory management is performed in the same way as in μC/OS-II. Managing time μ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, and milliseconds. Communicating between tasks Sometimes, a task or ISR must communicate information to another task, because it is unsafe 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 disable interrupts. If two tasks share data, each can gain exclusive access to variables by either disabling interrupts, locking the scheduler, using a semaphore, or preferably, using a mutual exclusion semaphore. Messages can be sent to either an intermediate object called a message 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 A port involves three aspects: CPU, OS, and board specific (BSP) code. μC/OS-II and μC/OS-III