Chapter 2 Real-Time Systems Concepts Foreground/Background ...
Chapter 2 Real-Time Systems Concepts Foreground/Background ...
Chapter 2 Real-Time Systems Concepts Foreground/Background ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Message queues• Is used to send one or more messages to a task• Is basically an array of mailboxes• The first message inserted in the queue will be the firstmessage extracted from the queue (FIFO) or Last-In_first-Out (LIFO)InterruptQueueISRPOST10PEND0TASK2-41Interrupts• When an interrupt is recognized, the CPU saves– Return address (interrupted task)– Flags• Jump to Interrupt Service Routine (ISR)• Upon completion of the ISR, the program returns to– <strong>Background</strong> for a <strong>Foreground</strong>/background system– The interrupted task for a non-preemptive kernel– The highest priority task ready to run for a preemptive kernelTIMETASKISR #1ISR #2ISR #3Interrupt #1Interrupt #2Interrupt #3Interrupt Nesting2-42