Batch System Call Execution Reducing Trap Overhead

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The existing method of executing system calls individually using trap instructions leads to performance degradation due to CPU slowdowns, cache invalidations, and frequent interruptions, especially for processes requiring multiple system calls.

Innovation Solution

Implementing batch execution of system calls by allocating a single system call number that points to a memory buffer containing multiple syscall units, allowing the kernel to execute multiple system calls in a single trap period and providing a result table for each syscall, enabling the application to understand the results after execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If system calls are executed individually using trap instructions, then each system call can be processed with standardized interfaces, but CPU performance degrades due to frequent trap instructions causing slowdowns, cache invalidations, and interruptions

Engineering Contradiction:
Improvesystem call interface standardizationVSAvoidapplication execution speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

Multiple individual system calls are merged into a single batched system call execution. The patent combines multiple syscall requests into one trap instruction sequence, allowing the kernel to process multiple syscalls atomically without requiring separate trap instructions for each syscall, thereby reducing CPU overhead and improving execution speed while maintaining interface standardization

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

System call arguments and data are prepared in advance in a buffer structure before the trap instruction is executed. The patent uses a pre-defined buffer layout that contains multiple syscall units with their arguments already organized, allowing the kernel to efficiently process multiple syscalls without repeated argument validation and setup during execution

Inventive Principle:
Principle #10Preliminary action

2Reliability

If multiple system calls are executed individually, then each syscall can be handled with proper error handling and context switching, but the number of trap instructions increases significantly, causing performance degradation

Engineering Contradiction:
Improveerror handling capabilityVSAvoidtime spent in trap instructions
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

Multiple system calls that would individually require separate trap instructions are combined into a single batched execution. The patent implements a buffer containing multiple syscall units that are all processed within one trap period, reducing the time lost to trap instruction overhead while maintaining individual error handling capabilities for each syscall unit through result tables

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The batched system call execution enables continuous processing of multiple syscalls without the interruptions and context switches that would occur with individual executions. The patent maintains continuous kernel execution flow by processing multiple syscall units in sequence within a single trap handler invocation, minimizing disruptive context switches

Inventive Principle:
Principle #20Continuity of useful action

3Reliability

If trap instructions are used for each system call, then proper privilege mode switching and context saving occur, but caches are flushed and instruction caches are invalidated, creating performance bottlenecks

Engineering Contradiction:
Improveprivilege mode switchingVSAvoidprogram execution optimization
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

Multiple privilege mode switches are merged into a single transition. The patent allows the kernel to remain in privileged mode and process multiple syscall units sequentially after a single trap-induced mode switch, avoiding repeated cache flushes and instruction cache invalidations that would occur with individual trap instructions for each syscall

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS9038075B2Batch execution of system calls in an operating system
Publication Date: 2015.05.19 RED HAT INC
  • US9038075B2 patent drawing
  • US9038075B2 patent drawing
  • US9038075B2 patent drawing

AI summary

A system and a method are disclosed for batch execution of system calls in an operating system. In one implementation, a processing device configures a system call batching buffer table in a user space of an operating system, the system call batching buffer table including a plurality of system call units, associates a system call number with the system call batching buffer table, and issues a trap instruction to a kernel of the operating system to execute at least one of the plurality of system call units, the trap instruction including the system call number.