US2013239094A1PendingUtilityA1

Detecting locking discipline violations on shared resources

Assignee: IBMPriority: Aug 25, 2008Filed: Apr 22, 2013Published: Sep 12, 2013
Est. expiryAug 25, 2028(~2.1 yrs left)· nominal 20-yr term from priority
G06F 9/52G06F 11/3672G06F 9/44589
51
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

Detecting locking discipline violations on shared resources. For example, a method of detecting locking discipline violations of shared resources of a computing platform, by a testing process to be executed concurrently with one or more other processes on said computing platform, the testing process comprising: locking a shared resource of said computing platform; reading a value of the shared resource; locally storing the value of the shared resource; rereading the value of the shared resource after a predefined time period; and generating a locking discipline violation report if the value of said shared resource as reread by said rereading is different from the value of said resource as locally stored by said locally storing.

Claims

exact text as granted — not AI-modified
1 - 20 . (canceled) 
     
     
         21 . A method of detecting locking discipline violations of shared resources of a computing platform, by a testing process to be executed concurrently with one or more other processes on said computing platform, the method comprising:
 generating a list of locks utilized by a program that is executed by a computing platform, the program includes said testing process and said one or more other processes, wherein said generating the list of locks comprises:
 dynamically analyzing the program to detect one or more locks and one or more, respective, shared resources protected by the one or more locks, said analyzing is performed by identifying one or more variables that are within a scope of each lock, and by associating each lock with the one or more variables within its scope; 
   locking a shared resource of said computing platform;   reading a value of the shared resource;   locally storing the value read from the shared resource to a location other than the shared resource;   rereading the value of the shared resource which has been locked, after a predefined time period; and   generating a locking discipline violation report if the value of said shared resource as reread by said rereading is different from the value of said resource as locally stored by said locally storing.   
     
     
         22 . The method of  claim 21 , wherein said generating comprises:
 identifying substantially all the locks in said program; and   identify a scope of each lock of said locks.   
     
     
         23 . The method of  claim 21 , wherein said generating the list of locks is performed prior to execution of the program. 
     
     
         24 . The method of  claim 21 , comprising, during execution of said program:
 detecting that a lock is taken;   adding a name of the taken lock to the list of locks;   adding the name of the taken lock to a sub-list of held locks;   detecting access to a shared resource; and   associating the name of the accessed shared resource with all the locks of the sub-list of held locks.   
     
     
         25 . The method of  claim 24 , comprising:
 subsequent to generation of said list of locks, and prior to selecting said lock from said list of locks, presenting said list of locks to a programmer of said program for review, and modifying said list of locks based on input received from said programmer.   
     
     
         26 . The method of  claim 21 , comprising:
 if a performance overhead associated with execution of the testing process is greater than a threshold value, automatically modifying said predefined time period.   
     
     
         27 . The method of  claim 21 , wherein the predefined time period comprises a time period selected from the group consisting of:
 a pseudo-random time period;   a time period calculated by taking into account one or more properties of said computing platform; and   a time period calculated by taking into account one or more properties of a program running on said computing platform.   
     
     
         28 . A computerized system for detecting locking discipline violations of shared resources of a computing platform, the system comprising:
 a processor;   a testing process adapted, to be executed concurrently with one or more other processes executed by said processor, wherein the testing process is configured:   to generate a list of locks utilized by a program that is executed by the computing platform, the program includes said testing process and said one or more other processes, wherein said generating the list of locks comprises:
 dynamically analyzing the program to detect one or more locks and one or more, respective, shared resources protected by the one or more locks, said analyzing is performed by identifying one or more variables that are within a scope of each lock, and by associating each lock with the one or more variables within its scope; 
   to lock a shared resource of said computing platform;   to read a value of the shared resource;   to locally store the value read from the shared resource to a location other than the shared resource;   to reread the value of the shared resource that has been locked after a predefined time period; and   to generate a locking discipline violation report if the value of said shared resource as reread is different from the value of said resource as locally stored.   
     
     
         29 . The system of  claim 28 , wherein said analyzing comprises:
 identifying substantially all the locks in said program; and   identifying a scope of each lock of said locks.   
     
     
         30 . The system of  claim 28 , comprising:
 a list generator to automatically generate said list of locks during execution of a program on said computing platform, wherein the program includes said testing process and said one or more other processes.   
     
     
         31 . The system of  claim 28 , wherein during execution of said program, the list generator is to detect that a lock is taken, add a name of the taken lock to the list of locks, add the name of the taken lock to a sub-list of held locks, detect access to a shared resource, and associate the name of the accessed shared resource with all the locks of the sub-list of held locks. 
     
     
         32 . The system of  claim 31 , wherein subsequent to generation of said list of locks, and prior to selection of said lock from said list of locks, the list generator is to present said list of locks to a programmer of said program for review, and to modify said list of locks based on input received from said programmer. 
     
     
         33 . The system of  claim 28 , comprising:
 a testing process modifier to automatically modify said predefined time period if a performance overhead associated with execution of the testing process is greater than a threshold value.   
     
     
         34 . The system of  claim 28 , wherein the predefined time period comprises a time period selected from the group consisting of:
 a pseudo-random time period;   a time period calculated by taking into account one or more properties of said computing platform; and   a time period calculated by taking into account one or more properties of a program running on said computing platform.   
     
     
         35 . A computer program product comprising a non-transitory computer readable medium retaining program instructions, which instructions when read by a processor, cause the processor to perform a method comprising:
 generating a list of locks utilized by a program that is executed by a computing platform, the program includes a testing process and one or more other processes, wherein said generating the list of locks comprises:
 dynamically analyzing the program to detect one or more locks and one or more, respective, shared resources protected by the one or more locks, said analyzing is performed by identifying one or more variables that are within a scope of each lock, and by associating each lock with the one or more variables within its scope; 
   locking a shared resource of said computing platform;   reading a value of the shared resource;   locally storing the value read from the shared resource to a location other than the shared resource;   rereading the value of the shared resource which has been locked, after a predefined time period; and   generating a locking discipline violation report if the value of said shared resource as reread by said rereading is different from the value of said resource as locally stored by said locally storing.   
     
     
         36 . The computer program product of  claim 35 , wherein said generating comprises:
 identifying substantially all the locks in said program; and   identify a scope of each lock of said locks.   
     
     
         37 . The computer program product of  claim 35 , wherein said generating the list of locks is performed prior to execution of the program.

Join the waitlist — get patent alerts

Track US2013239094A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.