Description
We study compile-time schedulability of concurrent programs based on a Petri net model. We consider concurrent programs that asynchronously communicate with each other and the environment through unbounded first-in first-out (FIFO) buffers. The Petri net represents the control flow and communications of the programs, and models data dependent branches as non-deterministic free choices. A schedule of a Petri net represents a set of firing sequences that can be infinitely repeated within a bounded state space, regardless of the outcomes of the nondeterministic choices. Schedulability analysis for a given Petri net answers the question whether a valid schedule exists in the reachability space of this net. Due to the heuristics nature of existing scheduling algorithms, discovering powerful necessary condition for schedulability is important to gain efficiency in analysis. We propose a novel structural approach to schedulability analysis of Petri nets. Structural analysis often yields polynomial-time algorithms and is applicable for all initial states. We show that unschedulability can be caused by a structural relation among transitions modelling nondeterministic choices. Two methods for checking the existence of the relation are proposed. One uses linear programming, and the other is based on the generating sets of T-invariants. We also show a necessary condition for schedulability based on the rank of the incidence matrix of the Petri net. These theoretic results shed a light on the sources of unschedulability often found in the Petri net models of embedded multimedia systems. Our experiments show that these techniques are effective and efficient.