Thread-Specific Protection Levels for Multithreaded Entity Safety
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In multithreaded environments, there is no known solution to prevent threads from inadvertently closing or corrupting file/socket descriptors opened by other threads, as all threads share the same global thread entities.
Innovation Solution
Implementing thread-specific protection levels (TEPL) that allow threads to specify access permissions for thread entities, such as read-only, write-only, read/write, or no access, which can be set at the time of entity creation or later through system calls, ensuring that only permitted threads can perform operations on the entities.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If all threads share the same global thread entities, then thread communication and resource sharing are simplified, but thread safety and data integrity are compromised
Solution Approach 1:
The patent segments the global thread entity access rights by introducing thread-specific protection levels (TEPL) associated with each thread entity. This allows different threads to have different access permissions (read-only, write-only, read-write, or no access) while still sharing the same underlying entity, thus resolving the contradiction between ease of access and thread safety.
Solution Approach 2:
The patent applies local quality by making protection levels thread-specific rather than global. Each thread can have its own protection level assigned when opening a thread entity, allowing fine-grained control over access rights for each thread individually while maintaining the shared nature of the entity across all threads.
2Adaptability or versatility
If threads can freely access thread entities, then operational flexibility is improved, but unintended closure and corruption risks increase
Solution Approach 1:
The patent applies preliminary anti-action by pre-establishing protection levels that prevent harmful operations before they can occur. When a thread opens an entity, it can specify protection levels that preemptively block other threads from performing certain operations (like closure or modification), thus preventing unintended closure and corruption before they happen.
Solution Approach 2:
The patent implements preliminary action by requiring threads to specify protection levels at the time of entity opening. This advance specification of access rights establishes the framework for controlled access before any operations occur, allowing the system to prevent harmful actions based on pre-set rules rather than reacting to them afterward.
3Reliability
If protection levels are added to thread entities, then thread safety is improved, but system complexity increases
Solution Approach 1:
The patent applies universality by designing protection levels as a multi-functional mechanism that handles multiple concerns simultaneously: access control, data integrity protection, and thread safety. By combining these functions into a single TEPL framework, the patent reduces the need for separate complex mechanisms for each function, thus managing overall system complexity.
Solution Approach 2:
The patent uses parameter changes by introducing protection levels as a new parameter in the thread entity opening operation. Instead of fundamentally redesigning the threading model, the patent adds this new parameter (TEPL) that modifies existing behavior, allowing protection to be implemented through parameter modification rather than structural complexity.
Data Source
AI summary
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 of this invention determines 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.


