monitor_wwnr.rst 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. Monitor wwnr
  2. ============
  3. - Name: wwrn - wakeup while not running
  4. - Type: per-task deterministic automaton
  5. - Author: Daniel Bristot de Oliveira <bristot@kernel.org>
  6. Description
  7. -----------
  8. This is a per-task sample monitor, with the following
  9. definition::
  10. |
  11. |
  12. v
  13. wakeup +-------------+
  14. +--------- | |
  15. | | not_running |
  16. +--------> | | <+
  17. +-------------+ |
  18. | |
  19. | switch_in | switch_out
  20. v |
  21. +-------------+ |
  22. | running | -+
  23. +-------------+
  24. This model is broken, the reason is that a task can be running
  25. in the processor without being set as RUNNABLE. Think about a
  26. task about to sleep::
  27. 1: set_current_state(TASK_UNINTERRUPTIBLE);
  28. 2: schedule();
  29. And then imagine an IRQ happening in between the lines one and two,
  30. waking the task up. BOOM, the wakeup will happen while the task is
  31. running.
  32. - Why do we need this model, so?
  33. - To test the reactors.
  34. Specification
  35. -------------
  36. Grapviz Dot file in tools/verification/models/wwnr.dot