Hello, AlexGin, you wrote: AG> Hello, Carc, you wrote: a C>> Hello, AlexGin, you wrote: AG>>> What here there can be thoughts in this respect? AG>>> P.S. In advance I thank for any answers! A C>> And that they do? Different flows? Than are engaged? A C>> What circuit? One writer, it is full of readers? One reader, it is full of writers? The task in whole what? AG> in an application operating time, worker threads read the information from Shared Memory. AG> Only at application start - the unique worker thread writes all (from DB) in Shared Memory. AG> Here - one "writer" working right at the beginning. This stage transits well. AG> by operation of "readers" - problems take place. If worker threads only read, and change nothing in SharedMemory in section to turn? On which? does not change? On mine here other circuit should be. Also depends on one: The unique flow if at once all writes, and is more there changes than nothing that and a fig then generally all ? If it all the same changes periodically something adds, and not just at start then it is necessary to synchronize flows. But only the writer with all readers and on the contrary. But in any time not to synchronize flows-readers among themselves, in it there is no necessity. They change nothing, and readers among themselves do not have necessity to be synchronized. 1) if worker threads have nothing to do, while the start flow does not add all, then worker threads generally to start till the end of record? Then synchronization ! All wrote down, working flows-readers then launched. If in it to eat than be engaged, then it is simply got , and the start flow, cocks it when all writes down. Flows-readers wait for it , and start to read, when it beeps. Though here it is better to wait to readers on two : 1st speaks - "" to read, and the second "" to quit (well type the user pushed to close the program. 2) if the writer periodically something all the same changes a flow, generally differently. What-thread - which speaks, how many flows read the data. While though someone reads, the flow-writer cannot start record over again. Flows readers - check what-thread two primitives (, ) it is pleasant to whom. 1st primitive signals on a subject what to read and at all it is impossible, there is a record by a flow-writer. 2nd primitive signals that records that while is not present, but it is impossible to read, since the writer gathers in storage. As works: 1) the Flow the writer gathers - and cocks , I want to write. 1.: the flow-reader checks this - if sees that to write - waits, does not start. 2) the writer checks a flow, whether is reading (on other semaphore) - if is waits while they will be completed. And when readers will be completed, they see point 1.. (Instead of whether want ) if want - do not read, wait. Sooner or later all active-readers complete old reading, and do not begin new reading. 3) a flow the writer learns that all readers finished reading. Also cocks another - a whisker a pancake, I write to storage. Readers wait for both : and "there is a record" and "it is possible to start to read". 4) the writer stops to write the Flow and cocks two : "I stopped to write 1st" and "it is possible to read 2nd". Flows readers wake up, and start to read on a reading course increasing a semaphore "there is a reading". If during this moment the writer wants and still a little (well is left thick what to do) - that he on a semaphore learns that while it is impossible to re-record the data - still reads. But cocks "I want to write". Then readers finish reading, but a rho "I want to write" see that it is not necessary yet start to read anew, the flow-writer needs to unsubscribe and again wait. The main thing: It is a lot of flows of readers among themselves are not locked, and not at all - for . They change nothing in storage, and will not hinder each other. Can read simultaneously. In general it ... Words here is difficult, and and it is even more difficult. Such it is easy to draw on the circuit, on the chart - there all is simple. And words, I do not argue it turns out. But somehow so.