Machine-translated by Google. Questions are authored in English.
Top

Discussion

A task's stack must be sized for

  • A.the total size of all of its local variables added together
  • B.the number of times it will be preempted
  • C.the size of the largest message it will receive
  • D.its deepest call chain plus the worst-case interrupt frame

Answer: D

Correct answer: its deepest call chain plus the worst-case interrupt frame

The stack must hold every frame on the deepest path through the task’s call tree, together with whatever an interrupt pushes if one arrives at the worst moment - and nested interrupts if they are permitted. Overflow is silent and corrupts whatever lies beyond, which is why a guard region or a stack-checking kernel is worth having.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.