Version Differences for Lock For Workflow Warning

(Added Headings & Placeholders for images)
Line 1:
    + =Information=  
  Select 'No' to lock the agent and working directory only for the duration of this job.    Select 'No' to lock the agent and working directory only for the duration of this job. 
       
Line 8:
       
       
- '''Technical Description:'''      
       
       
    + =Deadlock Prevention=  
    + This deadlock can be prevented by understanding the description of how this occurs, and using a workaround.  
    + ==Technical Description==  
  When a job in a workflow tries to schedule itself for agent+workdir selection. The comparison with existing workflow level locks is not atomic with the request for new locks. This means that if multiple jobs are trying to acquire a resource "for workflow" in at the same time, there is a risk that they may both end up trying to acquire the same resource exclusively and will not release it; resulting in the workflow deadlocking.    When a job in a workflow tries to schedule itself for agent+workdir selection. The comparison with existing workflow level locks is not atomic with the request for new locks. This means that if multiple jobs are trying to acquire a resource "for workflow" in at the same time, there is a risk that they may both end up trying to acquire the same resource exclusively and will not release it; resulting in the workflow deadlocking. 
       
Line 14:
- '''Mitigation:'''   + ==Mitigation==  
  If there is a need to have parallel work done on the same [agent+workdir] by multiple jobs (iteration or regular parallel configuration), create a new single job which will run prior to these which just locks that desired [agent+workdir] combination "for workflow". This configuration order guarantees the subsequent jobs will detect that the resource is already bound to the workflow and not try to reacquire it themselves.    If there is a need to have parallel work done on the same [agent+workdir] by multiple jobs (iteration or regular parallel configuration), create a new single job which will run prior to these which just locks that desired [agent+workdir] combination "for workflow". This configuration order guarantees the subsequent jobs will detect that the resource is already bound to the workflow and not try to reacquire it themselves. 
       
    + ===Deadlock Example===  
    + [[Image:Lock_For_Workflow-Deadlock_Configuration.jpg]]  
    + [[Image:Lock_For_Workflow-Deadlock_Execution.jpg]]  
       
    + ===Continuance Example===  
    + [[Image:Lock_For_Workflow-Continuance_Configuration.jpg]]  
    + [[Image:Lock_For_Workflow-Continuance_Execution.jpg]]