Method for enabling Linux kernel to support Socket reuse

A core, unchanged technology, applied in the direction of program control devices, etc., can solve problems such as time required, and achieve the effect of improving efficiency

Inactive Publication Date: 2011-06-29
INSIGMA TECHNOLOGY CO LTD
View PDF2 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In this way, the server needs to create a Socket when accepting the connection, and remove it after completing the service, both of which take time and constitute a burden on the CPU.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for enabling Linux kernel to support Socket reuse
  • Method for enabling Linux kernel to support Socket reuse
  • Method for enabling Linux kernel to support Socket reuse

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] Below in conjunction with accompanying drawing and embodiment the present invention will be further described:

[0021] attached figure 1 It is the process when the Linux system calls close() for a Socket. The application program calls the Linux system call close() with the file number representing the target Socket as a parameter, and then enters the function sys_close() in the kernel, first finds the file structure representing the target Socket according to the file number, and then starts from the process. Delete the entry corresponding to this file number in the open file table, so it is closed as a file, and this file number is also invalidated. At this time, the target Socket and the application program have just severed the relationship. Then, call the kernel function filp_close() with this file structure (actually its pointer, the same below) as a parameter; the latter further finds its inode structure in __fput(), and then calls its release function. Since ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a method for enabling a Linux kernel to support Socket reuse. The method comprises the following steps: (1.1) adding a new system call sock_reuse () for the Linux kernel, wherein the system call sock_reuse () has only one parameter which is the file number of a target Socket; (1.2) searching the file structure, the inode structure, the socket structure and the sock structure representing the target Socket according to the file number of the system call sock_reuse (); (1.3) disconnecting the target Socket from an opposite end according to the TCP (transmission control protocol) without closing and removing the target Socket, and setting the target Socket to the original state; and (1.4) keeping the file structure and the inode structure representing the target Socket constant in the process. The method provided by the invention can make the Linux kernel support the Socket reuse, which not only can improve the efficiency of a server but also can achieve the possibility of running a Windows server using the mechanism on the Linux.

Description

technical field [0001] The invention relates to the field of computer operating systems, in particular to a method for enabling the Linux kernel to support Socket reuse. Background technique [0002] The operating system is equivalent to the soul of the computer. Any computer is inseparable from the operating system, and is also limited by the operating system. All application software is based on a specific operating system and can only run on this specific operating system. If it runs on other operating systems, it cannot run. Therefore, Windows applications can only run on the Windows operating system, and Linux applications can only run on the Linux operating system. But if the Windows application software can be run directly on the Linux operating system, then the user may get rid of the dependence on the Windows operating system and switch to the Linux operating system, which is obviously very meaningful. [0003] The core of the operating system is called the "kerne...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44
Inventor 周立炜费海林毛德操
Owner INSIGMA TECHNOLOGY CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products