90 likes | 192 Vues
Explore Timer Interrupts, Critical Sections, 8259 PIC, and ISR Scheduling with real-time examples. Learn how to program, manage interruptions, and prioritize tasks efficiently. Dive into enabling and clearing interrupts while retaining CPU control.
E N D
CSE3306 Lecture: 12 Title: Interrupts CSE3306--L12
Today's Topics • Demonstrate Timer Interrupt • Critical Sections • 8259 PIC • ISR Scheduling CSE3306--L12
Timer Interrupt Demonstration • Program Overview • Install on IRQ0 (INT 8) • Call Original Timer Interrupt • Increments Count=0..18 • Increments SecCount when Count=18 • Running Program prints SecCount • Termination Restores Interrupt CSE3306--L12
Critical Sections • STI: SeT Interrupt enableAllow other routines to be serviced • CLI: CLear Interrupt enable Retain full control of CPU CSE3306--L12
8259 PIC (Programmable Interrupt Controller) • Latches incoming interrupt signals (IRQ signal) • Allows masking interrupts (except NMI) • Prioritizes Interrupts (IRQ 0==Highest) • IF (interupt unmasked) AND (interrupt flag=1) AND (not servicing higher interrupt) THEN call interrupt CSE3306--L12
ISR Scheduling CSE3306--L12