4 ms·
I think it reduces average lock graph complexity, which in turn would reduce the average number of low productivity context switches required to release lock ow
by jandrewrogers 7y ago
I think it reduces average lock graph complexity, which in turn would reduce the average number of low productivity context switches required to release lock ownership.
It is a vicious cycle problem. Processes with simple lock graphs strictly queued behind processes with complex lock graphs both take a long time to run and contribute to lock graph complexity, which increases the amount of time it takes for the processes with complex lock graphs to make forward progress. Randomization of lock grants will (statistically) continuously clear out some of the simple lock graphs and thereby make forward progress on the complex lock graphs that overlap that set of locks more likely.
Databases have to deal with several related problems, such as how to ensure slow operations (e.g. analytic query) do not starve fast operations (e.g. a simple insert). In recent years, designs are moving away from quasi-randomly arbitrated lock graphs and moving toward explicit control of execution scheduling, which can eliminate the need for locks altogether and ensure that all context switches are optimally productive in terms of throughput while bounded by other constraints such as latency distribution.
- sitkack 7y agoAre you saying one can schedule perfectly if their view of the universe is offset from our timeline?