專注電子技術(shù)學(xué)習(xí)與研究
當(dāng)前位置:單片機(jī)教程網(wǎng) >> MCU設(shè)計(jì)實(shí)例 >> 瀏覽文章

單片機(jī)操作系統(tǒng)RTX51原理分析與移植

作者:佚名   來(lái)源:本站原創(chuàng)   點(diǎn)擊數(shù):  更新時(shí)間:2007年08月25日   【字體:

一.課題要求:

仔細(xì)分析單片機(jī)操作系統(tǒng)RTX51的原理,將其移植到單片機(jī)實(shí)驗(yàn)平臺(tái)上,并要求編寫一個(gè)簡(jiǎn)短的程序來(lái)驗(yàn)證其運(yùn)行的正確性(比如,編寫兩個(gè)具有顯示不一樣內(nèi)容的任務(wù))。

二.RTX51原理

注釋:由于英文原文會(huì)比較好,所以我沒(méi)有翻譯過(guò)來(lái)(不過(guò)也寫了部分的翻譯),直接提取出來(lái)一些英文,總結(jié)在一起。

1.       進(jìn)程管理( Task Management )

1)       進(jìn)程類型( Classes of Tasks )

RTX-51 recognizes two classes of tasks:

1.       Fast 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.

 

2.       Standard tasks

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.

 

 

關(guān)閉窗口