US2015020074A1PendingUtilityA1

Specifying levels of access to a thread entity in a multithreaded environment

51
Assignee: IBMPriority: Oct 14, 2009Filed: Sep 26, 2014Published: Jan 15, 2015
Est. expiryOct 14, 2029(~3.3 yrs left)· nominal 20-yr term from priority
G06F 9/468
51
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

Techniques are disclosed for providing thread specific protection levels in a multithreaded processing environment. An associated method includes generating a group of threads in a process, one of the group of threads opening a thread entity, and that one of the group of threads specifying one or more levels of access to the thread entity for the other threads. In one embodiment, when a first of the threads attempts to perform a specified operation on the thread entity, the method includes determining whether that first thread is the one of the group of threads that opened the thread entity. When the first thread is not that one of the group of threads, the first thread is allowed to perform the specified operation if and only if such operation is permitted by the specified one or more levels of access.

Claims

exact text as granted — not AI-modified
1 . A method comprising:
 generating a group of threads in a process;   opening a thread entity for a first thread among the group of threads, wherein the thread entity is one of a file descriptor and a socket descriptor; and   specifying, in agreement with an associated open mode privilege, one or more levels of access to the thread entity for all other threads among the group of threads.   
     
     
         2 . The method of  claim 1 , further comprising:
 upon determining that the first thread is attempting to perform a specified operation on the thread entity, allowing the first thread to perform the specified operation.   
     
     
         3 . (canceled) 
     
     
         4 . The method of  claim 2 , further comprising:
 upon determining that a second thread among the group of threads is attempting to perform the specified operation, determining whether the specified operation is allowed by the specified one or more levels of access; and   upon determining that the specified operation is allowed by the specified one or more levels of access, allowing the second thread to perform the specified operation.   
     
     
         5 . The method of  claim 1 , wherein each thread among the group of threads has a respective thread identifier (ID), and wherein the method further comprises storing in a table the thread ID of the first thread. 
     
     
         6 . The method of  claim 5 , further comprising:
 upon determining that a certain thread among the group of threads is attempting to perform a specified operation on the thread entity, determining whether the thread ID of the certain thread matches the thread ID of the first thread stored in the table; and   upon determining that the thread ID of the certain thread matches the thread ID of the first thread, allowing the certain thread to perform the specified operation.   
     
     
         7 . (canceled) 
     
     
         8 . The method of  claim 6 , further comprising:
 upon determining that the thread ID of the certain thread does not match the thread ID of the first thread, determining whether the specified operation is allowed by the specified one or more levels of access; and   upon determining that the specified operation is allowed by the specified one or more levels of access, allowing the certain thread to perform the specified operation.   
     
     
         9 . The method of  claim 1 , wherein the one or more levels of access are selected from a group comprising a first level that permits read only access to the thread entity and a second level that permits write only access to the thread entity. 
     
     
         10 . The method of  claim 1 , wherein the one or more levels of access include a level that prohibits access to the thread entity. 
     
     
         11 . The method of  claim 1 , wherein the one or more levels of access include a level defined to allow read and write access to the thread entity but to prohibit closure of the thread entity. 
     
     
         12 . A system comprising:
 a processor; and   a memory storing a program, which, when executed on the processor, performs an operation comprising:   generating a group of threads in a process;   opening a thread entity for a first thread among the group of threads, wherein the thread entity is one of a file descriptor and a socket descriptor; and   specifying, in agreement with an associated open mode privilege, one or more levels of access to the thread entity for all other threads among the group of threads.   
     
     
         13 . The system of  claim 12 , wherein the operation further comprises:
 upon determining that the first thread is attempting to perform a specified operation on the thread entity, allowing the first thread to perform the specified operation.   
     
     
         14 . (canceled) 
     
     
         15 . The system of  claim 13 , wherein the operation further comprises:
 upon determining that a second thread among the group of threads is attempting to perform the specified operation, determining whether the specified operation is allowed by the specified one or more levels of access; and   upon determining that the specified operation is allowed by the specified one or more levels of access, allowing the second thread to perform the specified operation.   
     
     
         16 . The system of  claim 12 , wherein each of the group of threads has a respective thread identifier (ID), and wherein the operation further comprises storing in a table the thread ID of the first thread. 
     
     
         17 . The system of  claim 12 , wherein the one or more levels of access include a level defined to allow read and write access to the thread entity but to prohibit closure of the thread entity. 
     
     
         18 . A computer program product comprising a non-transitory computer usable medium having computer usable program code embodied therewith, the computer usable program code configured for:
 generating a group of threads in a process;   opening a thread entity for a first thread among the group of threads, wherein the thread entity is one of a file descriptor and a socket descriptor; and   specifying, in agreement with an associated open mode privilege, one or more levels of access to the thread entity for all other threads among the group of threads.   
     
     
         19 . The computer program product of  claim 18 , wherein the computer usable program code is further configured for:
 upon determining that the first thread is attempting to perform a specified operation on the thread entity, allowing the first thread to perform the specified operation.   
     
     
         20 . The computer program product of  claim 18 , wherein each of the group of threads has a respective thread identifier (ID), and wherein the computer usable program code is further configured for storing in a table the thread ID of the first thread. 
     
     
         21 . The computer program product of  claim 20 , wherein the computer usable program code is further configured for:
 upon determining that a certain thread among the group of threads is attempting to perform a specified operation on the thread entity, determining whether the thread ID of the certain thread matches the thread ID of the first thread stored in the table; and   upon determining that the thread ID of the certain thread matches the thread ID of the first thread, allowing the certain thread to perform the specified operation.   
     
     
         22 . The computer program product of  claim 21 , wherein the computer usable program code is further configured for:
 upon determining that the thread ID of the certain thread does not match the thread ID of the first thread, determining whether the specified operation is allowed by the specified one or more levels of access; and   upon determining that the specified operation is allowed by the specified one or more levels of access, allowing the certain thread to perform the specified operation.   
     
     
         23 . The computer program product of  claim 18 , wherein the one or more levels of access include a level defined to allow read and write access to the thread entity but to prohibit closure of the thread entity.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.