How to solve a deadlock?

How to solve a deadlock?

denise_h2
Not applicable
81 Views
5 Replies
Message 1 of 6

How to solve a deadlock?

denise_h2
Not applicable

[ FlexSim 18.0.5 ]

deadlock.fsm

Hey guys,

may you can help me. I need to solve a "deadlock", but I'm not sure how it should work.

The problem is, that the Operator is aquired in step 1, in step 1 you need to acquire die processor of step 2. But processor of step 2 is already required and needs to be released by the Operator. So a deadlock exists.

You can find my modell attached.

Hope you can help me!!

Thank you in advance!

0 Likes
Accepted solutions (1)
82 Views
5 Replies
Replies (5)
Message 2 of 6

axel_kohonen
Not applicable
Accepted solution

Hi @Denise H2

Would it be possible for you to rewrite the process flow so that you always acquire both the operator and the processor and not continue if you cannot get both? You could do this e.g. by first acquiring the operator and having the acquire processor directly after it with a Max Wait timer with time zero for the acquire. If you cannot acquire both operator and processor then you return to the start of the process flow.

0 Likes
Message 3 of 6

denise_h2
Not applicable

Thank you @Axel Kohonen.

I'm not sure if I got it right, but in this case, the Processor 3 will always be acquired if the Operator ist acquired in step 1? So Processsor 3 would be blocked for a long time (during Processor 1 or 2 are processing) without processing?

0 Likes
Message 4 of 6

axel_kohonen
Not applicable

Hi @Denise H2

I see, I misunderstood your question originally. In case you do not need to use process flow for some certain reason I would suggest connecting the sources, processors and the sink as the flow goes and then checking the "Use transport" checkbox under the Flow tab of the sources and processors as in the attached model. I have connected the operator to the centerport so that the model knows which operator to use.

In case you want multiple operators you can connect a dispatcher to the center port of the sources and processors and then the operators to the dispatcher.

processorsmodel.fsm

In case you want to use process flow you can use the create task sequence to create the travel, load, travel, unload task sequence and dispatch them as a whole. But the solution in the attached model is easier in this case.

0 Likes
Message 5 of 6

denise_h2
Not applicable

No, you don't misunderstood my question. I'm builiding a bigger modell where it is necessary to use process flow.
Do you have a example how the "create Task sequence" ist working? 🙂

0 Likes
Message 6 of 6

axel_kohonen
Not applicable

Hi @Denise H2

In its most basic form it is like in the attached model. So you create the task sequence without giving a task executer/dispatcher, set all the tasks to not "Wait until complete" and then give the dispatcher/task executer in the dispatch TS activity.

Note that it is not always very easy to use create task sequences with resources that are reserved in one place of the process flow and freed in some other place. So I would still recommend using the normal flow for this and then using process flow as a higher level "intelligence". But since I do not know about your real model I cannot real say what is better.