multithreading - Publishing Concurrent Objects -
I am interested in technology that people use to publish the information and make changes in the data structures that many Concurrency is being shared without losing too much threads in threads. In my personal experience, I often come across single authors / many readers, where a formula is updating an item, but many threads are reading from the object and need to be informed of the changes.
Simple examples, consider a hashtable (assuming this thread is secure, through coarse grain locking, fine locking, or low-lock technique etc.). Thread 1 is responsible for inserting and removing information from hashtable, but is the only author. Other threads can be reported when a key is changed, a certain key changes, or any different ones that want to subscribe are not particularly important.
What techniques (I like suggestions for papers) will you use to ensure that information about timeline and correct changes is obtained?
You have actually asked about 2 different problems
Multiple Reader / Single Worker Exclusion
Update Notification (which is often called Supervisor Pattern)
Multiple Reader / Single Worm Lock is a classic problem for which a huge amount of literature is the real problem That many classic solutions include several mutes and or semaphores, and the first reading lock According to 6 write modified writing (Armdblu) cycles is too heavy to very heavy and 6 Armdu.
There are some solutions to both problems, efficiency and practicality, depending on how to read the arrival rate, the arrival rate of writing, the duration of the writing, the duration of reading, whether the updates can be batch, You need to upgrade, read the lock, downgrade a lock (looks like no in your case)
For an example of a hash table, you can use "Medium Granulate Locking" En Access Thread ) And only sections of the lobbets hash table (for different chain brains). With opening the lock, it is not necessary that the slots are checked on. Or you use the Hop-Scotch hash of a concurrent hash table algorithm
So far as the notification is concerned, there are some common questions:
Read the thread (and process) see every notification? Is the inspector a stable or dynamic group? I.e. notification "network" position Maybe (determined at compile time)
Comments
Post a Comment