Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A. Priority Sort B. Priority Queue C. Priority variable D. Priority Period When

ID: 3907905 • Letter: A

Question

A. Priority Sort

B. Priority Queue

C. Priority variable

D. Priority Period

When running, which line in Text 1 detects a timer overrun exception

A. 28

B. 12

C. 31

D. 59

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

Which line in Text 1 schedular actually calls BL_state machine function

A. 67

B. 37

C. 70

D. 99

The task sheduler in Text 1 determine when each task should be executed on multiple task system which line actually implement the task scheduler?

A. 10-15

B. 44-65

C. 35-41

D.31-34

66. enum BL States BL LedOff, BL Led0n BL State; 67. nt TickFct _BlinkLed (int state) I 68 VARIABLES MUST BE DECLARED STATIC/ 69-/te.g., static int x 03/ 70. Def ine user variables for this state nachine here 71. svitch state) // 2. This code vas aut onat i cally generated using the Riverside Irvine State machine Builder tool 3. Version 2.5 10/18/2012 10:2:14 PST 6·#include "rimsh" case: state = BL-Led0ff; 9. /This code ill be shared betven state nachines.* 10. typedef struct task I case BL Ledoff: int state; state BL LedOn: 12. unsizned lon per i od: 13. unsizned lon elapsedT i ne; 14 int (TickFct) (int); break; case BL Ledon 80 17. task tasks[21: state BL LedOff: 84 re 19. const unsigned char tasksNum = 2; 20. const unsigned long periodBlinkLed = 1500; 21. const unsigned long periodThreeLeds = 500; default: state1 Transitions 23. const unsi gned long tasksPeriodGCD 500; 89. svitch(state) // case BL_Ledoff 25. int TickFct BlinkLed (int state); 26. int TickFct ThreeLeds (int state): BO-0; break; case BLLedon: 28. unsigned char process ineRdyTasks = 0; 29. void TierISR 30 unsi gned chari 31 if (processinRdyTasks) 32 94 default: // break; print f ("Period too short to complete taskstn"); 34. 35. 36 98. // State actions 99. BL State st ate; 100 return state; process i n2RdyTasks=1; for (i = 0; i

Explanation / Answer

1. Correct answer is option B because Priority Queue sets the scheduler to execute the task having highest priority.
2. Correct answer is option D because Line 59 indicates that the timer is overrun due to excess time.
3. Correct answer is option B because Line 19 instructs the code to initialize a variable for task number.
4. Correct answer is option A because Line 67 invokes the function for BL states.
5. Correct answer is option D (31-34). It is a task scheduler code which tells that task system to execute a specific code.