Question: 1. For the following program (assume tempMeas global variable is updated by another thread): a) Construct the Control Flow Graph. b) The while loop

1. For the following program (assume tempMeas global variable is updated by another thread): a) Construct the Control Flow Graph. b) The while loop in this program is non-terminating. Explain the meaning of worst-case execution time in this case and how it could be estimated? #define SLOPE = 5000 #define BIAS = 1 float tempMeas; float tempVar; void measAcquisition () { float scaledTemp; while (true) { scaledTemp = SLOPEtempMeas + BIAS; } tempVar = satFnc (-100, 100, scaledTemp); satFnc (float lowLim, float highLim, float num) { if (num highLim) return highLim; else return num; }
Step by Step Solution
There are 3 Steps involved in it
a Control Flow Graph CFG measAcquisition v while true v scaledTemp SLOPEtempMeas BIAS v satFnc v if ... View full answer
Get step-by-step solutions from verified subject matter experts
