embOS实时操作系统 - 任务状态
2015-08-06 11:11
183 查看
A task may be in one of several states at any given time. When a task is created, it is placed into the READY state.
A task in the READY state is activated as soon as there is no other task in the READY state with higher priority.
Only one task may be running at a time.
If a task with higher priority becomes READY, this higher priority task is activated and the preempted task remains in the READY state.
The running task may be delayed for or until a specified time;
in this case it is placed into the WAITING state
and the next-highest-priority task in the READY state is activated.
The running task might need to wait for an event (or semaphore, mailbox or queue).
If the event has not yet occurred, the task is placed into the waiting state
and the next-highest-priority task in the READY state is activated.
A non-existent task is one that is not yet available to embOS; it either has been terminated or was not created at all.
The following illustration shows all possible task states and transitions between them.
A task in the READY state is activated as soon as there is no other task in the READY state with higher priority.
Only one task may be running at a time.
If a task with higher priority becomes READY, this higher priority task is activated and the preempted task remains in the READY state.
The running task may be delayed for or until a specified time;
in this case it is placed into the WAITING state
and the next-highest-priority task in the READY state is activated.
The running task might need to wait for an event (or semaphore, mailbox or queue).
If the event has not yet occurred, the task is placed into the waiting state
and the next-highest-priority task in the READY state is activated.
A non-existent task is one that is not yet available to embOS; it either has been terminated or was not created at all.
The following illustration shows all possible task states and transitions between them.
![](http://images0.cnblogs.com/blog2015/268182/201508/061109428619368.png)
相关文章推荐
- 程序员20%的空闲时间要做什么!(转)
- HDu 2147(博弈)
- HDU 3717 Rescue 枚举 模拟
- 比较两个字符串的大小(两种方法,重点在介绍数组元素可以作为函数的实参)
- 20. Element innerHTML 属性
- 南邮 OJ 1736 排序问题
- 基本固件框架的追踪研读之描述符1
- ensum简介
- C(6)
- PHP代码实现远程下载文件到本地的函数
- Spring+Quartz实现定时任务的配置方法
- 用Java代码实现栈数据结构的基本方法归纳
- win10开始菜单与cortana小娜打不开怎么办
- Win10正式版哪些预装的应用可以卸载?Win10释放空间的详细教程
- 基于MPU6050的加速度求角度
- 南邮 OJ 1735 互质分数
- poj 1426 Find The Multiple
- 安卓实习第十七天
- 如何成为一个超级软件开发者
- 使用Owin中间件搭建OAuth2.0认证授权服务器