Question: Exercise 3.3: The reaction description for the controller Controller 2 consists of three tasks as shown in figure 3.8. Split the task A3 into
Exercise 3.3: The reaction description for the controller Controller 2 consists of three tasks as shown in figure 3.8. Split the task A3 into four tasks, each of which writes exactly one of the state variables east, west, nearw, and near. Each task should be described by its read-set, write-set, and update code, along with the necessary precedence constraints. The revised description should have the same set of reactions as the original description. Does this splitting impact output/ input await dependencies? If not, what would be the potential benefits and/ or drawbacks of the revised description compared to the original description? event({arrive, leave}) outw {green, red} west := red; east bool nearw = 0; near := 0 A west signalw : signalw= west event({arrive, leave}) out red A3 west, east, out, outw, neare, nearw east, west, nearw, nearE = A: east signalE signal = east if oute ? arrive then nearE := 1; if oute? leave then nearE := = 0; if outw? arrive then nearw := 1; if outw? leave then nearw := = 0; if 7 neare then east := red else if west {green, red} signalw red then east := green; if - nearw then west: red else if east red then west := green; {green, red) signale Figure 3.8: A Safe Controller for the Railroad Problem
Step by Step Solution
3.43 Rating (143 Votes )
There are 3 Steps involved in it
Revised task A3 Readset west east out outw neare nearw Writeset east Update code if out arrive then ... View full answer
Get step-by-step solutions from verified subject matter experts
