Kernel Swap Cap Enforcement for Virtual Memory Isolation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing virtualization approaches, such as SOLARIS Containers, lack effective mechanisms to manage virtual memory, leading to potential negative impacts on systems when one zone consumes all available swap space, affecting other zones and resources.
Innovation Solution
Implementing a swap cap resource control within the kernel to limit the maximum amount of swap space usable by each separate environment, ensuring that the kernel enforces this cap and returns an error when the limit is reached, thereby preventing runaway memory consumption and protecting other zones.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If zones share swap space without individual caps, then resource utilization is improved, but system reliability deteriorates when one zone consumes all swap space
Solution Approach 1:
The patent divides the shared swap space into individually capped portions for each zone. The kernel enforces per-zone swap caps while allowing zones to share the underlying swap devices. This segmentation prevents any single zone from consuming all swap space, maintaining system reliability while preserving shared resource utilization through the resource control framework.
2Reliability
If per-zone swap caps are enforced, then system reliability is improved, but device complexity increases due to kernel enforcement mechanisms
Solution Approach 1:
The patent implements swap cap enforcement by extending the existing resource control framework, which is a universal mechanism already used for controlling various system resources. By making the resource control framework multi-functional to include swap space management, the patent avoids creating a separate complex enforcement mechanism and leverages the existing kernel infrastructure for resource control.
3Ease of operation
If swap space is shared among zones, then ease of operation is improved, but loss of substance occurs when one zone exhausts swap space
Solution Approach 1:
The patent applies preliminary action by establishing per-zone swap caps before zones can consume swap space. These caps are configured in advance through the resource control framework, preventing any zone from exhausting the shared swap space. This proactive limitation ensures that swap space remains available for all zones while maintaining the simplicity of shared resource management.
Data Source
AI summary
A method of implementing virtualization involves an improved approach to virtual memory management. An operating system includes a kernel, a resource control framework, a virtual memory subsystem, and a virtualization subsystem. The virtualization subsystem is capable of creating separate environments that logically isolate applications from each other. The virtual memory subsystem utilizes swap space to manage a backing store for anonymous memory. The separate environments share physical resources including swap space. When a separate environment is configured, properties are defined. Configuring a separate environment may include specifying a swap cap that specifies a maximum amount of swap space usable by the separate environment. The resource control framework includes a swap cap resource control. The swap cap resource control is enforced by the kernel such that during operation of the separate environment, the kernel enforces the swap cap specified when the separate environment was configured.


