聯系方式

您當前位置:首頁 >> C/C++編程C/C++編程

日期:2019-11-13 05:15

Task-List Management in the RTOS Kernel


Ⅰ Introduction

Much of the administration in a real‐time kernel consists of list management. In this initial step, we create three different lists and operate them as follows:

? Create functions that can input and extract elements from these lists.

? Test the lists and see that you can handle various sizes of lists. "From zero To many elements."

? Remove list items from a list and put in another.

Ⅱ Tools

IAR EWARM 5.5

REALVIEW MDK 4.12


Ⅲ Requirement

There are 3 lists (Timer List, Waiting List and Ready List) in the RTOS Kernel:

Timer List:

? The insertion of an element into the list, pass an integer with the function call. Insertion in the list is done so that the element with the lowest value of nTCnt appears first.

? Extraction is always done from the front, i.e. at the "head‐element".

Waiting List:

? A list, where the list is sorted so that the element with the lowest value of TCB->Deadline is first.

? Extraction made by the use of a pointer to the list element, struct l_obj * pBlock

Ready List

? The element with the lowest value of TCB->Deadline is first placed first in the list.

? Extraction is always done from the front, i.e. at the "head‐element".

Ⅳ Design of Data Structures

Task Control Block:

Task List Node:

Task List:

Ⅴ Design of Operation Functions based on Timer List, Waiting List and Ready List

List* CreateTaskList (void);   //create a null task list with 2 dummy node


Ⅵ Implementation of Operation Functions based on Timer List, Waiting List and Ready List

List* CreateTaskList (void);   //create a null task list with 2 dummy node

{

}


Ⅶ Test of Operation Functions based on Timer List, Waiting List and Ready List

void main()

{

 …

}


Ⅷ Results

Deliver the result of your test code for 3 lists by graphs or diagrams


版權所有:編程輔導網 2018 All Rights Reserved 聯系方式:QQ:99515681 電子信箱:[email protected]
免責聲明:本站部分內容從網絡整理而來,只供參考!如有版權問題可聯系本站刪除。

黑龙江体彩22选5