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

 

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

1 Expert Approved Answer
Step: 1 Unlock

a Control Flow Graph CFG measAcquisition v while true v scaledTemp SLOPEtempMeas BIAS v satFnc v if ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!