×

Database access with multilevel lock

  • US 7,574,438 B2
  • Filed: 12/03/2003
  • Issued: 08/11/2009
  • Est. Priority Date: 12/03/2003
  • Status: Active Grant
First Claim
Patent Images

1. A method of scheduling access to a database by multiple processes, comprising:

  • in multiple instances of a software-implemented procedure, each instance of the software-implemented procedure associated with a particular process of the multiple processes, associating a lock level with the particular process and attempting to associate a different lock level with the particular process until the particular process is granted access to the database, a higher lock level representing a larger number of other processes having priority over the particular process in accessing the database, each process of the multiple processes being associated with no more than one lock level;

    repeatedly calling, using the particular process, said each instance of the software-implemented procedure to attempt to associate the particular process with successively lower lock levels until the lock level is equal to a preset value, and each time the particular process has been successfully associated with a lower lock level, releasing a previous lock level associated with the particular process so that the previous lock level is available to be associated with the other processes, the preset value equals to one;

    allowing, using the software-implemented procedure, the particular process to access the database when the lock level for the particular process is equal to the preset value,at a computer, storing, in a queue, data indicating which process is associated with which lock level, the computer including a processor;

    updating, using the software-implemented procedure, the data indicating which process is associated with which lock level;

    reassigning lock levels of the multiple processes when a process accessing a record terminates its access to the record, wherein the process that attempted to access the record earlier than other process is assigned a lower lock level than the other process, and said each process other than the process terminating its access to the record is assigned a lower lock level when the process terminates its access to the record, wherein the particular process changes two or more lock levels from an initially assigned lock level to the lock level having the preset value before the particular process is allowed to access the record, said each process of the multiple processes attempts to associate itself with a lower lock level independently of the other processes, and at least two processes of the multiple processes are being run in a parallel processing environment; and

    allowing the multiple processes to read the record but not modify the record when the lock levels for the multiple processes are different from a preset value.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×