Multithreading – what is the best diagram to illustrate how semaphores / multiprocesses / shared memory programs work?
•
Java
I did a small project in which I used various processes / shared memory / semaphores
I now want to explain my code and program logic to my lecturer and several colleagues
Therefore, I want to know what symbols / diagrams people usually use to describe this program Activity diagram? flow chart? What else?
thank you
Solution
In my course, I explain threading problems to us by using graphics and so on, mark key points (more specifically, points that need to be synchronized) and explain how to solve the problem If you mark a key, it works very well:
T1 T2 T3 method A method A method A \ / / \ / / critical section 1 / / method B
wait
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码