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

Discussion

A race condition arises when the result depends on

  • A.the relative timing of two accesses to shared data
  • B.the priority assigned to each of the tasks involved
  • C.the number of tasks present in the system
  • D.the order in which the tasks were created

Answer: A

Two tasks reading, modifying and writing the same variable can interleave so that one update is lost, and whether they do depends on when the preemption falls. The bug therefore appears intermittently and often only under load.

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

Post your comment

Please log in or register to post a comment.