Method and system for optimizing file table usage
First Claim
1. A method for manipulating a file descriptor stored in a file table entry of a file table, the method comprising:
- transferring, by a processing unit, the file descriptor stored in the file table entry of the file table from the file table entry to a shared socket pair to store the file descriptor in the shared socket pair, thereby preserving the file descriptor in the shared socket pair while permitting availability of the unloaded file table entry of the file table for other uses;
transferring, by the processing unit, the file descriptor stored in the shared socket pair from the shared socket pair to an available file table entry if access to the file descriptor stored in the shared socket pair is requested;
storing file descriptors which reference a first socket pair within a file table associated with a dispatcher process to reduce a number of file descriptors simultaneously stored within the file table associated with the dispatcher process, wherein the first socket pair stores a plurality of file descriptors associated with an agent process, and wherein each of the plurality of file descriptors references a corresponding closed file within a context of the agent process; and
transferring the file descriptors which reference the first socket pair to the agent process via an IPC mechanism.
0 Assignments
0 Petitions
Accused Products
Abstract
An operating system directed to using special properties of a common inter-process communications mechanism (IPC), namely UNIX domain socket-pairs or stream-pipes alternatively as a storage medium for file-descriptors of UNIX processes. When a file-descriptor is written into a socket-pair, and closed in the UNIX process, the file remains open, but occupies no space in the process'"'"' file-table. The file-descriptor may later be read out of the socket-pair to reestablish it in the file-table, and access it. This property is implemented in an IPC mechanism of UNIX operating system whereby a process such as a dispatcher may manage more connections and processes than its file-table size allow. This provides scalability improvements of the UNIX operating system.
-
Citations
18 Claims
-
1. A method for manipulating a file descriptor stored in a file table entry of a file table, the method comprising:
-
transferring, by a processing unit, the file descriptor stored in the file table entry of the file table from the file table entry to a shared socket pair to store the file descriptor in the shared socket pair, thereby preserving the file descriptor in the shared socket pair while permitting availability of the unloaded file table entry of the file table for other uses; transferring, by the processing unit, the file descriptor stored in the shared socket pair from the shared socket pair to an available file table entry if access to the file descriptor stored in the shared socket pair is requested; storing file descriptors which reference a first socket pair within a file table associated with a dispatcher process to reduce a number of file descriptors simultaneously stored within the file table associated with the dispatcher process, wherein the first socket pair stores a plurality of file descriptors associated with an agent process, and wherein each of the plurality of file descriptors references a corresponding closed file within a context of the agent process; and transferring the file descriptors which reference the first socket pair to the agent process via an IPC mechanism. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A data processing system for manipulating a file descriptor stored in a file table entry of a file table, comprising:
-
a bus system; a storage device connected to the bus system, wherein the storage device includes a set of instructions; and a processing unit connected to the bus system, wherein the processing unit executes the set of instructions to; transfer the file descriptor stored in the file table entry of the file table from the file table entry to a shared socket pair to store the file descriptor in the shared socket pair, thereby preserving the file descriptor in the shared socket pair while permitting availability of the unloaded file table entry of the file table for other uses; transfer the file descriptor stored in the shared socket pair from the shared socket pair to an available file table entry if access to the file descriptor stored in the shared socket pair is requested; store file descriptors which reference a first socket pair within a file table associated with a dispatcher process to reduce a number of file descriptors simultaneously stored within the file table associated with the dispatcher process, wherein the first socket pair stores a plurality of file descriptors associated with an agent process, and wherein each of the plurality of file descriptors references a corresponding closed file within a context of the agent process; and transfer the file descriptors which reference the first socket pair to the agent process via an IPC mechanism.
-
-
11. A computer program product stored on a non-transitory computer readable medium having computer executable code embodied thereon for manipulating a file descriptor stored in a file table entry of a file table, the computer program product comprising:
-
code for transferring the file descriptor stored in the file table entry of the file table from the file table entry to a shared socket pair to store the file descriptor in the shared socket pair, thereby preserving the file descriptor in the shared socket pair while permitting availability of the unloaded file table entry of the file table for other uses; code for transferring the file descriptor stored in the shared socket pair from the shared socket pair to an available file table entry if access to the file descriptor stored in the shared socket pair is requested; code for storing file descriptors which reference a first socket pair within a file table associated with a dispatcher process to reduce a number of file descriptors simultaneously stored within the file table associated with the dispatcher process, wherein the first socket pair stores a plurality of file descriptors associated with an agent process, and wherein each of the plurality of file descriptors references a corresponding closed file within a context of the agent process; and code for transferring the file descriptors which reference the first socket pair to the agent process via an IPC mechanism. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18)
-
Specification