The problem I am currently solving requires the use of two or more locks (file locks in this case) to avoid concurrency issues.

However I am having trouble representing the (locking) model I will use for the solution.

I.e. I would like to explain the problem and the solution I am coding via some type of diagram that lets me display the locking sequence, the concurrency implications (e.g. if we release this lock before this one we will have this problem, etc) and other such useful information.

What would be a good way to represent lock models? 

I have been trying to do so with a flow diagram on one hand, so I can show the code flow that leads me to either having to obtain a lock or not (e.g. I use an exclusive non-blocking lock to determine if a process is already monitoring a file, and if not I start the monitor), and on the other hand I've been thinking that a sequence diagram would do, but I am not satisfied with the results.

Are there any other visual tools available that would let me represent this problem? 

How do engineers solve this issue for really complex problems like distributed systems and such? 

Is there any one diagram for this or is it more like a collection of diagrams that are used to describe this?