Kernel-User Shared Locks Bypass System Calls
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current operating system platforms face performance bottlenecks due to the need for system calls when user threads attempt to lock and unlock shared resources with the kernel, which is detrimental in high-performance systems like real-time routers.
Innovation Solution
Implementing kernel-user shared locks that allow user applications to directly lock and unlock shared memory blocks without using system calls, enabling direct synchronization between user and kernel spaces, thereby reducing communication overhead.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If system calls are used for user threads to lock and unlock shared resources with the kernel, then resource protection and synchronization are ensured, but system performance deteriorates due to communication overhead
Solution Approach 1:
The patent segments the locking mechanism into two parts: a fast path in user space for lock acquisition/release operations, and a kernel space component for privilege management and synchronization. This segmentation allows most lock operations to bypass system calls, improving performance while maintaining resource protection through the kernel's supervisory role.
Solution Approach 2:
The patent introduces shared lock data structures that reside in kernel space but are directly accessible to user space through controlled memory access. These intermediary structures enable user threads to perform lock operations without traditional system calls, reducing communication overhead while maintaining kernel-level resource protection.
2Reliability
If system calls are used for synchronization between user and kernel spaces, then resource access control is maintained, but communication overhead increases
Solution Approach 1:
The patent extracts the lock operation logic from the kernel space and places it in user space, allowing user threads to perform lock acquisitions and releases without invoking system calls. The kernel retains access control authority through shared data structures, eliminating the need for repeated context switches and system call overhead.
Solution Approach 2:
User space applications are empowered to manage their own lock state through direct access to shared lock data structures. This self-service approach allows applications to handle synchronization autonomously without kernel intervention for each lock operation, significantly reducing communication overhead while maintaining access control through the shared structure's design.
Data Source
AI summary
An apparatus comprising one or more processors configured to implement a plurality of operations for an operating system (OS) platform including a kernel and a user application, one or more shared resource blocks by the kernel and the user application, and one or more shared locks by the kernel and the user application corresponding to the shared resource blocks, wherein the user application is configured to synchronize accesses to the shared resource blocks between a user thread and a kernel thread by directly accessing the locks without using a system call to the kernel.


