Locking concurrent commands in a database management system
Abstract:
Disclosed herein are methods for receiving a command for adding or removing a resource in a database and acquiring an exclusive lock for the database in response the command. In response to obtaining the exclusive lock, the method comprises determining a first number indicating the number of resources currently existing in the database and a second number indicating the number of resources subject to concurrent further commands for adding or removing a resource; comparing the first and the second number for determining whether the received command will remove the last existing resource or add a first resource to the database; and obtaining an exclusive or a shared lock for the received command in dependence on the determination. The method further includes releasing the exclusive lock for the database and adding or removing the resource while holding the lock obtained for the received command.
Public/Granted literature
Information query
Patent Agency Ranking
0/0