Font Size: a A A

Research On Optimization And Application Of TCP Socket In Embedded OS Kernel

Posted on:2022-12-28Degree:MasterType:Thesis
Country:ChinaCandidate:P H RenFull Text:PDF
GTID:2518306776994439Subject:Computer Software and Application of Computer
Abstract/Summary:PDF Full Text Request
With the development of embedded operating systems,more and more functions that need to be implemented in key areas such as avionics are applied in partitioned environments.Because the partition system is very complex,multiple application processes in the partition may need to perform data communication or information transmission at the same time.However,there are many problems in the traditional inter-process communication method.The efficiency of inter-process communication is not high,and the data needs to be accessed multiple times and the data transmission cannot exceed the maximum transmission amount.The use of the function interface provided by sockets for network data communication has been widely used in the research and development of network protocol stacks.Therefore,through the research and development process of a localized operating system,the focus is on the socket layer between the application layer and the transport layer in the network protocol stack,and then the optimized design and application of the kernel-mode TCP socket in a localized OS is realized,which ensures the localization of the operating system and improves the security protection capability of data communication.The main research work is as follows:(1)A method for optimizing function interfaces and virtualized SOCKET technology is proposed.Through the analysis of the overall framework of the domestic operating system,a method to optimize the design of the socket function interface of the domestic operating system is proposed,which lays a good foundation for the realization of inter-partition communication,while the problems of insufficient network cards and resource access conflicts caused by socket concurrency in the communication devices of multiple partitions are well solved by the virtualized socket technology,so that they network resources are shared,so this paper combines the above two ideas to optimize the socket design.(2)A method for optimizing the design of kernel-mode TCP sockets is proposed.Firstly,the socket structure in the traditional operating system was analyzed and optimized for use in a domestic operating system by combining its advantages and disadvantages.Meanwhile,communication between partitions can be accomplished through ports and the interconnection rules between communication ports are provided by channels,so attributes such as partition number and channel number were added to the socket structure so that the process of receiving and sending socket data between partitions can be designed.The optimization of the socket layer kernel mode function is realized by removing some redundant functions.For example,in the kernel-mode listen function,functions such as printing the debug value of the IP address are removed,which greatly reduces the amount of kernel code.(3)Implementation and Testing of TCP sockets.Firstly,a simple communication function test was carried out on the data transmission function of the optimized designed kernel-mode TCP socket in the Linux environment.After the test was successful,it was transplanted to a domestic embedded OS for testing,the test results show that the TCP socket can not only realize the normal data communication function,but also the socket communication in a domestic operating system has better performance in terms of low CPU utilization and high throughput compared with the traditional operating system.Then in the TCP socket communication process,in order to carry out real-time,separate data transmission and obtain timely response,a method of disabling the Nagle algorithm is proposed.At the same time,in order to utilize the available bandwidth as much as possible in the process of network data transmission,a method of adjusting the TCP notification window mechanism is proposed.Finally,the TCP socket is combined with the application layer FTP protocol to realize the function of uploading and downloading files.
Keywords/Search Tags:embedded operating system, kernel mode, TCP socket, protocol stack, communication mechanism
PDF Full Text Request
Related items