Message-based systems usually consist of distributed components that communicate using asynchronous message passing. In such systems, particular message orderings may violate some required properties. Given an automata-based specification of unwanted message sequences, we propose a decentralized deadlock-free runtime enforcement algorithm to prevent the formation of such sequences. In our approach, components are equipped with monitors executed concurrently. A component is only blocked before sending or receiving the last message of a sequence, until its associated monitor checks that such a message does not complete an unwanted sequence. According to the specification of unwanted sequences, some blocked components may suffer from a deadlock. Our deadlock-free algorithm guarantees that monitors detect and resolve such deadlocks by improving the existing deadlock detection algorithms. We evaluate the efficiency and scalability of our approach in terms of the communication overhead, the prevention latency, and the overhead of deadlock detection through simulation.
Read full abstract