< PreviousField Device Integration (FDI) – Part 3: Server RELEASED FCG TS62769-3 , Ed. 1.2.0, 21 Jun 2019 Page 59 of 62 Figure C.2 – Concurrent execution of two triggers (step1) In Figure C.3 the activity of T1 is paused in EDD Entity E1 to execute a sub activity in E2. The activity of T2 is blocked until the activity of T1 is finished. Figure C.3 – Concurrent execution of two triggers (step 2) EDD Entity E1 EDD Entity E2 EDD Interpreter Trigger T1 Trigger T2 EDD Entity E1 EDD Entity E2 EDD Interpreter Trigger T1 Trigger T2 Field Device Integration (FDI) – Part 3: Server RELEASED FCG TS62769-3, Ed. 1.2.0, 21 Jun 2019 Page 60 of 62 In Figure C.4 the sub activity in E2 initiates another sub activity back again in E1. This call back is allowed, because it is a direct consequence within the activity chain initiated by trigger T1 while activities of trigger T2 continue to be blocked. Figure C.4 – Concurrent execution of two triggers (step 3) Figure C.5 shows that the activity of trigger T1 is finished in EDD Entity E1. Now the activity of trigger T2 can be started. EDD Entity E1 EDD Entity E2 EDD Interpreter Trigger T1 Trigger T2 Field Device Integration (FDI) – Part 3: Server RELEASED FCG TS62769-3 , Ed. 1.2.0, 21 Jun 2019 Page 61 of 62 Figure C.5 – Concurrent execution of two triggers (step 4) C.3 Deadlock detection in concurrent execution A deadlock situation is shown in Figure C.6. The activity of trigger T1 wants to access EDD Entity E2 as a sub activity of an activity in EDD Entity E1 and trigger T2 wants to access E1 as a sub activity of an activity in E2 at the same time. Both activity chains deadlock one another. EDD Entity E1 EDD Entity E2 EDD Interpreter Trigger T1 Trigger T2 Field Device Integration (FDI) – Part 3: Server RELEASED FCG TS62769-3, Ed. 1.2.0, 21 Jun 2019 Page 62 of 62 Figure C.6 – Concurrent execution of two triggers In fact the activity chain of trigger T1 is blocked by the activity chain of trigger T2 and vice versa. The above example is one of the simplest deadlock scenarios, probably it will happen that much more complex deadlock scenarios occur that usually have a couple of more activity chains involved. Independently from the complexity of a deadlock scenario, there exists a simple rule to detect deadlocks by monitoring blocking dependencies of activity chains. If activity chain of trigger T(n) is blocked by activity chain of trigger T(n+1) and T(n+1) is blocked by T(n+2) a deadlock scenario is reached when this relation circles back and a trigger T(m) is blocked by T(n). It is not a deadlock scenario as long as the series of blocking dependencies ends up in a non-blocked activity chain. Usually it can be expected that the reason for a deadlock scenario is found in an involved device package. Therefore device package developers should use cross-block and cross-module references only with care and caution. Nevertheless the FDI Server is responsible for detecting deadlock scenarios. If the FDI Server has detected a deadlock scenario it can break it by aborting one of the involved activity chains and even recall the aborted trigger at a later time. EDD Entity E1 EDD Entity E2 EDD Interpreter Trigger T1 Trigger T2 Next >