Question
9. The tasks scheduler in the Text 1 determines when each task should be executed in a multiple-task system. Which lines actually implement the task
9. The tasks scheduler in the Text 1 determines when each task should be executed in a multiple-task system. Which lines actually implement the task scheduler?
a. 10-15
b. 44-65
c. 35-41
d. 31-34
10. What new member can be added to the task structure to facilitate implementation of a necessity based scheduler?
a. Priority sort
b. Priority queue
c. Priority variable
d. Priority period
11. When running, which line in Text 1 detects a timer overrun exception?
a. 28
b. 12
c. 31
d. 59
12. Which State Machine in Text 1 has the greatest WCET (worst-case execution time) in the state actions?
a. TL_States
b. BL_States
c. All the same
d. Main
13. Which line in Text 1 sets a variable to tell the state machine to initialize when the program starts running
a. 53
b. 19
c. 74
d. 115
14. Which line in Text 1 scheduler actually calls BL State Machine function?
a. 67
b. 37
c. 70
d. 99
15. Which state caused Queue underflow in the Homework problem?
a. OWait
b. OutWait
c. OutChar
d. None
16. Which synchSM in Text 1 has the highest % utilization?
a. TL_States
b. BL_States
c. Main
d. All the same
2. This code was aut omat i cally generated using the Riverside-Irvine State machine Builder tool 3. Version 2.510/18/2012 10:2:14 PST 6.#include "rimsh" 9. /*This code il be shared betveen state machines./ 10. typedef struct task 1 int state; 12. unsignedlong period; 13 unsigned long elap sedTi ne; 14. nt (TickFct)(int); 15. I task; 16 17. task tasks[21 18 19. const unsi gned char tasksNun-2; 20. const unsigned long periodBlinkLed = 1500; 21. const unsi gned long periodThreeLeds 500; me: 23. const unsigned long tasksPeriodGCD500; 24 25. int TickFct BlinkLed (int state): 26. int TickFct ThreeLeds (int state); 27 28. unsi gned char process RdyTasks0 29. void TinerISRO 30. unsigned char; 31 f (processingdyTasks) print f ( Period too short to conplete taskstn ; 34. processi ngRdy Tasks1; 35. or 0; i : tasks [ ].period ) { tasks [i].state tasks[i]-TickFct (t asks[i].state); tasks[1] .elapsedTine-0; tasks[i.e lapsedTime tasksPeriod GCD; 42 processingRdy Tasks 0; 44. int main) 45. // Priority assigned to lover position tasks in array 46 unsigned char i0; 47 tasksi.state1; 48. tasks[?period: periodBlinkLed; 49 tasks[i].elapsedTi ne tasks [i].period; 50. tasksli].TickFct&TickFct_BlinkLed; 53. tasks[i].state1 54. tasks(?period: periodThreeleds ; 55 tasks[i].elapsedTime tasks [i].period; 56. tasks[i].TickFct&TickFct_ThreeLeds; 57 58. i 59. TimerSet (tasksPeri odGCD); 60 imerOn); 62. while() Sleep; 63 64. return UStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started