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

Discussion

An engineer reports a context switch time of 3 ns on a 100 MHz core. The proper response is

  • A.the figure is impossible, one cycle being 10 ns
  • B.the figure is plausible for a kernel with hardware task support
  • C.the figure should be trebled to include the return switch
  • D.the figure depends on how many tasks are in the system

Answer: A

Correct answer: the figure is impossible, one cycle being 10 ns

At 100 MHz a single clock cycle is 10 nanoseconds, and a context switch saves and restores a register set - tens of cycles at best. Three nanoseconds is less than one cycle, so the figure cannot be right whatever the kernel does. Checking a claim against the clock period is the quickest test available.

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

Post your comment

Please log in or register to post a comment.