Kernel File System Management via User Space Handler
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional file system management leads to deadlocks when multiple processes wait for each other to release resources, causing a stalemate where neither process proceeds.
Innovation Solution
The kernel invokes a user space file handler to perform actions without setting resource locks, using a timeout mechanism to ensure file operations are completed before allocating resources, and employs i-node flag bits to identify special file handling operations, allowing for flexible and deadlock-free file operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If resource locks are set in kernel space to ensure file operation safety, then resource protection is improved, but deadlock risk increases when multiple processes wait for each other
Solution Approach 1:
The patent introduces a user-space file handler as an intermediary between the kernel and file operations. When a file operation is requested, the kernel sets a flag bit and invokes the user-space handler to perform the actual operation. This mediator approach allows flexible file handling in user space without requiring kernel-space resource locks, thereby preventing deadlocks while maintaining resource protection through the flag bit mechanism.
Solution Approach 2:
The patent segments the file operation handling into two distinct parts: kernel-space responsibility for setting flag bits and resource management, and user-space responsibility for performing actual file operations through file handlers. This segmentation allows the kernel to avoid setting resource locks while still ensuring proper resource management, thus eliminating deadlock conditions while maintaining reliability.
2Adaptability or versatility
If user space handlers are invoked to perform file operations, then flexibility and deadlock prevention are improved, but additional I/O operations and processing overhead are introduced
Solution Approach 1:
The patent implements preliminary action by setting a flag bit in the i-node information before invoking the user-space file handler. This flag bit serves as a pre-signal that prepares the system for the upcoming file operation, allowing the user-space handler to know exactly what action to perform without requiring complex kernel-space setup. This preliminary flag setting simplifies the overall process despite the added user-space invocation.
3Productivity
If resource locks are not set during user space handler invocation, then deadlock is prevented, but resource protection during operation may be compromised
Solution Approach 1:
The patent implements a feedback mechanism where the user-space file handler notifies the kernel when the file operation has been completed. The kernel monitors this notification and only allows subsequent file operations after receiving confirmation that the previous operation is complete. This feedback loop ensures resource protection without requiring resource locks during the operation, thus preventing deadlocks while maintaining reliability.
Data Source
AI summary
Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for file system management. In one aspect, a method includes receiving a request at a kernel to perform a file operation on a particular file; identifying a flag bit associated with the file; invoking user space file handler to perform particular action when the flag bit is set; determining whether notification that action has been performed by file handler is received; and allowing the file operation on the file when notification is received.


