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

Discussion

Each task in a preemptive kernel needs its own stack because

  • A.the compiler cannot generate re-entrant code otherwise
  • B.the hardware provides a separate stack pointer for each priority level
  • C.its call chain and saved context must survive while another task runs
  • D.the kernel stores its messages on the task's stack

Answer: C

A task suspended half way down a call chain must find that chain intact when it resumes, which a shared stack could not guarantee. Sizing each one is a real design problem, since too little corrupts memory and too much wastes it.

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

Post your comment

Please log in or register to post a comment.