DEADLOCK PREVENTION AND AVOIDANCE IN FLEXIBLE MANUFACTURING SYSTEMS