O'Reilly logo

Embedded Systems Architecture by Daniele Lacamera

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Blocking tasks

The simple scheduler implemented so far provides only two states for the tasks, TASK_READY and TASK_RUNNING. A third state can be implemented to define a task that does not actually need to be resumed, because it is blocked waiting for an event or a timeout. A task can be waiting for a system event of some type, such as:

  • Interrupt events from an input/output device in use by the task
  • Communication from another task, such as the TCP/IP stack
  • Synchronization mechanisms, such as a mutex or a semaphore, to access a shared resource in the system that is currently unavailable
  • Timeout events

To manage the different states, the scheduler may implement two or more lists, to separate the tasks currently running, or ready to run, from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required