embOS实时操作系统 - 任务状态

本文介绍了实时操作系统中任务的各种状态及状态间的转换过程。任务可能处于就绪、运行、等待等状态,不同状态之间的转换取决于任务的优先级和系统事件的发生。文章详细解释了任务如何从一种状态过渡到另一种状态。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值