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

Discussion

Making a critical section longer than necessary is harmful because it

  • A.causes the kernel tick to be lost and time to drift
  • B.adds directly to the worst-case latency of every other activity
  • C.increases the RAM the kernel needs for its ready lists
  • D.prevents the compiler from optimising the enclosed code

Answer: B

Correct answer: adds directly to the worst-case latency of every other activity

Nothing can preempt a critical section, so the highest priority task in the system waits behind it if the interrupt happens to arrive at the wrong moment. The worst-case response is therefore the longest critical section anywhere in the code, in the kernel, the drivers or the application alike.

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

Post your comment

Please log in or register to post a comment.