In my program, I'm currently using two large datastructures (a tree and a linked list) which are heavily dependant on each other. The tree's nodes contain pointers to the linked list's nodes.
Both datastructures have to update each other whenever a change occurs in either of them.
(jpeg diagram attached)
The multithreading:
There are some object instances M1, M2, M3 & M4 which are part of some thread instances. Any of these modules from any of these threads might decide to make a change to any of the nodes of the datastructures.
My issue is that when one thread is busy making changes to any node of the database, all the other threads have to wait, because if they try to change any part of the database, everything will get messed up because both databases are dependant on each other.
To avoid such thread waiting, which section of the architecture/design would you recommend that I change? and how?
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.