|
The OP
Published on 2011-3-1 16:54
Only look at the author
This post is from Real-time operating system RTOS
Latest reply
This question is quite interesting. Generally speaking, once the system is executing the idle task TaskIdle, it means that other tasks have been suspended or deleted (because the idle task has the lowest priority) and are waiting for delays, semaphores, messages, etc. In addition, we also see that the actual processing in the code of the idle task TaskIdle is a simple continuous self-increment processing of a 32-bit variable (OSIdleCtr++), and there is no task scheduling switching function OS_Sched(), mainly considering the CPU burden, and there is no need for it. So if you want to switch out of the idle task, you can only do it through the interrupt level. This interrupt can be a clock beat interrupt (delay timeout processing), or an external asynchronous trigger event interrupt processing (I/O, exception fault processing), etc., rather than actively switching tasks at the task level (such as xxxPost, etc.), because all other tasks are suspended at this time. Here is a very interesting question. If all user application tasks (except idle tasks) are not suspended because of their own calls to the Dly delay function, they may be suspended because of waiting for events, semaphores, messages, etc., then there may be a problem, which is often called "deadlock". At this time, you can only wait for timeout processing. Therefore, when designing the system, you should pay attention to prevent this situation as much as possible. On the contrary, if it is not because of the above situation to enter the idle task TaskIdle, there is no big problem. After the delay is over, when the clock beat interrupt exits, OSIntExit() will be called to determine the task scheduling switch, so as to make a decision on whether to perform task switching.
Details
Published on 2011-4-8 14:01
| ||
|
|
||
|
2
Published on 2011-3-1 19:23
Only look at the author
This post is from Real-time operating system RTOS
| ||
|
Personal signature处处留心皆学问!
|
||
|
|
This post is from Real-time operating system RTOS
| ||
|
|
||
|
|
This post is from Real-time operating system RTOS
| ||
|
|
||
|
|
|
5
Published on 2011-3-2 09:57
Only look at the author
| |
|
Personal signature处处留心皆学问!
|
|
|
|
|
6
Published on 2011-3-2 10:08
Only look at the author
This post is from Real-time operating system RTOS
| ||
|
Personal signature处处留心皆学问!
|
||
|
|
This post is from Real-time operating system RTOS
| ||
|
|
||
|
|
|
8
Published on 2011-3-2 10:50
Only look at the author
| |
|
|
|
|
|
|
9
Published on 2011-3-21 23:11
Only look at the author
This post is from Real-time operating system RTOS
| ||
|
|
||
|
|
|
10
Published on 2011-3-22 07:12
Only look at the author
This post is from Real-time operating system RTOS
| ||
|
|
||
|
|
|
11
Published on 2011-4-7 15:59
Only look at the author
This post is from Real-time operating system RTOS
| ||
|
|
||
|
|
|
12
Published on 2011-4-8 14:01
Only look at the author
This post is from Real-time operating system RTOS
| ||
|
|
||
|
|
曾经的版主且威望大于2000,或对EEWORLD论坛有突出贡献的坛友
在下载中心贡献超过4000份资料
EEWorld Datasheet Technical Support
EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews
Room 1530, Zhongguancun MOOC Times Building,
Block B, 18 Zhongguancun Street, Haidian District,
Beijing 100190, China
Tel:(010)82350740
Postcode:100190
京公网安备 11010802033920号

