Correct allocation of resources in Automated Manufacturing Systems (AMS) is very important, especially in order to avoid deadlocks and their consequences. Petri Nets (PN) are frequently used for modeling AMS. S3PR (Systems of Simple Sequential Processes with Resources) model of Resource Allocation Systems (RAS) based on PN are defined, analyzed and controlled here. S3PR are modeled by Ordinary PN (OPN). After defining and creation of such models the deadlock prevention will be performed by two deadlock prevention methods, namely (i) the method based on elementary siphons, and (ii) the method based on preventing strict minimal siphons from being emptied in another way (by means of circuits, holders of resources and complementary siphons). For illustration, two practical examples will be introduced. Both approaches are very useful not only for reliable deadlock -free control of existing AMS, but also at design of new AMS of such kind.