You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A recurring theme I've seen in database papers is extending the lock manager with new modes to get more parallelism. The most popular need is intent locks. At least BerkeleyDB [1] and MSSQL [2] implement more than S and X.
Fortunately, all extended lock schemes can be specified using a conflict matrix, as shown in [1]. I think it'd be more intuitive to use an inverted representation compared to [1]. Specifically, matrix[i][j] is 0 if there's a conflict when the lock has an owner in mode i and a new owner requests mode j.
We could offer IS/IX/S/X by default, and let apps register custom matrices. Each acquire would have an optional matrix name parameter, and it'd get bounced if the lock has exists and was created with a different matrix.
Registration seems a bit bulky, but each app (or, realistically, db library) would only make a couple of registration calls during initialization. Registration should be idempotent (registering the same matrix with an existing name would be OK, registering a different matrix with the same name would fail) so apps that (unknowingly) use multiple instances of the same DB library can work without problems.
A recurring theme I've seen in database papers is extending the lock manager with new modes to get more parallelism. The most popular need is intent locks. At least BerkeleyDB [1] and MSSQL [2] implement more than S and X.
Fortunately, all extended lock schemes can be specified using a conflict matrix, as shown in [1]. I think it'd be more intuitive to use an inverted representation compared to [1]. Specifically, matrix[i][j] is 0 if there's a conflict when the lock has an owner in mode i and a new owner requests mode j.
We could offer IS/IX/S/X by default, and let apps register custom matrices. Each acquire would have an optional matrix name parameter, and it'd get bounced if the lock has exists and was created with a different matrix.
Registration seems a bit bulky, but each app (or, realistically, db library) would only make a couple of registration calls during initialization. Registration should be idempotent (registering the same matrix with an existing name would be OK, registering a different matrix with the same name would fail) so apps that (unknowingly) use multiple instances of the same DB library can work without problems.
[1] https://docs.oracle.com/cd/E17276_01/html/programmer_reference/lock_stdmode.html
[2] https://technet.microsoft.com/en-us/library/ms175519(v=sql.105).aspx#Intent Locks
The text was updated successfully, but these errors were encountered: