Session Data Access Control via Preemptive Task Switching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for managing data access in computing systems with multiple sessions either reduce processing speed or impose significant overhead, as they either limit sessions to one active session at a time or use reader/writer locks, leading to inefficiencies and data inconsistencies.
Innovation Solution
Implement a system that allows multiple sessions to run concurrently by using preemptive task switching and an access mark mechanism, where a 'data accessing session' can access data if the 'data owning session' is suspended, and delegates data access to the owner session when necessary, ensuring synchronization without excessive resource usage.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If cooperative task switching with a single active session is used to control data access, then data consistency is improved, but processing speed and system performance deteriorate
Solution Approach 1:
The system dynamically switches between cooperative task switching and preemptive task switching based on the state of the data owning session. When the data owning session is suspended, preemptive task switching allows other sessions to access data concurrently, improving processing speed while maintaining data consistency through the access mark mechanism.
Solution Approach 2:
The access mark acts as an intermediary mechanism between sessions. It allows the system to track whether a data owning session is suspended without requiring active locking, enabling other sessions to safely access data when the owner is suspended while avoiding conflicts when the owner is active.
2Reliability
If reader/writer locks are used to serialize data access, then data consistency is improved, but processing overhead increases and system efficiency deteriorates
Solution Approach 1:
The invention extracts the locking mechanism from the data access control process. Instead of using traditional reader/writer locks that require every session to create and manage lock objects, the system uses the suspension state of the data owning session as the control mechanism, eliminating unnecessary locking overhead for frequent access patterns.
Solution Approach 2:
The data owning session effectively serves itself by its suspension state indicating data access requirements. When suspended, it implicitly grants access to others without requiring explicit lock release actions, reducing the overhead of lock management while maintaining data consistency.
Data Source
AI summary
According to some embodiments, a method and apparatus for accessing session data includes identifying a data access request from a first process, the data access request for access to data associated with a second process, and determining, prior to allowing the first process to access the data, whether the second process is blocked.


