仔細(xì)分析單片機(jī)操作系統(tǒng)RTX51的原理,將其移植到單片機(jī)實(shí)驗(yàn)平臺(tái)上,并要求編寫一個(gè)簡(jiǎn)短的程序來驗(yàn)證其運(yùn)行的正確性(比如,編寫兩個(gè)具有顯示不一樣內(nèi)容的任務(wù))。
注釋:由于英文原文會(huì)比較好,所以我沒有翻譯過來(不過也寫了部分的翻譯),直接提取出來一些英文,總結(jié)在一起。
1. 進(jìn)程管理( Task Management )
1) 進(jìn)程類型( Classes of Tasks )
RTX-51 recognizes two classes of tasks:
n Contain especially short responses and interrupt disable times.
n Contain a separate register bank and a separate stack area (register banks 1, 2 and 3).(Figure 1)
n Contain the highest task priority (priority 3) and can therefore interrupt standard tasks.
n All contain the same priority and can therefore not be mutually interrupted.
n Can be interrupted by c51 interrupt functions.
n A maximum of three fast tasks can be active in the system.
n Require somewhat more time for the task switching compared to fast tasks.
n Share a common register bank and a common stack area (register bank 0).
n The current contents of registers and stack are stored in the external (XDATA) memory during a task change.
n Can be interrupted by fast tasks.
n Can interrupt themselves mutually.
n Can be interrupt by c51 interrupt functions.
n A maximum 16 standard tasks can be active in the system.