Kernel File Descriptor Caching for Seamless Process Upgrades

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional process upgrading in Unix/Linux systems often results in communication interruptions and significant turbulence, particularly for protocols like BGP, due to the need for connection reestablishment and data retransmission, which complicates system performance and is not applicable to all communication protocols.

Innovation Solution

A method and apparatus that utilize a kernel-based connection holding and FD caching mechanism to maintain communication connections without interruption, allowing a new process to inherit and restore existing connections from an old process, using a connection holding interface, FD obtaining interface, and releasing interface, thereby enabling seamless process upgrade or restart.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional process upgrading is performed in Unix/Linux systems, then the process can be restarted with updated services, but communication connections are interrupted and data retransmission is required

Engineering Contradiction:
Improvecommunication connection continuityVSAvoidconnection reestablishment time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by having the old process call a connection holding interface before exiting, which pre-registers the file objects with the kernel. This allows the new process to quickly obtain these registered file objects without going through the usual connection reestablishment process, thereby maintaining connection continuity and reducing time loss during process upgrading.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary mechanism in the kernel that acts as a mediator between the old and new processes. The kernel maintains a mapping relationship between file descriptors and file objects, allowing the new process to obtain file objects through an FD obtaining interface without direct interaction with the old process. This intermediary mechanism ensures seamless connection transfer during process upgrading.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If conventional process upgrading is performed, then process updates can be applied, but system turbulence and performance impact increase due to connection reestablishment

Engineering Contradiction:
Improveservice update efficiencyVSAvoidsystem turbulence during upgrade
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent extracts the connection holding and transfer mechanism from the conventional process upgrading procedure. By separating the connection management functionality into dedicated interfaces (connection holding interface, FD obtaining interface, releasing interface) and implementing it at the kernel level, the system reduces the complexity and turbulence associated with process upgrading while maintaining service update efficiency.

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If TCP NSR technique is used to implement process upgrading without connection interruption, then connection continuity is maintained, but the solution becomes complicated and requires backup of large amounts of data

Engineering Contradiction:
Improveconnection continuity during upgradeVSAvoidcomplexity of upgrade mechanism
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent uses a copying mechanism where the new process obtains file objects that are copies or references to the original file objects held by the old process. The kernel creates a mapping relationship that allows the new process to use the same underlying file objects without needing to backup large amounts of data, thereby maintaining connection continuity while reducing complexity compared to TCP NSR.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent changes the parameter of connection management by transitioning from a protocol-specific approach (TCP NSR) to a file descriptor-based approach that works at a lower level. By changing how connections are managed—from application-layer TCP connections to kernel-level file objects—the system achieves connection continuity with a simpler, more general mechanism that can be applied to various communication protocols.

Inventive Principle:
Principle #35Parameter changes

4Reliability

If TCP NSR technique is used for process upgrading, then connection interruption is avoided, but the solution is not applicable to all communication protocols

Engineering Contradiction:
Improveconnection continuityVSAvoidapplicability to different protocols
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent implements a universal connection holding mechanism that works across different communication protocols. By operating at the file descriptor level in the kernel rather than at the application-layer TCP level, the mechanism becomes protocol-agnostic and can be applied to various communication protocols including but not limited to TCP, UDP, IPC, and netlink sockets, thereby improving adaptability while maintaining connection continuity.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS9864630B2Starting a process using file descriptors
Publication Date: 2018.01.09 HEWLETT PACKARD ENTERPRISE DEV LP
  • US9864630B2 patent drawing
  • US9864630B2 patent drawing
  • US9864630B2 patent drawing

AI summary

According to an example, a method includes: before a first process exits, a kernel receives a connection holding request carrying a File Descriptor (FD) transmitted by the first process, with respect to the FD carried by the connection holding request, the kernel increases a reference count of a file object corresponding to the FD and puts the file object into a cache, the kernel returns cache position information to the first process, such that the first process puts a corresponding relationship between the cache position information and identifier information of a communication connection pointed to by the FD in a predefined storage area; when a second process starts, the kernel receives an FD obtaining request carrying the cache position information transmitted by the second process, reads the file object from the cache, assigns a new FD to the file object and returns the new FD to the second process.