Bird
0
0

In a real-time operating system (RTOS) on ARM Cortex-M, how do PendSV and SysTick work together to manage multitasking?

hard📝 Application Q15 of 15
ARM Architecture - Exception and Interrupt Model
In a real-time operating system (RTOS) on ARM Cortex-M, how do PendSV and SysTick work together to manage multitasking?
APendSV triggers timer interrupts; SysTick switches tasks
BSysTick triggers regular interrupts; PendSV performs context switching after SysTick
CBoth PendSV and SysTick handle memory management
DSysTick disables PendSV during task switching
Step-by-Step Solution
Solution:
  1. Step 1: Understand SysTick role in RTOS

    SysTick generates periodic interrupts to keep track of time slices and trigger scheduler checks.
  2. Step 2: Understand PendSV role in RTOS

    PendSV is triggered by the scheduler to perform the actual task context switch smoothly in the background.
  3. Step 3: Combine roles for multitasking

    SysTick signals when to switch; PendSV does the switch, enabling efficient multitasking.
  4. Final Answer:

    SysTick triggers regular interrupts; PendSV performs context switching after SysTick -> Option B
  5. Quick Check:

    SysTick = timer, PendSV = switcher [OK]
Quick Trick: SysTick triggers; PendSV switches tasks [OK]
Common Mistakes:
  • Swapping roles of PendSV and SysTick
  • Thinking both handle memory
  • Assuming SysTick disables PendSV

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More ARM Architecture Quizzes