Abstract The use of structure theory of Petri nets to develop efficient deadlock prevention and deadlock avoidance methods for flexible manufacturing systems (FMSs) modelled by S
4R nets is demonstrated. Major synchronisation patterns, such as generalised parallel and sequential mutual exclusion, frequently observed in FMS contexts can be represented by this class. The liveness property of a given S
4R net (deadlock-freeness in the context of FMSs) is characterised in terms of structural Petri net elements called siphons. An efficient method for controlling minimal siphons of a given S
4R net is developed where local control places are added to the net. A sufficient condition for liveness of the augmented net is provided. This constitutes a deadlock prevention approach. When the net liveness condition is not satisfied, an on-line controller, using a dynamic resource allocation policy, is developed for the augmented net. The performance of the proposed approaches is illustrated using several examples.