1 / 29

Group members: Huynh Trung Manh Pham Hung Thinh

Group members: Huynh Trung Manh Pham Hung Thinh. Contents. ThreadX Unique Features Embedded Applications ThreadX benefits Functional Components of ThreadX. ThreadX Unique Features. Picokernel Architecture ANSI C source code Not a black box A potential stantard.

tanek-pena
Download Presentation

Group members: Huynh Trung Manh Pham Hung Thinh

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Group members: Huynh TrungManh Pham Hung Thinh

  2. Contents • ThreadX Unique Features • Embedded Applications • ThreadX benefits • Functional Components of ThreadX

  3. ThreadX Unique Features • Picokernel Architecture • ANSI C source code • Not a black box • A potential stantard

  4. ThreadX Unique Features • Picokernel Architecture • services are implemented as a C library • only services actually used are brought into the run-time image • services plug directly into its core => fastest possible context switching and service call performance

  5. ThreadX Unique Features • ANSI C source code • written primarily in ANSI C. • A small amount of assembly language is needed to tailor the kernel to the underlying target processor ⇒ possible to port ThreadX to a new processor family in a very short time

  6. ThreadX Unique Features • Not a black box • Most distributions include the complete C source code + the processor-specific assembly language ⇒ see exactly what the kernel is doing

  7. ThreadX Unique Features • A potential standard • Versatility • High-performance picokernel architecture • Portability ⇒ potential to become an industry standard for embedded applications

  8. Embedded Applications • Real-time software • Multitasking • Tasks and Threads

  9. Embedded Applications • Real-time software • interaction with the external world • Multitasking • the allocation of the processor between the various application tasks • the primary purpose of ThreadX

  10. Embedded Applications • Tasks and Threads • Task • sometimes means a separately loadable program • In other instances, it might refer to an internal program segment • Thread • A semi-independent program segment that executes within a process • Share the same process address space. • The overhead associated with thread management is minimal

  11. ThreadX benefits • Improved responsiveness • Software maintenance • Increased throughput • Processor isolation • Dividing the application • Easy to use • Improve time-to-market • Protecting the software investment

  12. ThreadX benefits • Improved responsiveness • preemptive, priority-based scheduling algorithm • Software maintenance • Enables developers to concentrate on specific requirements of their application threads without having to worry about changing the timing of other areas of the application

  13. ThreadX benefits • Increased throughput • multi-threading actually reduces overhead by eliminating all of the redundant polling • Processor isolation • robust processor-independent interface between the application and the underlying processor

  14. ThreadX benefits • Dividing the application • Application is divided into clearly defined threads • Ease of use • ThreadX architecture and service call interface are designed to be easily understood

  15. ThreadX benefits • Improve time-to-market • ThreadX takes care of most processor issues • Protecting the software investment • ThreadX insulates applications from details of the underlying processors ⇒ highly portable

  16. Functional Components of ThreadX • Execution overview • Initialization • Thread Execution • Application timers • Memory usage • Interrupts

  17. Execution overview Initialization Hardware Reset Thread Execution ISR Application timers

  18. Initialization int main() { /* Enter the ThreadX kernel. */ tx_kernel_enter(); } Main() tx_kernel_enter() tx_thread_create tx_application_define(mem_ptr) tx_mutex_create Enter thread Scheduling loop

  19. Thread Execution Tx_thread_create TX_DON’T_START TX_AUTO_START Suspended State Ready State Thread scheduling Executing State Completed State Terminated State

  20. Thread priorities 0 31 Highest Lowest • Threads can have the same priority as others in the Application. • Thread priorities can be changed during run-time.

  21. Thread Scheduling • If multiple threads of the same priority : • FIFO • Time-slicing • A time-slice specifies the maximum number of timer ticks (timer interrupts). • The thread’s time-slice is assigned during creation and can be modified during run-time.

  22. Thread Scheduling • Preemption causing : - starvation - excessive context switching overhead - priority inversion.

  23. Thread Scheduling • Preemption-threshold What is a preemption-threshold? specify a priority ceiling for disabling preemption Example ? > > Lower priorities Higher priorities The ceiling

  24. Application timers • applications with the ability to execute application C functions at specific intervals of timers. • Using timer interrupt (timer ticks) 10ms . • How to generate periodic interrupts ? Underlying hardware peripheral device interrupts.

  25. Memory Usage Adresses Static memory usage Instruction Area ROM 0x00000000 Constant Area ROM setup the initialized data area in RAM. 0x80000000 Initialized Data Area RAM Global and static variables Uninitialized Data Area RAM System Stack Area

  26. Memory Usage Control blocks and memory areas associated with stacks, queues, and memory pools Dynamic memory usage it facilitates easy utilization of different types of physical memory

  27. Thread Stack Area TX_MINIMUM_STACK, Memory pitfalls

  28. Another componnents Interrupt Message Queues Memory Block Pools Semaphores Event Flags Mutexes

  29. Q & A

More Related