亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? real-time experiment #6 preemptive priority based task scheduling.htm

?? 該文檔是學習在Vxworks上進行編程開發的入門教材。
?? HTM
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0077)http://www.rt.db.erau.edu/experiments/vx/priorityScheduling/Experiment-6.html -->
<HTML><HEAD><TITLE>Real-Time Experiment #6: Preemptive Priority Based Task Scheduling</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY>
<CENTER>
<H1>Embry-Riddle Real-Time Laboratory Experiment<BR>Experiment #6<BR>Preemptive 
Priority Based Task Scheduling </H1></CENTER>
<HR SIZE=3>

<H2>Introduction</H2>Task scheduling is the assignment of starting and ending 
times to a set of tasks, subject to certain constraints. Constraints are 
typically either time constraints or resource constraints. On a time-sharing 
operating system, running each active process in turn for its share of time (its 
"timeslice"), thus creating the illusion that multiple processes are running 
simultaneously on a single processor. 
<P></P><EM>Wind</EM> task scheduling uses a priority based preemptive scheduling 
algorithm as default, but it can also accommodate round-robin scheduling.
<P></P>
<HR SIZE=3>

<H2>Objectives</H2>The following are the primary objectives of this experiment: 
<UL>
  <LI>To demonstrate the use of VxWorks preemptive priority based task 
  scheduling facilities. </LI></UL>
<P></P>
<HR SIZE=3>

<H2>Description</H2>
<UL>
  <LI><B>Preemptive Priority Based Scheduling</B>
  <P></P>With a preemptive priority based scheduler, each task has a priority 
  and the kernel insures that the CPU is allocated to the highest priority task 
  that is ready to run. This scheduling method is <EM>preemptive</EM> in that if 
  a task that has a higher priority than the current task becomes ready to run, 
  the kernel immediately saves the current tasks's context and switches to the 
  context of the higher priority task.
  <P></P>The <EM>Wind</EM> kernel has 256 priority levels(0-255). Priority 0 is 
  the highest and priority 255 is the lowest. Tasks are assigned a priority when 
  created; however, while executing, a task can change its priority using 
  <EM>taskPrioritySet()</EM>. </LI></UL>
<P></P><B>1. Example: Preemptive Priority Based Scheduling</B>
<P></P>One of the arguments to <EM>taskSpawn()</EM> is the priority at which the 
task is to execute:
<P></P><EM>id</EM> = taskSpawn(<EM>name, <B>priority</B>, options, stacksize, 
function, arg1,.. , arg10);</EM>
<P></P>By varying the priority(0-255) of the task spawned, you can affect the 
priority of the task. <EM>Priority</EM> 0 is the highest and priority 255 is the 
lowest.The Note the priority of a task is relative to the priorities of other 
tasks. In other words, the task priority number itself has no particular 
significance by itself.
<P></P>In addition a task's priority can be changed after its spawned using the 
following routine: 
<UL>
  <LI><EM>taskPrioritySet(int tid, int newPriority)</EM>: Change the priority of 
  a task. </LI></UL>
<P></P>In the example below, there are three tasks with different 
priorities(HIGH,MID,LOW). The result of running the program is that the task 
with the highest priority, "taskThree" will run to completion first, followed by 
the next highest priority task, "taskTwo", and the finally the task with the 
lowest priority which is "taskOne."
<P></P><PRE>------------------------------------------------------------------------------------
/* includes */
#include "vxWorks.h"
#include "taskLib.h"
#include "logLib.h"

/* function prototypes */
void taskOne(void);
void taskTwo(void);
void taskThree(void);

/* globals */
#define ITER1 100
#define ITER2 1
#define LONG_TIME 1000000
#define HIGH 100 /* high priority */
#define MID 101 /* medium priority */
#define LOW 102 /* low priority */

void sched(void) /* function to create the two tasks */
{
int taskIdOne, taskIdTwo, taskIdThree;

printf("\n\n\n\n\n");
/* spawn the three tasks */
if((taskIdOne = taskSpawn("task2",LOW,0x100,20000,(FUNCPTR)taskOne,0,0,0,0,0,0,0,
	0,0,0)) == ERROR)
	printf("taskSpawn taskOne failed\n");
if((taskIdTwo = taskSpawn("task2",MID,0x100,20000,(FUNCPTR)taskTwo,0,0,0,0,0,0,0,
	0,0,0)) == ERROR)
	printf("taskSpawn taskTwo failed\n");
if((taskIdThree = taskSpawn("task3",HIGH,0x100,20000,(FUNCPTR)taskThree,0,0,0,0,0,0,0,
	0,0,0)) == ERROR)
	printf("taskSpawn taskThree failed\n");

}

void taskOne(void) 
{
int i,j;
for (i=0; i &lt; ITER1; i++)
	{
	for (j=0; j &lt; ITER2; j++)
		logMsg("\n",0,0,0,0,0,0);
		for (j=0; j &lt; LONG_TIME; j++);	
	}
}

void taskTwo(void) 
{
int i,j;
for (i=0; i &lt; ITER1; i++)
	{
	for (j=0; j &lt; ITER2; j++)
		logMsg("\n",0,0,0,0,0,0);
		for (j=0; j &lt; LONG_TIME; j++);
	}
}

void taskThree(void) 
{
int i,j;
for (i=0; i &lt; ITER1; i++)
	{ 
	for (j=0; j &lt; ITER2; j++)
		logMsg("\n",0,0,0,0,0,0);
		for (j=0; j &lt; LONG_TIME; j++);
	}
}
------------------------------------------------------------------------------------
</PRE>
<P></P>
<HR SIZE=3>

<H2>Procedures</H2>1. Copy the source code in the example and compile it. 
<P></P>2. Load the object file onto the target machine.
<P></P>3. Execute the following command on the WindSh terminal: "logFdSet 1". 
This will direct the <EM>logMsg()</EM> output to the virtual console.
<P></P>4. Run the examples by executing the main routine("sched") of the example 
on WindSh terminal. 
<P></P>Note: Make sure you have redirected I/O, otherwise you won't see the 
results of the <EM>logMsg()</EM> commands. 
<HR SIZE=3>

<H2>Follow On Experiment</H2>Experiment 1. Modify the program such that the 
order of execution is "taskOne" first, then "taskTwo", and then "taskThree."
<P></P>Experiment 2. Modify the program so that "taskOne" has the highest 
priority and "taskOne" and "taskTwo" are running at the same priority. Is there 
a difference in the output when compared with the output of Experiment 1 of the 
Follow On Experiment in this section.
<P></P>
<HR SIZE=3>

<H2>Additional Information</H2>Refer to VxWorks User's Manual and Reference 
Manual.
<P></P>
<HR SIZE=3>

<CENTER>
<H4><A 
href="http://www.rt.db.erau.edu/experiments/vx/toc/TableOfContents.html">Return 
to Primary Table of Contents </A></H4></CENTER>
<HR SIZE=3>

<CENTER>Last Updated: 21 March 1997<BR><EM>Created by: Dan Eyassu</EM><BR><A 
href="mailto:eyassud@db.erau.edu">eyassud@db.erau.edu</A><BR></CENTER></BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美在线观看一区二区三区| 欧洲视频一区二区| 午夜成人在线视频| 一区二区三区四区乱视频| 伊人婷婷欧美激情| 中文字幕不卡在线播放| 国产视频一区不卡| 国产精品视频一二三| 国产欧美日韩视频一区二区| 国产视频一区二区在线观看| 国产精品午夜在线观看| ㊣最新国产の精品bt伙计久久| 国产精品不卡视频| 亚洲一区在线看| 日韩精品欧美成人高清一区二区| 爽好多水快深点欧美视频| 日本特黄久久久高潮| 久久99精品视频| 高清成人在线观看| 色综合天天性综合| 欧美日韩黄色一区二区| 欧美成人欧美edvon| 中文字幕不卡三区| 亚洲国产sm捆绑调教视频 | 亚洲欧美另类久久久精品2019| 亚洲视频在线观看一区| 婷婷夜色潮精品综合在线| 狠狠网亚洲精品| 91在线观看污| 欧美一二三四区在线| 国产精品人成在线观看免费| 一区二区三区在线视频播放| 性做久久久久久免费观看欧美| 国内精品国产三级国产a久久| 国产成人久久精品77777最新版本| caoporn国产一区二区| 69堂国产成人免费视频| 欧美韩国一区二区| 亚洲国产精品视频| 国产精品一区久久久久| 欧美日韩一区在线| 国产日韩精品一区二区三区 | 欧美日韩电影在线播放| 久久精品视频一区二区| 水野朝阳av一区二区三区| 粉嫩av一区二区三区粉嫩| 精品视频资源站| 中文字幕免费一区| 日韩专区欧美专区| 99久久婷婷国产综合精品| 日韩午夜激情电影| 亚洲一区二区免费视频| 不卡在线观看av| 久久综合久久综合久久| 日韩激情视频网站| 欧美日韩一区三区四区| 亚洲色图清纯唯美| 成人黄色大片在线观看| 日韩欧美不卡一区| 亚洲成人黄色小说| 一本大道久久精品懂色aⅴ| 久久久欧美精品sm网站| 日韩精品欧美成人高清一区二区| 在线观看亚洲成人| 亚洲精品国产无天堂网2021| av色综合久久天堂av综合| 久久欧美中文字幕| 国产综合一区二区| 久久久精品免费免费| 久久国产三级精品| 欧美成人a在线| 麻豆一区二区在线| 日韩欧美中文一区二区| 免费观看日韩电影| 日韩欧美国产1| 久久国产夜色精品鲁鲁99| 欧美大片在线观看一区二区| 日韩电影在线一区二区| 欧美一区二区三区在线电影| 免费在线一区观看| 欧美一级二级在线观看| 美女精品自拍一二三四| 久久午夜色播影院免费高清| 狠狠色伊人亚洲综合成人| 欧美sm美女调教| 国产99久久久久| 一色桃子久久精品亚洲| 97精品国产露脸对白| 一区二区三区视频在线观看| 欧美日韩一本到| 免播放器亚洲一区| 国产色91在线| 一本久久精品一区二区| 午夜视频在线观看一区二区三区| 欧美伦理影视网| 久久精品免费观看| 国产精品视频一区二区三区不卡| 91免费国产在线| 亚洲国产wwwccc36天堂| 亚洲精品自拍动漫在线| 在线视频一区二区三| 视频在线观看国产精品| 久久精品一二三| 色综合激情五月| 麻豆91在线看| 自拍偷在线精品自拍偷无码专区| 欧美日韩在线播| 激情图区综合网| 亚洲人成网站影音先锋播放| 欧美视频日韩视频| 精品中文av资源站在线观看| 日韩美女精品在线| 欧美mv和日韩mv的网站| 91香蕉视频mp4| 九九精品一区二区| 亚洲精品免费看| 久久综合九色综合欧美亚洲| 在线中文字幕一区| 国产麻豆9l精品三级站| 午夜欧美电影在线观看| 欧美国产激情一区二区三区蜜月| 欧美性受极品xxxx喷水| 成人午夜激情影院| 日韩和的一区二区| 亚洲视频精选在线| 2欧美一区二区三区在线观看视频| 91国在线观看| thepron国产精品| 九九视频精品免费| 日韩专区一卡二卡| 尤物在线观看一区| 中文字幕 久热精品 视频在线 | 日韩成人精品在线| 亚洲欧美色图小说| 国产午夜精品一区二区三区四区| 欧美日韩电影在线| 日本道色综合久久| 成人午夜大片免费观看| 国产伦理精品不卡| 麻豆国产欧美日韩综合精品二区| 亚洲国产aⅴ成人精品无吗| ...av二区三区久久精品| 亚洲欧美aⅴ...| 国产女人水真多18毛片18精品视频 | 精品国产欧美一区二区| 成人av网站免费| 91精品国产综合久久久久久| 五月天激情小说综合| 国产99久久久国产精品潘金网站| 国产一区二区福利| jiyouzz国产精品久久| 欧美精品色综合| 国产精品三级视频| www.日本不卡| 亚洲欧美日韩国产另类专区| 欧美精品在线视频| 亚洲精品免费视频| 精品美女在线播放| 国产成人免费视频网站| 欧美精品色综合| 欧美日韩免费电影| 成人av电影在线观看| 日韩高清不卡一区| 国产精品久久久久久久久图文区| 国产精品久久毛片| 在线综合亚洲欧美在线视频| 青青青爽久久午夜综合久久午夜| 亚洲欧美在线观看| 最新热久久免费视频| 日av在线不卡| 日韩三级.com| 欧美一级高清大全免费观看| 91久久人澡人人添人人爽欧美| 国产在线观看免费一区| 精久久久久久久久久久| 久久99最新地址| 91丨九色porny丨蝌蚪| 久久国产生活片100| www.99精品| 欧美女孩性生活视频| 国产露脸91国语对白| 午夜成人免费电影| 久久精品国产成人一区二区三区| 国产成人超碰人人澡人人澡| 天堂精品中文字幕在线| 亚洲综合在线免费观看| 美腿丝袜一区二区三区| 国产91丝袜在线播放0| 欧美电影一区二区三区| 欧美精品一区二区精品网| www日韩大片| 亚洲一区视频在线观看视频| 精品一区二区三区免费毛片爱| wwwwxxxxx欧美| 一区二区在线看| 久草在线在线精品观看| 26uuu色噜噜精品一区| 玉足女爽爽91| 国产精品另类一区| 欧美日韩1234|