Post on 05-Jul-2018
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 1/53
5-1®
Real-Time MultitaskingReal-Time Multitasking
5.1 Introduction
Task Basics
Task Control
Error Status
System Tasks
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 2/53
5-2®
What is Real-TimeWhat is Real-Time
Real-time denotes the a!ility o" a control system to kee#u# $ith the system !eing controlled.
% system is descri!ed as !eing deterministic i" itsres#onse time is #redicta!le.
The lag time !et$een the occurrence o" an e&ent and theres#onse to that e&ent is called latency.
'eterministic res#onse is the key to real-time
#er"ormance.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 3/53
5-3®
Re(uirements o" a Real-time SystemRe(uirements o" a Real-time System
%!ility to control many e)ternal com#onents* – Inde#endent com#onents
– %synchronous com#onents
– Synchronous com#onents
+igh s#eed e)ecution*
– ,ast res#onse
– o$ o&erhead
'eterministic o#eration*
– % late ans$er is a $rong ans$er.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 4/53
5-4®
'esign #tions'esign #tions
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 5/53
5-5®
/nitasking %##roach/nitasking %##roach
ne task controlling all the com#onents in a loo#.
arm (){for (;;)
{if (shoulder needs moving) moveShoulder();
if (elbow needs moving) moveElbow();
if (wrist needs moving)
moveWrist();...}
}
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 6/53
5-6®
Multitasking %##roachMultitasking %##roach
Create a se#arate task to mani#ulate each 0oint*
Each task alternates !et$een ready2 and $aiting2. 3)Works allo$s a task to $ait "or*
– % s#eci"ied time delay
– %n e&ent 4e.g. an interru#t
joint (){for (;;)
{
waitForMove(); ! "ntil joint needs moving ! move#oint();}
}
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 7/535-7®
Task StatesTask States
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 8/535-8®
Multitasking 6ernelMultitasking 6ernel
The Wind kernel is that #art o" 3)Works $hich directlymanages tasks.
%llocates the C7/ to tasks according to the 3)Worksscheduling algorithm 4to !e discussed.
/ses Task Control Blocks 4TCBs to kee# track o" tasks.
– ne #er task
– 'eclared as WI8'9TCB data structure in taski!.htaski!.h
– .S. control in"ormation e.g. state: task #riority:delay timer: !reak#oint list: error status: I; redirections: etc.
– C7/ Conte)t In"ormation e.g. 7C: S7: C7/ registers: ,7/registers
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 9/535-9®
6ernel #eration6ernel #eration
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 10/535-10®
Conte)t S$itchConte)t S$itch
When one task sto#s e)ecuting and a ne$ task starts: acontext switch or reschedule has occurred.
To schedule a ne$ task to run: the kernel must*
1. Sa&e conte)t o" currently e)ecuting task into its TCB.
<. Restore conte)t o" ne)t task to e)ecute "rom its TCB.
Com#lete conte)t s$itch must !e &ery "ast.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 11/535-11®
Ty#es o" Conte)t S$itchesTy#es o" Conte)t S$itches
Synchronous conte)t s$itches occur !ecause thee)ecuting task
– #ends: delays: or sus#ends itsel".
– makes a higher #riority task ready to run.
– 4less "re(uently lo$ers its o$n #riority: or e)its.
%synchronous conte)t s$itches occur $hen an ISR*
– makes a higher #riority task ready to run.
– 4less "re(uently sus#ends the current task or lo$ers its #riority.
Synchronous conte)t s$itches re(uire sa&ing "e$erregisters than asynchronous conte)t s$itches: and so are"aster.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 12/535-12®
7riority Scheduling7riority Scheduling
'i""erent a##lication 0o!s may ha&e di""erent#recedences: $hich should !e o!ser&ed $hen allocatingthe C7/.
7reem#ti&e scheduling is !ased on task #riorities chosen
to re"lect 0o! #recedence.
The highest #riority task ready to run 4not #ended ordelayed is allocated the C7/.
Rescheduling can occur at any time as a result o"* – 6ernel calls
– Interru#ts 4e.g.: system clock tick
The conte)t s$itch is not delayed until the ne)t systemclock tick.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 13/535-13®
7riority Based 7reem#tion7riority Based 7reem#tion
E(ual #riority tasks $on=t #reem#t each other 4!y de"ault.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 14/535-14®
Round-Ro!in SchedulingRound-Ro!in Scheduling
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 15/535-15
®
Slicing TimeSlicing Time
To allo$ e(ual #riority tasks to #reem#t each other: timeslicing must !e turned on*
kernelTimeSlice(ticks)
I" ticks > ?: time slicing is turned o"".
7riority scheduling al$ays takes #recedence.
– Round-ro!in only a##lies to tasks o" the same #riority.
7riority-!ased rescheduling can ha##en any time.
– Round-ro!in rescheduling can only ha##en e&ery "e$ clock ticks.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 16/535-16
®
7er"ormance Enhancements7er"ormance Enhancements
%ll tasks reside in a common address s#ace.
%ll tasks run in su#er&isor 4#ri&ileged mode.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 17/535-17
®
Multitasking ,acilitiesMultitasking ,acilities
+ 3 W k ti S t M t+ 3 W k ti S t M t
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 18/535-18
®
+o$ 3)Works #erating System Meets+o$ 3)Works #erating System Meets
Real-time Re(uirementsReal-time Re(uirements
%!le to control many e)ternal com#onents – Multitasking allo$s solution to mirror the #ro!lem.
– Inde#endent "unctions are assigned to di""erent tasks.
– Intertask communication allo$s tasks to coo#erate.
+igh s#eed e)ecution
– Tasks are light-$eight: ena!ling "ast conte)t s$itch.
– 8o system call2 o&erhead.
'eterministic o#eration
– 7reem#ti&e #riority scheduling assures res#onse "or high #rioritytasks.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 19/535-19
®
Real-Time MultitaskingReal-Time Multitasking
Introduction
5.< Task Basics
Task Control
Error Status
System Tasks
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 20/535-20
®
&er&ie$&er&ie$
o$ le&el routines to create and mani#ulate tasks are"ound in taski!.
% 3)Works task consists o"*
– % stack 4"or local storage o" automatic &aria!les and #arameters
#assed to routines.
– % TCB 4"or S control.
'o not con"use e)ecuta!le code $ith the task4s $hiche)ecute it*
– Code is do$nloaded !e"ore tasks are s#a$ned.
– Se&eral tasks can e)ecute the same code4e.g.: printf( ).
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 21/53
5-21®
Creating a TaskCreating a Task
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 22/53
5-22®
Creating a TaskCreating a Task
int taskSpawn (name, priority, options,stackSize, entryPt, arg1, …, arg10)
name Task name: i" 8/ gi&es a de"ault name.
#riority Task #riority ?-<55.
o#tions Task o#tions e.g. 3@9/8BRE%6%BE.
stackSiAe SiAe o" stack to !e allocated in !ytes.
entry7t %ddress o" code to start e)ecuting 4initial 7C.
arg1: ...: arg1? /# to 1? arguments to entry-#oint routine.
Returns a task id or ERRR i" unsuccess"ul.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 23/53
5-23®
Task I'=sTask I'=s
%ssigned !y kernel $hen task is created.
/ni(ue to each task.
E""icient <-!it handle "or task.
May !e reused a"ter task e)its.
% task id o" Aero re"ers to task making call 4sel".
Rele&anttaski!taski! routines*
taskIdSelf( ) et I' o" calling task.
taskIdListGet( ),ill array $ith I'=s o" all e)isting tasks.
taskIdVerify( ) 3eri"y a task I' is &alid.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 24/53
5-24®
Task 8amesTask 8ames
7ro&ided "or human con&enience. – Ty#ically used only "rom the shell 4during de&elo#ment.
– Within #rograms: use task Ids.
By 4o"ten ignored con&ention: task names start $ith a tt.
– 7romotes inter#retation as a task name.
– 'e"ault name is a tt "ollo$ed !y an ascending integer.
'oesn=t ha&e to !e uni(ue 4!ut usually is.
Rele&ant taski!taski! routines*
taska!e( ) et name "rom tid.
taska!eToId( ) et tid "rom task name.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 25/53
5-25®
Task 7rioritiesTask 7riorities
Range "rom ? 4highest to <55 4lo$est.
'etermining ho$ to set task #riorities is a di""icultsu!0ect: and !eyond the sco#e o" this course. +o$e&er*
– Timing re(uirements rather than haAy ideas a!out task im#ortance
should go&ern #riorities.
– % su!stantial !ody o" theory e)ists.
ne can mani#ulate #riorities dynamically $ith*
taskPriorityGet (tid, &priority)taskPrioritySet (tid, priority)
– 'oing so may make your a##lication=s !eha&ior more di""icult toanalyAe.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 26/53
5-26®
Task StacksTask Stacks
%llocated "rom system memory #ool $hen task is created.
,i)ed siAe a"ter creation.
The kernel reser&es some s#ace "rom the stack: making
the stack s#ace actually a&aila!le slightly less than thestack s#ace re(uested.
E)ceeding stack siAe 4stack crash2 causesun#redicta!le system !eha&ior.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 27/53
5-27®
Stack &er"lo$sStack &er"lo$s
To check "or a stack o&er"lo$ use the Bro$ser* – 7ress the check-stack !utton*
– E)amine the high $ater mark indicator in the stack dis#lay$indo$.
High water mark indicator
(Uni) !"rrent "sage shown #yshaded #ar and n"m#er inside$
High water mark shown #yshaded #ar$ (%indows)!"rrent "sage shown #y n"m#erinside #ar$
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 28/53
5-28®
Task #tionsTask #tions
Can !e !it$ise or=ed together $hen the task is created*3@9,79T%S6 %dd "loating #oint su##ort.
3@989ST%C69,I 'on=t "ill stack $ith ?)ee=s.
3@9/8BRE%6%BE 'isa!le !reak#oints.
3@9'E%C9ST%C6 'eallocate stack and TCB $hen task e)its4automatically set "or you.
/se task"ptionsGet( ) to in(uire a!out a tasks o#tions.
/se task"ptionsSet( ) to unset 3@9'E%C9ST%C6.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 29/53
5-29®
Task CreationTask Creation
'uring time critical code: task creation can !eunacce#ta!ly time consuming.
To reduce creation time: a task can !e s#a$ned $ith the3@989ST%C69,I o#tion !it set.
%lternati&ely: s#a$n a task at system start-u# $hich!locks immediately: and $aits to !e made ready $henneeded.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 30/53
5-30®
Task 'eletionTask 'eletion
taske'ete (tid) 'eletes the s#eci"ied task.
'eallocates the TCB and stack.
eit(code)
E(ui&alent to a task#elete( ) o" sel".
code #arameter is stored in the TCB "ield exitCode.
TCB may !e e)amined "or #ost-mortem de!ugging !y
– /nsetting the 3@9'E%C9ST%C6 o#tion or:
– /sing a delete hook.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 31/53
5-31®
Resource ReclamationResource Reclamation
Contrary to the #hiloso#hy o" sharing system resourcesamong all tasks.
Can !e an e)#ensi&e #rocess: $hich must !e thea##lication=s res#onsi!ility.
TCB and stack are the only resources automaticallyreclaimed.
Tasks are res#onsi!le "or cleaning u# a"ter themsel&es.
– 'eallocating memory. – Releasing locks on shared resources.
– Closing "iles $hich are o#en.
– 'eleting child tasks $hen #arent task e)its.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 32/53
5-32®
Real-Time MultitaskingReal-Time Multitasking
Introduction
Task Basics
5. Task Control
Error Status
System Tasks
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 33/53
5-33®
Task RestartTask Restart
taskestart (tid)
Task is terminated and res#a$ned $ith originalarguments and tid.
/sually used "or error reco&ery.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 34/53
5-34®
Task Sus#end;ResumeTask Sus#end;Resume
taskS"spend (tid)
Makes task ineligi!le to e)ecute.
Can !e added to #ended or delayed state.
It is sa"est to ha&e a task sus#end itsel".
taskes"me (tid)
Remo&es sus#ension.
/sually taskSuspend 4 and task$esu!e4 are used "orde!ugging and de&elo#ment #ur#oses.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 35/53
5-35®
Task 'elayTask 'elay
To delay a task "or a s#eci"ied num!er o" system clockticks*
S*US taske'ay (tics)
To #oll e&ery 1;D second*
F$%E&E% {tas'ela (ss*l'%ate+et( ) ,)...}
– %ccurate only i" clock rate is a multi#le o" se&en ticks;second.
– Can su""er "rom dri"t.2
/se sysClk$ateSet( ) to change the clock rate.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 36/53
5-36®
Reentrancy and Task 3aria!lesReentrancy and Task 3aria!les
I" tasks access the same glo!al or static &aria!les: theresource can !ecome corru#ted 4called a race condition.
7ossi!le Solutions*
– /se only stack &aria!les in a##lications.
– 7rotect the resource $ith a sema#hore.
– /se task &aria!les to make the &aria!le #ri&ate to a task.
Task 3aria!les cause a <-!it &alue to !e sa&ed andrestored on conte)t s$itches: like a register.
Ca&eat* task &aria!les increase conte)t s$itch times.
See the task3ari!task3ari! manual #ages "or details.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 37/53
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 38/53
5-38®
Task In"ormationTask In"ormation
ti (task+amer-d)
ike i4 : !ut also dis#lays*
– Stack in"ormation
– Task o#tions – C7/ registers
– ,7/ registers 4i" the 3@9,79T%S6 o#tion !it is set.
Can also use sho$ 4 *
- show (t/et0as'1 2)show (t/et0as'1 2)
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 39/53
5-39®
Task Bro$ser Task Bro$ser
To o!tain in"ormationa!out a s#eci"ic task:dou!le-click on the task=ssummary line in the maintask !ro$ser dis#lay: or
enter the task=s I' in theSho$Sho$ !o).
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 40/53
5-40®
What is 7SI@What is 7SI@
riginally: an IEEE committee con&ened to create astandard inter"ace to /8I@ "or*
– Increased #orta!ility.
– Con&enience.
3)Works su##orts almost all o" the 1??.1! 7SI@ Real-time E)tensions.
The 7SI@ real-time e)tensions are !ased on im#licitassum#tions a!out the /8I@ #rocess model $hich do not
al$ays hold in 3)Works. In 3)Works: – Conte)t s$itch times are &ery "ast.
– Te)t: data: and !ss segments are stored in a common: glo!aladdress s#ace.
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 41/53
5-41®
What does 3)Works Su##ortWhat does 3)Works Su##ort
Library DescriptionaioPxLib Asynchronous I/O
semPxLib POSIX Semaphores
mqPxLib POSIX Message Queues
mmanPxLib POSIX Memory Management
schedPxLib POSIX Scheduler Interface
sigLib POSIX Signals
timerLib, clockLibPOSIX Timer/Clock Interface
dirLib File/Directory Information
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 42/53
5-42®
Real-Time MultitaskingReal-Time Multitasking
Introduction
Task Basics
Task Control5. Error Status
System Tasks
S
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 43/53
5-43®
Error StatusError Status
lo!al integer errno is used to #ro#agate errorin"ormation*
– o$ le&el routine detecting an error sets errno.
– Calling routine can e)amine errno to disco&er $hy the routine"ailed.
E d C t t S it h
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 44/53
5-44®
Errno and Conte)t S$itchesErrno and Conte)t S$itches
%t each conte)t s$itch: the kernel sa&es and restores the&alue o" errno.
SS tti E
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 45/53
5-45®
Setting ErrnoSetting Errno
o$est le&el routine to detect an error sets errno andreturns ERRR*
S030"S m%outine(){...if (m/umFlurbishes 4 M356F7"%89S:)
{errno 4 S6m7ib60$$6M3/6F7"%89S:ES;return (E%%$%);}
... <Mem 4 mallo= (si>eof(mStru=t));if (<Mem 44 /"77)
{! mallo=() sets errno - do?nt redefine it
!return (E%%$%)}
...
}
E i i EE i i E
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 46/53
5-46®
E)amining ErrnoE)amining Errno
E)amine errno to "ind out $hy a routine "ailed.
errno is only &alid a"ter an error occurs.
if ( rea=tor$'( ) 44 E%%$% ){swit=h (errno)
{=ase S6r=tor7ib60EM@63/+E%6A$/EB
startShutdown( );
brea';=ase S6r=tor7ib60EM@6*%909*376A$/EB
logMsg(C%unD); brea';
=ase S6r=tor7ib67E36@$SS987EB=he='&essel( );
brea';defaultB startEmerg@ro=( );}
}
I t ti EI t ti E
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 47/53
5-47®
Inter#reting ErrnoInter#reting Errno
3)Works uses the <-!it &alue errno as "ollo$s*
1 15 ?
– 3)Works module num!ers are de"ined in &$Mod8um.h&$Mod8um.h.
– Each module de"ines its o$n error num!ers in its header "ile.
,or e)am#le: an errno o" ?)11???1 $ould !e*
– Module num!er ?)11 4de"ined in &$Mod8um.h&$Mod8um.h to !e memi!memi! and
– Error num!er ?)?1 4de"ined in memi!.hmemi!.h to !e not enoughmemory2.
module error num!er
E ME M
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 48/53
5-48®
Error MessagesError Messages
3)Works uses an error sym!ol ta!le 4statSymT!l tocon&ert error num!ers to error messages.
To o!tain the error string corres#onding to errno*
To #rint the error message associated $ith an errornum!er to the WindSh console*
- <rintErrno (GH22GGG2)
S9memi!98T9E8/+9MEMRF
{
=har errStr I/3ME6M35J;strerror6r (errno1 errStr);...}
/ ' "i d E C d/ ' "i d E C d
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 49/53
5-49®
/ser-'e"ined Error Codes/ser-'e"ined Error Codes
To allo$ strerror'r 4 to su##ort your error messages*1. Create a user header "ile directory.
<. Create a "ile ))Mod8um.h))Mod8um.h in the user header directory*
Kdefine M6m7ib (LG2 2N)
. 'e"ine error macros in your header "iles 4$hich must !e in theuser header directory*
Kdefine S6m7ib6836S0"FF (M6m7ibO2)
. Re!uild the system error ta!le: statT!l.ostatT!l.o.
5. Include the com#onent de&elo#ment tool com#onents G sym!ol ta!lede&elo#ment tool com#onents G sym!ol ta!le
com#onents G error status ta!lecom#onents G error status ta!le in 3)Works. %dd statTlo to theE@TR%9M'/ES macro.
H. Re!uild 3)Works.
R l Ti M ltit kiR l Ti M ltit ki
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 50/53
5-50®
Real-Time MultitaskingReal-Time Multitasking
Introduction
Task Basics
Task ControlError Status
5.5 System Tasks
S t T kS t T k
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 51/53
5-51®
System TasksSystem Tasks
Task 8ame 7riority ,unction
t*sr$oot ? ,irst task. InitialiAes included
"acilities: s#a$ns user a##lication:
and e)its.
tLo+Task ? Message logging.
t,xcTask ? Ser&er $hich e)ecutes miscellaneous
task-le&el "unctions at high #riority.
tWdTask W'B run-time agent.
tetTask 5? Task-le&el net$ork "unctions.
t-tpdTask 55 ,T7 ser&er.
SS
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 52/53
5-52®
SummarySummary
Real-time multitasking re(uirements* – 7reem#ti&e #riority-!ased scheduler
– o$ o&erhead
Task #ro#erties stored in task=s TCB.
– S control in"ormation 4#riority: stack siAe: o#tions: state: ....
– Sa&ed C7/ conte)t 47C: S7: C7/ registers: ....
taskSpawn( ) lets you s#eci"y intrinsic #ro#erties*
– 7riority
– Stack siAe
– #tions
SS
8/16/2019 05. Real-Time Multitasking
http://slidepdf.com/reader/full/05-real-time-multitasking 53/53
SummarySummary
Task mani#ulation routines in taski!* – taskSpawn.task#elete
– task#elay
– taskSuspend.task$esu!e
Task in"ormation
– ti.show
– Task Bro$ser
%dditional task conte)t* – errno
– Task &aria!les
– Task hooks