联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> 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


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp