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

Discussion

A tasklet differs from a workqueue in that a tasklet

  • A.runs in process context and may sleep freely
  • B.is executed only at the next timer tick
  • C.may be scheduled only from a process, not a handler
  • D.runs in interrupt context and may not sleep

Answer: D

Correct answer: runs in interrupt context and may not sleep

A tasklet is deferred but still in interrupt context, so it must not sleep and runs soon after the handler returns. A workqueue item runs in process context on a kernel thread and may sleep, which is what makes it the right choice for work needing to block. That difference decides between them.

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

Post your comment

Please log in or register to post a comment.