https://123dok.net/document/q2n3ogp6-simple-distributed-solutions-to-the-readers-writers-problem.html