Readers-Writers problem is a classic problem of synchronization. The solution to this problem needed to be able to maintain data consistency.
Many threads can share the same storage resources. There is a thread that read, there is also a write. Thread a reading called readers (reader), while the write-called writers (authors).
If more than one thread accessing the same data at a time, data corruption can occur. Conditions that must be met to prevent data corruption are:
1. A data object can be read by multiple threads simultaneously.
2. A data object that is being written by a thread can not be shared access to other threads that both readers and writers.
Many threads can share the same storage resources. There is a thread that read, there is also a write. Thread a reading called readers (reader), while the write-called writers (authors).
If more than one thread accessing the same data at a time, data corruption can occur. Conditions that must be met to prevent data corruption are:
1. A data object can be read by multiple threads simultaneously.
2. A data object that is being written by a thread can not be shared access to other threads that both readers and writers.
Download tutorial code here
1 comments:
link broken...!
Post a Comment and Don't Spam!
Dont Spam please