#1113 Link uml-reverse-mapper created class diagrams to readme, where needed

This commit is contained in:
Ilkka Seppälä
2019-12-07 20:01:13 +02:00
parent 0685a505d3
commit b09b100614
161 changed files with 246 additions and 64 deletions

View File

@ -11,21 +11,22 @@ tags:
- Performance
---
**Intent:**
## Intent
Suppose we have a shared memory area with the basic constraints detailed above. It is possible to protect the shared data behind a mutual exclusion mutex, in which case no two threads can access the data at the same time. However, this solution is suboptimal, because it is possible that a reader R1 might have the lock, and then another reader R2 requests access. It would be foolish for R2 to wait until R1 was done before starting its own read operation; instead, R2 should start right away. This is the motivation for the Reader Writer Lock pattern.
## Class diagram
![alt text](./etc/reader-writer-lock.png "Reader writer lock")
**Applicability:**
## Applicability
Application need to increase the performance of resource synchronize for multiple thread, in particularly there are mixed read/write operations.
**Real world examples:**
## Real world examples
* [Java Reader Writer Lock](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReadWriteLock.html)
**Credits**
## Credits
* [Readerswriter lock](https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock)