G
What's the fundamental difference between AVL and red black? I think it doesn't matter.The result may be one, but it's easier for me to clearly record the difference in the height of the support. In my view, this approach is the way in which the balance sheet algorithm is maximized.It's interesting. When can lock-free algorithms be applied to sufficiently complex structures?Pretty complicated, I'm not sure.Only in cases where simultaneous access is unlikely.That's what I'm interested in right now.Available N flows and one parallel task. The challenge is solved by its irration. Each iteration shall be carried out at approximately fixed times (regulation of the length of the irration [discretion of the task] shall be made from outside, static). Every flow, it's a waste. And since, initially, one task should therefore be divided into the remaining flows. May each flow that has not been tasked with the maximum resource and divide it into two. If the flow has chosen its irration, it seeks a new free task or tries to divide the maximum if the number of tasks is less than the number of flows. The task is considered to be available for division if it is above the specified limit. Thus, as long as the task is divided, flows will always be dealt with.That's the algorithm I'm trying to do without locking. The list is a list of free tasks. Challenges that have not yet taken on any flow. The free task can either be divided or one of its determinants. Naturally, the number of tasks should not exceed the number of flows, but there may be little logical exceptions. Since the number of flows is equal to the number of kernels, the list is small enough to be very frustrated in the grading, but it may be necessary to think about the optimization of the grading if there is greater competition between flows.Theoretically, I can count the time spent on competition between interlock flow, because I can count the number of idle cycles and I can figure out how many tacts the cycles are running.That is, ultimately, it will be a percentage of the time spent on the combined lock-free synchronization.I can't just count the time spent on the synchronization of standard tools (critical sections, me). If it's obvious that tact measurements are made in front of these locks, it'll be very inaccurate. It seems that the most logical way is to measure the time of the task on both modes of synchronization and to determine whether lock-free wins in this case. But such experiments, if I do, are not short of time.Update: To be honest with you, SMP I never managed to stabilize this algorithm.But after a long and hard study. lock-free concluded that it was pure (i)inlinesuch methods are incapable. For further experiments, they need them. display barrier as at the competitor level _ReadBarrier/_WriteBarrier/_ReadWriteBarrierand at the equipment level _mm_lfence/_mm_sfence/_mm_mfence♪I would be very grateful if there were any working examples with that organization of the set of tasks, since I still have a very specific expectation. lock-free:I've started a test task, "having out the set of points with a rectangular window." Each of these alternatives considers the time spent on the solution and accumulates it in the battery of the nucleus (the fixed flow). After completion of the calculations, the key parameter is calculated, the number of points per second equals S / Twhere T - is the total time of all the irrations at the slowest kernel (the flow fixed on the nucleus) and S - total number of points processed. In the case of a lock-free This characteristic once deteriorated to 300 million in sections on 8,3GHz yards, and I'd like to keep that speed in return for 20-50 million blocks.I mean, "depressed" is exactly the word, because I've set this target 100 times, and every subsequent irration has received an increase in speed.I never managed to stabilize this algorithm.About a month ago, I've been doing this. In the 3rd option: http://msdn.microsoft.com/ru-ru/library/windows/desktop/ms683648(v=vs.85).aspx on dynamics (when the number of tasks is unpredictablely increasing) and on static glazing (when the maximum number of tasks is known in advance or a fixed set of tasks is available). Productivity API Lower, as we spend time challenging the function and we have no opportunity to sort the summit.Static glazing is the highest. Although it has been implemented lock-free-стека free SIMD- I didn't have to. I'm not gonna say the exact numbers right now, but... my preliminary assessment The use of this sorting is ~3-6% Gains against the basic algorithm lock-free♪ ~20-30% - I didn't even think about "pine," and "nuclear" synchronizations. lock-free)I will describe in greater detail the implementation in a single step, a little later when the time for a simple test will be taken.