请选择 进入手机版 | 继续访问电脑版

硬汉嵌入式论坛

 找回密码
 立即注册
查看: 833|回复: 3
收起左侧

[RL-RTX] 提问一下关于时间片和优先级的问题

[复制链接]

5

主题

24

回帖

39

积分

新手上路

积分
39
发表于 2021-12-26 16:45:39 | 显示全部楼层 |阅读模式
我最近去查阅了关于RTX5的任务的管理问题,ARM官网上提供的手册是这么说的,RTX5在不进行osDelay造成阻塞和挂起的时候会在到达时间片的限制的时候,会进ready状态,此时如果有同优先级任务就会抢占它。但是如果只是进入ready状态的话,那么是不是如果仅有时间片控制而不进行阻塞,那么是不是低优先级的任务永远没机会被启动。
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
105942
QQ
发表于 2021-12-26 16:49:30 | 显示全部楼层
是的,同优先级任务的时间片调度,如果他们不释放CPU权限(像延迟之类的函数都会释放CPU权限),低优先级任务是无法执行的。
回复

使用道具 举报

5

主题

24

回帖

39

积分

新手上路

积分
39
 楼主| 发表于 2021-12-26 16:51:37 | 显示全部楼层
感谢硬汉,这里把英文原文贴在这里。
回复

使用道具 举报

5

主题

24

回帖

39

积分

新手上路

积分
39
 楼主| 发表于 2021-12-26 16:51:56 | 显示全部楼层
When the timer expires, the thread will leave the WAIT_DELAY state and move to the READY state. The thread will resume running when the scheduler moves it to the RUNNING state. If the thread then continues executing without any further blocking OS calls, it will be descheduled at the end of its time slice and be placed in the ready state, assuming another thread of the same priority is ready to run.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-3-29 19:55 , Processed in 0.256293 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表