| The increasingly complex requirements have spawned more and more kinds of embedded systems,and to ensure system security,real-time performance,and low power consumption,and apply to some resource-constrained application scenarios,real-time operating systems and microkernel architectures came into being.When developing the operating system,it is hoped that the development habits of Linux can be taken into account so that developers can develop the system easily.And because Linux conforms to the POSIX standard,the microkernel operating system must also conform to the POSIX standard.The POSIX standard is a set of interface standards established to solve the problem of software portability.Mainstream operating systems such as Linux and Unix are POSIX compliant.The POSIX standard can be divided into POSIX.1 and POSIX.13,among which POSIX.1 is mainly oriented to desktops and servers,while POISX.13 is oriented to real-time systems,so the microkernel operating system chooses the POSIX.13 specification.For embedded real-time systems,the POSIX-PSE51 standard is a subset of the POSIX standard and the smallest subset.It does not require multiple processes(threads),which is in line with the concept of only threads in the microkernel,so what should be achieved is the POSIX-PSE51 standard.This thesis conducts deep research and analyzes the advantages and disadvantages of microkernel technology and monolithic kernel technology.It combines the system service design and specific circumstances of the mginkgo microkernel operating system.The study starts from the contents included in the POSIX-PSE51 standard and then analyzes the library functions’ compilation and linking process.Subsequently,investigates and implements performance optimization for library functions,aiming to complete the main tasks of developing a microkernel operating system that complies with the POSIX-PSE51 standard.This thesis focuses on the following three parts,the main contents of which include:1.In the POSIX standard,the library function structure design,specific implementation,and optimization measures used for the self-developed mginkgo microkernel operating system by the team are translated.It also includes dynamic library relocation techniques,signal processing techniques,and optimization of the space size of compiled libraries to improve the space performance of programs.2.Buffering techniques are described in terms of data structures,method implementations,principles,and processes.Additionally,pre-reading techniques and Huffman compression techniques are introduced to enhance the efficiency of the buffer.3.Security-related techniques such as ”canary” technology,boundary value,and checksum technology are adopted.These three techniques are integrated with multiple security technologies to enhance the security and reliability of the buffer.Furthermore,lock optimization techniques,including lock-free queues,RCU mechanisms,and segmented locks,are introduced to improve the system’s security and parallelism on top of the POSIX standard.Finally,the relevant functional tests and performance tests were conducted on the ARM Cortex-A7 So C development board.Through the study and analysis of the test results,it can be concluded that the microkernel operating system designed and implemented in this thesis meets the expected standards and fulfills the requirement of a microkernel operating system with the POSIX-PSE51 standard.This enhances the compatibility of the microkernel operating system and the portability of application programs. |