# US 6,732,211 B1 · Intercepting I/O multiplexing operations involving cross-domain file descriptor sets

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 6,732,211 B1
- Document ID: US6732211B1
- Status: Granted
- Kind: B1
- Application number: 09/664,914
- Filed: 2000-09-18
- Granted: 2004-05-04
- Earliest claimed: 2000-09-18
- Assignees: Ensim Corporation
- Inventors: Pawan Goyal; Snorri Gylfason; Xun Wilson Huang; Srinivasan Keshav; Rosen Sharma
- Web page: https://patentgrep.com/patent/US6732211B1

## CPC

- G06F 9/468: {Specific access rights for resources, e.g. using capability register}
- G06F 9/545: {where tasks reside in different layers, e.g. user- and kernel-space}
- G06F 2209/542: Intercept
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An I/O multiplexing operation involving a cross-domain file descriptor set is intercepted. The cross-domain set is divided into a first subset corresponding to a first file type and a second subset corresponding to a second file type. System calls are initiated in parallel for performing separate I/O multiplexing operations on the first and second subsets of file descriptors. In response to one of the parallel system calls identifying at least one file descriptor ready for communication, the other parallel system call is unblocked. Sets of file descriptors identified as ready for communication by the parallel system calls are combined and returned to a calling process.

## Claims

### Claim 1

A method in a computer system for executing I/O multiplexing operations comprising:
intercepting a system call for performing an I/O multiplexing operation on a set of file descriptors;
initiating system calls in parallel for performing separate I/O multiplexing operations on a first subset and a second subset of the set of file descriptors;
in response to one of the parallel system calls identifying at least one file descriptor ready for communication, unblocking the other parallel system call; and
returning to a calling process an indication of the at least one file descriptor.

### Claim 2 (depends on 1)

The method of claim 1, wherein initiating system calls comprises:
dividing the set of file descriptors into a first subset corresponding to a first file type and a second subset corresponding to a second file type.

### Claim 3 (depends on 2)

The method of claim 2, wherein one of the file types identifies a communication channel.

### Claim 4 (depends on 3)

The method of claim 3, wherein one of the file types identifies a file stored on media.

### Claim 5 (depends on 4)

The method of claim 4, wherein one of the file types identifies a hardware device.

### Claim 6 (depends on 1)

The method of claim 1, wherein intercepting a system call comprises:
loading a system call wrapper into an operating system;
saving a pointer to the system call; and
replacing the pointer to the system call with a pointer to the system call wrapper.

### Claim 7 (depends on 6)

The method of claim 6, wherein the pointer to the system call comprises an interrupt vector.

### Claim 8 (depends on 1)

The method of claim 1, wherein dividing the set of file descriptors comprises:
disambiguating the set of file descriptors according to file type.

### Claim 9 (depends on 8)

The method of claim 8, wherein an association data structure stores associations between file descriptors and file types, and wherein disambiguating the set of file descriptors comprises:
identifying, for each file descriptor, a file type from an association therewith in the association data structure.

### Claim 10 (depends on 8)

The method of claim 8, wherein disambiguating the set of file descriptors comprises:
intercepting system calls that establish a file descriptor; and
storing an association between an established file descriptor and a file type.

### Claim 11 (depends on 1)

The method of claim 1, wherein initiating system calls comprises:
executing a first system call using a first process, the first system call for initiating an I/O multiplexing operation on the first subset of file descriptors; and
executing a second system call using a second process, the second system call for initiating an I/O multiplexing operation on the second subset of file descriptors.

### Claim 12 (depends on 11)

The method of claim 11, wherein initiating system calls further comprises:
establishing a connection between the first and second processes.

### Claim 13 (depends on 12)

The method of claim 12, wherein establishing a connection comprises:
opening a communication channel between the first and second processes, the communication channel identified by a virtual file descriptor.

### Claim 14 (depends on 13)

The method of claim 13, wherein initiating system calls further comprises:
adding the virtual file descriptor to the first and second subsets of file descriptors.

### Claim 15 (depends on 14)

The method of claim 14, wherein unblocking the other parallel system call comprises:
performing a read operation using the virtual file descriptor.

### Claim 16 (depends on 14)

The method of claim 14, wherein unblocking the other parallel system call comprises:
performing a write operation using the virtual file descriptor.

### Claim 17 (depends on 1)

The method of claim 1, wherein returning to a calling process comprises:
returning to a calling process an indication of at least one file descriptor identified by the other parallel system call as ready for communication.

### Claim 18

An method in a computer system for executing I/O multiplexing operations comprising:
intercepting a system call by a system call wrapper, the system call for performing an I/O multiplexing operation on a set of file descriptors;
establishing a connection between the system call wrapper and a functional module;
dividing the set of file descriptors into a first subset corresponding to a first file type and a second subset corresponding to a second file type;
initiating a first system call by the system call wrapper for performing an I/O multiplexing operation on the first subset of file descriptors;
initiating in parallel a second system call by the functional module for performing an I/O multiplexing operation on the second subset of file descriptors;
combining sets of file descriptors identified by the first and second system calls as ready for communication into a third subset; and
returning to a calling process the third subset of file descriptors.

### Claim 19 (depends on 18)

The method of claim 18, further comprising:
in response to the first system call identifying at least one file descriptor ready for communication, unblocking the second system call.

### Claim 20 (depends on 19)

The method of claim 19, wherein unblocking the second system call comprises:
performing an I/O operation via the connection.

### Claim 21

A computer program product for executing I/O multiplexing operations comprising:
program code for intercepting a system call for performing an I/O multiplexing operation on a set of file descriptors;
program code for initiating system calls in parallel for performing separate I/O multiplexing operations on a first subset and a second subset of the set of file descriptors;
program code for, in response to one of the parallel system calls identifying at least one file descriptor ready for communication, unblocking the other parallel system call; and
program code for returning to a calling process an indication of the at least one file descriptor.

### Claim 22 (depends on 21)

The computer program product of claim 21, wherein program code for initiating system calls comprises:
program code for dividing the set of file descriptors into a first subset corresponding to a first file type and a second subset corresponding to a second file type.

### Claim 23 (depends on 22)

The computer program product of claim 22, wherein one of the file types identifies a communication channel.

### Claim 24 (depends on 23)

The computer program product of claim 23, wherein one of the file types identifies a file stored on media.

### Claim 25 (depends on 24)

The computer program product of claim 24, wherein one of the file types identifies a hardware device.

### Claim 26 (depends on 21)

The computer program product of claim 21, wherein program code for intercepting a system call comprises:
program code for loading a system call wrapper into an operating system;
program code for saving a pointer to the system call; and
program code for replacing the pointer to the system call with a pointer to the system call wrapper.

### Claim 27 (depends on 26)

The computer program product of claim 26, wherein the pointer to the system call comprises an interrupt vector.

### Claim 28 (depends on 21)

The computer program product of claim 21, wherein program code for dividing the set of file descriptors comprises:
program code for disambiguating the set of file descriptors according to file type.

### Claim 29 (depends on 28)

The computer program product of claim 28, wherein an association data structure stores associations between file descriptors and file types, and wherein program code for disambiguating the set of file descriptors comprises:
program code for identifying, for each file descriptor, a file type from an association therewith in the association data structure.

### Claim 30 (depends on 28)

The computer program product of claim 28, wherein program code for disambiguating the set of file descriptors comprises:
program code for intercepting system calls that establish a file descriptor; and program code for storing an association between an established file descriptor and a file type.

### Claim 31 (depends on 21)

The computer program product of claim 21, wherein program code for initiating system calls comprises:
program code for executing a first system call using a first process, the first system call for initiating an I/O multiplexing operation on the first subset of file descriptors; and
program code for executing a second system call using a second process, the second system call for initiating an I/O multiplexing operation on the second subset of file descriptors.

### Claim 32 (depends on 31)

The computer program product of claim 31, wherein program code for initiating system calls further comprises:
program code for establishing a connection between the first and second processes.

### Claim 33 (depends on 32)

The computer program product of claim 32, wherein program code for establishing a connection comprises:
program code for opening a communication channel between the first and second processes, the communication channel identified by a virtual file descriptor.

### Claim 34 (depends on 33)

The computer program product of claim 33, wherein program code for initiating system calls further comprises:
program code for adding the virtual file descriptor to the first and second subsets of file descriptors.

### Claim 35 (depends on 34)

The computer program product of claim 34, wherein program code for unblocking the other parallel system call comprises:
program code for performing a read operation using the virtual file descriptor.

### Claim 36 (depends on 34)

The computer program product of claim 34, wherein program code for unblocking the other parallel system call comprises:
program code for performing a write operation using the virtual file descriptor.

### Claim 37 (depends on 21)

The computer program product of claim 21, wherein program code for returning to a calling process comprises:
program code for returning to a calling process an indication of at least one file descriptor identified by the other parallel system call as ready for communication.

### Claim 38

An computer program product for executing I/O multiplexing operations comprising:
program code for intercepting a system call by a system call wrapper, the system call for performing an I/O multiplexing operation on a set of file descriptors;
program code for establishing a connection between the system call wrapper and a functional module;
program code for dividing the set of file descriptors into a first subset corresponding to a first file type and a second subset corresponding to a second file type;
program code for initiating a first system call by the system call wrapper for performing an I/O multiplexing operation on the first subset of file descriptors;
program code for initiating in parallel a second system call by the functional module for performing an I/O multiplexing operation on the second subset of file descriptors;
program code for combining sets of file descriptors identified by the first and second system calls as ready for communication into a third subset; and
program code for returning to a calling process the third subset of file descriptors.

### Claim 39 (depends on 38)

The computer program product of claim 38, further comprising:
program code for, in response to the first system call identifying at least one file descriptor ready for communication, unblocking the second system call.

### Claim 40 (depends on 39)

The computer program product of claim 39, wherein program code for unblocking the second system call comprises:
program code for performing an I/O operation via the connection.

### Claim 41

A system for executing I/O multiplexing operations comprising:
a system call wrapper configured to intercept a system call for performing an I/O multiplexing operation on a set of file descriptors and to initiate a first system call for performing an I/O multiplexing operation on a first subset of the set of file descriptors; and
a functional module, in communication with the system call wrapper, configured to initiate in parallel a second system call for performing a separate I/O multiplexing operation on a second subset of the set of file descriptors.

### Claim 42 (depends on 41)

The system of claim 41, wherein at least one of the file types is selected from the group consisting of a file stored on media, a communication channel, and a hardware device.

### Claim 43 (depends on 41)

The system of claim 41, wherein the system call wrapper and the functional module comprise separate processes.

### Claim 44 (depends on 41)

The system of claim 41, wherein a private connection links the system call wrapper and the functional module, the private connection being identified by a virtual file descriptor.

### Claim 45 (depends on 44)

The system of claim 44, wherein the first and second subsets of file descriptors include the virtual file descriptor.
