Real-Time Interrupt Handling and Scheduling in SYS/BIOS
This content covers the management of hardware and software interrupts, interrupt priorities, scheduling rules, and execution flow for real-time systems using SYS/BIOS. It discusses the handling of interrupts by the Hardware Interrupt (Hwi) and Software Interrupt (Swi) components, priority levels, preemption, and scheduling strategies. The flow of interrupt handling from processing to posting Swi and cleanup is explained, emphasizing fast response times and efficient task execution. With detailed diagrams and descriptions, it provides insights into optimizing interrupt management for flexible real-time systems.
Download Presentation
Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
E N D
Presentation Transcript
Swi Scheduling Hwi Hwi priorities set by hardware Hard R/T Fixed number, preemption optional Hardware Interrupts Swi Up to 32 priority levels Any number possible, all preemptive Software Interrupts Up to 32 priority levels Tsk Any number possible, all preemptive Tasks Idle Continuous loop Soft R/T Non-realtime in nature Background SYS/BIOS provides for Hwi and Swi management. SYS/BIOS allows the Hwi to post a Swi to the ready queue. Multicore Training
Hardware and Software Interrupt System Execution flow for flexible real-time systems: Hwi Hard R/T Process INT ! Post Swi Cleanup, RET SWI Ready Swi Continue Processing ... isrAudio: Hwi Swi *buf++ = *XBUF; cnt++; if (cnt >= BLKSZ) { Swi_post(swiFir); count = 0; pingPong ^= 1; } Fast response to INTs Latency in response time Min context switching Context switch High priority for CPU Selectable priority levels Limited # of Hwi possible Scheduler manages execution SYS/BIOS provides for Hwi and Swi management. SYS/BIOS allows the Hwi to post a Swi to the ready queue. Multicore Training
Scheduling Rules Swi_post(swi_b) Highest Priority Hwi swi_b (p2) swi_a (p1) Legend Idle Running Ready Lowest Priority time Swi_post(mySwi) : Unconditionally post a software interrupt (in the ready state). If a higher priority thread becomes ready, the running thread is preempted. Swi priorities range from 1 to 32. Automatic context switch (uses system stack) What if more than one Swi process is set to the same priority? Multicore Training
Scheduling Rules Swi_post(swi_b) Highest Priority Hwi swi_b (p1) swi_a (p1) Legend Idle Running Ready Lowest Priority time Processes of same priority are scheduled first-in first-out (FIFO). Having threads at the SAME priority offers certain advantages, such as resource sharing (without conflicts). Multicore Training