Presentation is loading. Please wait.

Presentation is loading. Please wait.

FreeRTOS synopsis 2006. 12. 15. - 김백규 -. FreeRTOS is … Real Time Kernel portable (ARM, AVR, x86, MSP430 etc.) open source (www.freertos.org) mini size.

Similar presentations


Presentation on theme: "FreeRTOS synopsis 2006. 12. 15. - 김백규 -. FreeRTOS is … Real Time Kernel portable (ARM, AVR, x86, MSP430 etc.) open source (www.freertos.org) mini size."— Presentation transcript:

1 FreeRTOS synopsis 2006. 12. 15. - 김백규 -

2 FreeRTOS is … Real Time Kernel portable (ARM, AVR, x86, MSP430 etc.) open source (www.freertos.org) mini size (about 200kB) Modified GPL license A user must open source his changes to the kernel Latest version : v4.1.3

3 Standard features Choice of scheduling policy Pre-emptive (with round robin time slicing) Cooperative Co-routines light weight tasks that utilise very little RAM Message queues Semaphores Trace visualisation ability

4 Design Philosophy FreeRTOS is designed to be Simple Portable Concise Nearly all the code is written in C not tightly optimized readable, maintainable, easy to port Multiple priority lists provides application design flexiblity number of tasks can share the same priority

5 Task & Co-routines Task Traditional model used by an RTOS scheduler Simple No restrictions on use Supports full preemption Fully prioritised Each task maintains its own stack resulting in higher RAM usage Re-entancy must be carefully considered if using peemption

6 Task & Co-routines (cont.) Co-routines (after FreeRTOS v4.0.0, option) Sharing a stack between co-routines results in much lower RAM usage Cooperative operation makes re-entrancy less of an issue Very portable across architectures Fully prioritised relative to other co-routines, but can always be preempted by tasks if the two are mixed Lack of stack requires special consideration Restrictions on where API calls can be made Co-operative operation only amongst co-routines themselves

7 RTOS Fundamentals

8 Multitasking multitasking : execute multiple tasks kernel : the core component within an OS task : each executing program advantages complex appliaction → set of smaller & manageable tasks easier S/W testing, work breakdown teams and code reuse timing, sequencing details can be removed from the application code

9 Multitasking vs Concurrency

10 Scheduling scheduler deciding which task should be executing at any particular time task can be suspended and later resume scheduling policy the algorithm used by the scheduler to decide which task to execute

11 Scheduling Example In case of non real time

12 Context Switching context As a task executes it utilizes resources the processor registers, stack, etc context switching while the task is suspended other tasks may modify the processor register values To prevent this problem, the OS kernel is responsible for saving the context and restore it

13 Context Switching Example

14 Real Time Applications Real Time Operating Systems deadline Hard real time system Soft real time system scheduling non-preemptive preemptive same priority : round robin

15 Real Time System Example Keyboard & Display A user must get visual feedback of each key press within a reasonable period

16 Real Time System Example Digital Filtering The input must be sampled, filtered and the control cycle executed every 2ms For correct operation of the filter the temporal regularity of the sample must be accurate to 0.5ms

17 Real Time Scheduling


Download ppt "FreeRTOS synopsis 2006. 12. 15. - 김백규 -. FreeRTOS is … Real Time Kernel portable (ARM, AVR, x86, MSP430 etc.) open source (www.freertos.org) mini size."

Similar presentations


Ads by Google