Implementation
FreeRTOS is designed to be small and simple. The kernel itself consists of only three or four C files. To make the code readable, easy to port, and maintainable, it is written mostly in C, but there are a few assembly functions included where needed (mostly in architecture specific scheduler routines).
FreeRTOS provides methods for multiple threads or tasks, mutexes, semaphores and software timers. A tick-less mode is provided for low power applications. Thread priorities are supported. In addition there are four schemes of memory allocation provided, allocate only, allocate and free with a very simple, fast, algorithm, a more complex but fast allocate and free algorithm with memory coalescence, and C library allocate and free with some mutual exclusion protection. There are none of the more advanced features typical found in operating systems like Linux or Microsoft Windows, such as device drivers, advanced memory management, user accounts, and networking. The emphasis is on compactness and speed of execution. FreeRTOS can be thought of as a 'thread library' rather than an 'operating system', although command line interface and POSIX like IO abstraction add-ons are available.
FreeRTOS implements multiple threads by having the host program call a thread tick method at regular short intervals. The thread tick method switches tasks depending on priority and a round-robin scheduling scheme. The usual interval is 1/1000 of a second to 1/100 of a second, via. an interrupt from a hardware timer, but this interval is often changed to suit a particular application.
The download contains prepared configurations and demonstrations for every port and compiler, allowing rapid application design. The FreeRTOS.org site also contains lots of documentation and RTOS tutorials (additional manuals and tutorials available for a fee starting from USD25), details of the RTOS design.
Read more about this topic: Free RTOS