Bird
0
0

Why can improper use of vTaskSuspend and vTaskResume cause subtle bugs in FreeRTOS?

hard📝 Conceptual Q10 of 15
FreeRTOS - Debugging and Monitoring
Why can improper use of vTaskSuspend and vTaskResume cause subtle bugs in FreeRTOS?
ABecause suspending a task without proper synchronization can cause deadlocks or missed events
BBecause these functions automatically delete the task
CBecause they increase task stack size unexpectedly
DBecause they disable the scheduler permanently
Step-by-Step Solution
Solution:
  1. Step 1: Understand vTaskSuspend and vTaskResume behavior

    These functions pause and resume tasks but do not handle synchronization automatically.
  2. Step 2: Identify cause of subtle bugs

    If used without synchronization, tasks may deadlock waiting for events or miss signals, causing hard-to-find bugs.
  3. Final Answer:

    Because suspending a task without proper synchronization can cause deadlocks or missed events -> Option A
  4. Quick Check:

    Improper suspend/resume causes deadlocks = D [OK]
Quick Trick: Suspend/resume needs sync to avoid deadlocks [OK]
Common Mistakes:
  • Thinking suspend deletes tasks
  • Assuming stack size changes with suspend
  • Believing scheduler disables permanently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes