Method and system for isolating server-side resources of operating system under microkernel architecture
By introducing ServerContext and Capability mechanisms into the microkernel architecture, combined with memory marking technology, the problem of unclear application access to system service resources and insufficient isolation is solved, and strict isolation and security improvement of system services are achieved.
Patent Information
- Application Number
- CN202410631666.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-09-03
AI Technical Summary
In the microkernel architecture, applications lack effective security boundaries when accessing system services. As a result, different application data may be improperly shared or leaked on the system server. Furthermore, user-space system services lack a unified resource management mechanism, making it difficult to implement inter-application Service isolation.
By introducing the ServerContext kernel object and Capability mechanism, the execution environment of each thread is configured, and memory marking technology is used to ensure that operating system services are effectively isolated between different applications. ServerContext provides an independent isolated execution environment, the Capability table implements fine-grained permission management, and memory tags ensure that only authorized applications can access private memory.
It achieves strict isolation of system service resources, reduces the risk of data leakage caused by improper permission settings, improves system security and isolation, and prevents the behavior of one application from affecting another application.
Smart Images

Figure CN118585286A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of operating systems for computer systems, and in particular to a method and system for isolating operating system server resources under a microkernel architecture, and more particularly to a method for achieving strong isolation between applications and operating system service security under a microkernel architecture. Background Art
[0002] In modern computer systems, operating systems play an extremely important role. One of the core functions of operating systems is to ensure that system resources required for application operation are not only efficiently managed, but also that different applications are securely isolated. This demand has become increasingly urgent with the rapid development of technologies such as cloud computing, big data, and the Internet of Things, especially in ensuring data isolation and protecting sensitive information.
[0003] Macro kernel operating systems such as Linux are popular for their powerful functions and wide applications. The macro kernel integrates a large number of functions such as file systems, network protocol stacks, and device drivers into the kernel space. Although this design simplifies system calls and communication between modules, it also brings security and stability issues. On the one hand, the huge code base of the macro kernel increases the possibility of system vulnerabilities; on the other hand, once a kernel module has a problem, the stability of the entire system will be affected. This makes the basic application isolation mechanism provided by the macro kernel not fully trustworthy.
[0004] In the macro kernel architecture, once an application enters kernel state, it has access to the entire kernel address space. However, in most cases, the application only needs to access a small part of the address space when it is actually running. This fact inevitably increases the risk of kernel attacks. At the same time, the isolation mechanism between applications in the system service module in the macro kernel may also be destroyed. Specifically, an application can have unlimited access to the service status and other key data left by other applications in the kernel system module. To solve this problem, the Address Space Isolation (ASI) technology was proposed. The ASI technology unmaps the memory areas that are not immediately needed in the memory management unit (MMU), making these memory areas inaccessible to the running context, thereby preventing attackers from launching attacks on unmapped memory and effectively avoiding the risk of leaking memory contents through such attacks.
[0005] On the other hand, virtualization technology is also widely used to solve the isolation problem between applications. Through virtualization, multiple virtual machines can be run on the same hardware platform, and each virtual machine runs an independent operating system instance, thereby effectively isolating resources between different applications. In cloud computing and data center environments, virtualization technology plays a vital role. However, although users can obtain stronger security protection by using virtual machine isolation, they also sacrifice many advantages of the operating system. The performance overhead brought by virtualization, especially in I / O intensive applications, and the complex communication mechanism between virtual machines in virtual environments, increase the complexity of management and potential security risks.
[0006] In addition to the macro kernel architecture, the micro kernel architecture provides a different design. Its core concept is to improve the security and reliability of the system by minimizing the kernel function set. In a micro kernel operating system, most services, such as device drivers and file systems, exist in the form of user-mode processes, and only the most core functions, such as process scheduling and memory management, are retained in the kernel. Compared with the macro kernel, the micro kernel architecture effectively reduces the risk of system vulnerabilities by reducing the amount of code, thereby improving the maintainability and reliability of the system.
[0007] The system service module in the microkernel architecture runs independently on the microkernel in the form of a user-mode process, achieving decoupling between services. They interact with each other through the communication mechanism provided by the microkernel and provide service interfaces to applications. This design makes the system service module in the microkernel naturally have the characteristics of modular isolation. Different system services run in different processes, providing stronger isolation than the macro kernel.
[0008] However, the module isolation of the microkernel and the isolation between applications belong to two different isolation levels.
[0009] In the microkernel architecture, module isolation focuses on the isolation between the various system service modules within the operating system. In this architecture, the core functions of the operating system are minimized, including only the most basic management and scheduling functions. Other services run on the microkernel as user-mode processes. They interact through the communication mechanism provided by the microkernel and are independent of each other, thus achieving isolation between modules. The advantage of module isolation is that it can reduce the impact of a single module error or attack on the security and stability of the entire system.
[0010] Application isolation, on the other hand, focuses on the boundary between the operating system and the applications running on it. It aims to ensure that applications can only access resources that are explicitly authorized for them, and that the behavior of one application does not affect the operating environment of another application. In the microkernel architecture, although isolation is achieved between system service modules, the security boundary handling when applications access these services is a different issue. A system service process stores data from various applications, and the system service process can access this data arbitrarily. When multiple applications share a system service, an application can exploit vulnerabilities in the system service to damage or steal data from another application. Since system services usually have a large amount of code, it is difficult to ensure that they are implemented completely correctly. If the design of the system service fails to properly manage data access and permissions, it may cause application data stored on the system server to be improperly shared or leaked, and malicious applications may even have the opportunity to exploit this data.
[0011] Therefore, simply adopting a microkernel architecture cannot fundamentally solve the problem of insufficient isolation between applications. The key to isolating applications in a microkernel lies in the design of system services, which requires strict permission control and secure data access mechanisms. This work hopes to provide a mechanism that allows applications that share the same system services to be isolated from each other, thereby improving the security and fault tolerance of the system.
[0012] In microkernel operating systems, the Capability mechanism is a key technology for implementing permission management and access control. Different from the traditional permission management model based on Access Control Lists (ACLs), Capability provides each subject (usually a process or thread) in the system with a clear permission token, which clearly indicates the resources that the holder can access and the operations that can be performed on these resources.
[0013] A capability certificate is a data structure usually created and managed by the system kernel, which identifies a specific resource (such as a file, memory area, device) and the specific operation permissions (such as read, write, execute) on that resource. Capability certificates can be seen as a ticket-holding method, where only subjects with the correct certificate can access the corresponding resources. Through capability certificates, the system can accurately manage and restrict access to resources, ensuring that only explicitly authorized subjects can perform specific operations. This approach brings higher security because capabilities can be controlled at a fine-grained level and this control can be maintained during the delivery and delegation process.
[0014] Currently, the Capability mechanism in microkernel operating systems is mainly used at the kernel level to manage hardware resources or resources abstracted by the kernel. However, in user-mode system services, there is no unified mechanism to abstract the Capability of system service resources. This limitation makes it unclear for applications to access system service resources, and also makes it difficult for system services to effectively implement service isolation between different applications.
[0015] Memory tagging is a technology that improves security and data integrity by assigning "tags" to memory. In this technology, each memory block is associated with one or more tags that define the access rights and usage of the memory block. The main purpose of memory tagging is to enhance the security of memory, especially in multi-tasking, which can effectively isolate and protect memory data to prevent unauthorized access and data leakage.
[0016] Intel MPK (Memory Protection Keys) is a hardware feature that implements memory tagging, designed to improve the flexibility and performance of process memory management. MPK provides a mechanism that allows the operating system or application to quickly change the access rights of a certain memory area without modifying the page table. This is achieved by assigning "protection keys" to memory and controlling the access rights of these keys at the CPU level.
[0017] Each memory page can be associated with a protection key through its page table entry (PTE). These keys are small integers that represent different groups of access permissions. The CPU has a register called PKRU (Protection Key Rights for Userspace) that stores the protection key access permissions of the current thread. PKRU controls the read / write permissions of each protection key. Applications can quickly change the access permissions of specific memory regions by modifying PKRU without performing page table update operations.
[0018] Based on the shortcomings of the prior art, the technical problems to be solved by the present invention are summarized as follows:
[0019] In the microkernel architecture, although module isolation is achieved between system service modules, there is a lack of effective security boundaries when applications access services. The system service code is large and difficult to ensure accuracy, which may lead to improper sharing or leakage of different application data on the system server.
[0020] In the microkernel architecture, although there is a capability mechanism at the kernel level, the lack of a unified resource management mechanism in user-mode system services makes it difficult for system services to achieve effective service isolation between different applications. Summary of the invention
[0021] In view of the defects in the prior art, the object of the present invention is to provide an operating system server-side resource isolation method and system under a microkernel architecture.
[0022] According to the present invention, a method for isolating resources on a server side of an operating system under a microkernel architecture includes:
[0023] The application end initiates a service request to the kernel end; so that the kernel end forwards the service request to the operating system service end; so that the operating system service end processes the service request from the application;
[0024] The service request carries an execution request, information, and preset resources;
[0025] The kernel side configures the execution environment of the operating system service based on the service request initiated by the application side, ensuring that the operating system service can be effectively isolated between different application programs.
[0026] Preferably, at least one ServerContext kernel object is configured on the operating system server side, and an independent isolated execution environment is provided for different services through the ServerContext kernel object;
[0027] On the operating system server side, each thread runs in a corresponding ServerContext kernel object, and the memory and available Capabilities accessed by the thread are restricted by the ServerContext kernel object, and the available Capabilities are passed to the application side.
[0028] Preferably, when an application initiates an inter-process communication request, the inter-process communication request carries a Capability of a ServerContext, so that the kernel side indexes the actual ServerContext kernel object through the Capability, indicating the ServerContext used by the operating system server-side handler thread.
[0029] Preferably, each ServerContext is configured with a Capability table, and a Capability-based fine-grained permission management mechanism is implemented through the Capability table to control the application's access rights to objects in the operating system service; each ServerContext can only access objects indexed in its configured Capability table.
[0030] Preferably, the ServerContext also configures memory tag information, including: private memory tag and global memory tag;
[0031] When performing memory mapping, if the memory is mapped directly to the operating system service process, the global memory tag is used, corresponding to the global data area; when mapping memory in ServerContext, its private memory tag is used to ensure that only applications with the current ServerContext Capability can access the private memory.
[0032] Preferably, the interaction between the application end and the operating system server end is performed through inter-process communication; during the inter-process communication process, the kernel end executes the switching of ServerContext in the operating system server end according to the ServerContext Capability provided by the application end; and switches the data domain in the operating system server end by modifying the PKRU register.
[0033] According to the present invention, an operating system server-side resource isolation system under a microkernel architecture includes:
[0034] The application side is used to initiate service requests to the kernel side;
[0035] The kernel side is used to forward the service request to the operating system server side;
[0036] The operating system server is used to process service requests from applications;
[0037] The service request carries an execution request, information, and preset resources;
[0038] The kernel side configures the execution environment of the operating system service based on the service request initiated by the application side, ensuring that the operating system service can be effectively isolated between different application programs.
[0039] Preferably, at least one ServerContext kernel object is configured on the operating system server side, and an independent isolated execution environment is provided for different services through the ServerContext kernel object;
[0040] On the operating system server side, each thread runs in a corresponding ServerContext kernel object, and the memory and available capabilities accessed by the thread are restricted by the ServerContext kernel object, and the available capabilities are passed to the application side;
[0041] When an application initiates an inter-process communication request, the inter-process communication request carries a ServerContext Capability, so that the kernel side indexes the actual ServerContext kernel object through the Capability, indicating the ServerContext used by the operating system server-side handler thread;
[0042] Each of the ServerContexts is configured with a Capability table, through which a Capability-based fine-grained permission management mechanism is implemented to control the access rights of applications to objects in operating system services; each ServerContext can only access objects that have indexes in its configured Capability table.
[0043] Preferably, the ServerContext also configures memory tag information, including: private memory tag and global memory tag;
[0044] When performing memory mapping, if the memory is mapped directly to the operating system service process, the global memory tag is used, corresponding to the global data area; when mapping memory in ServerContext, its private memory tag is used to ensure that only applications with the current ServerContext Capability can access the private memory.
[0045] Preferably, the interaction between the application end and the operating system server end is performed through inter-process communication; during the inter-process communication process, the kernel end executes the switching of ServerContext in the operating system server end according to the ServerContext Capability provided by the application end; and switches the data domain in the operating system server end by modifying the PKRU register.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] 1. Aiming at the problem of ambiguity in application program access to system service resources and difficulty in achieving effective isolation in the existing microkernel architecture, the present invention provides an operating system server resource isolation method and system under a microkernel architecture, which improves the security and isolation of system services by introducing fine permission control based on the Capability mechanism and a secure data access isolation mechanism;
[0048] 2. The present invention ensures strict isolation of system service resources by introducing the ServerContext kernel object; this isolation is not limited to the runtime environment, but also extends to data access and permission management, thereby effectively preventing the behavior of one application from affecting another application on the system server side;
[0049] 3. The present invention implements the Capability mechanism in user-mode system services, and provides clear permission regulations for resource access in system services; this not only improves the accuracy of resource management, but also reduces the risk of data leakage caused by improper permission settings; at the same time, since system services usually contain a large amount of code, the possibility of errors is relatively high; the present invention significantly reduces security vulnerabilities caused by service design defects or implementation errors by restricting system services from accessing resources that they should not access and strictly controlling the data flow between services;
[0050] 4. The present invention combines memory tagging technology to manage memory data resources in system services and implement user-mode memory area access control. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0052] Figure 1 This is the architecture diagram of the operating system server-side resource isolation system under the microkernel architecture.
[0053] Figure 2 Basic flow chart for registering IPC connection for clients.
[0054] Figure 3 A basic flow chart for initiating an IPC request for a client. DETAILED DESCRIPTION
[0055] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0056] Example 1
[0057] According to the present invention, an operating system server-side resource isolation system under a microkernel architecture is provided, such as Figure 1As shown in the figure, it includes: kernel, operating system services and applications; the application acts as the initiator of the service request, and it provides the kernel with the necessary resources and information to execute the request. The role of the kernel is to forward the request to the corresponding system service provider, and configure the execution environment of the system service based on the information provided by the application to ensure that the system service can be effectively isolated between different applications. The operating system service is responsible for processing the service request from the application, and through the ServerContext, Capability mechanism and memory marking technology, it ensures that the isolation between applications is not destroyed.
[0058] The application provides the kernel with necessary resources. For example, the operating system server needs to obtain the capacity of some execution resources before it can execute, such as some user information maintained and saved by the application user. This information is stored in the memory. When initiating a request, the application needs to grant the cap of this part of the memory to the operating system server. It can also provide access to some other threads. For example, user thread A initiates a request to system service thread B, but may need to perform some operations on thread C or obtain information from thread C. At this time, A needs to grant B the ability to access C.
[0059] The core concept introduced in operating system services is ServerContext, a kernel object in the microkernel that represents a specific execution environment in the system service process. System services may contain multiple ServerContexts to provide independent isolated execution environments for different services. Within a system service, each thread must run in a ServerContext, which limits the memory and available capabilities that the thread can access. Different ServerContexts may represent different isolation domain abstractions, which are created by the system service as needed and pass their capabilities to the application. When the application initiates inter-process communication (IPC), the IPC request must carry a ServerContext capability, allowing the kernel to index the actual ServerContext object through the capability, indicating the ServerContext used by the system server handler thread. This mechanism ensures that system service requests from different applications use different ServerContexts, thereby ensuring the isolation of the execution environment.
[0060] Each ServerContext contains a Capability Table, which implements a Capability-based fine-grained permission management mechanism to control the application's access rights to objects in system services. Each ServerContext can only access objects that have indexes in the Capability Table. For example Figure 1 In the example, ServerContext1 has access only to Object0 and Object1, while ServerContext2 has access to Object1 and Object2.
[0061] In addition, ServerContext also stores memory tag information. Here we use MPK technology as an example to explain, but it can actually be replaced by any technology that implements memory tagging. Each ServerContext has an exclusive memory protection key (MPK). Each ServerContext corresponds to a private MPK, and the system service has a global MPK corresponding to global shared data. When performing memory mapping, if the memory is mapped directly to the system service process, the global MPK is used, corresponding to the global data area, which is accessible to all applications. When mapping memory in ServerContext, its private MPK is used to ensure that only applications with the current ServerContext Capability can access the private memory. Through this MPK mechanism, memory isolation is achieved.
[0062] The interaction between the application and the system service is carried out through IPC. During the IPC process, the kernel performs the ServerContext switch in the operating system service according to the ServerContext Capabi lity provided by the application. And the data domain in the system service is switched by modifying the PKRU register to ensure that when the service thread in the system service is activated, PKRU is set to the global MPK plus the private MPK of the current ServerContext.
[0063] The present invention also provides an operating system server-side resource isolation system under a microkernel architecture. The operating system server-side resource isolation system under the microkernel architecture can be implemented by executing the process steps of the operating system server-side resource isolation method under the microkernel architecture, that is, technical personnel in this field can understand the operating system server-side resource isolation method under the microkernel architecture as a preferred implementation mode of the operating system server-side resource isolation system under the microkernel architecture.
[0064] This embodiment introduces the newly defined kernel object ServerContext to switch the execution environment for different applications in the system service, and restricts the application's access to system service resources by controlling the Capacity Table and MPK, thereby achieving effective isolation for different applications in the system service. This ensures that when an application accesses a service, the data domains and accessible resources it can see are strictly controlled and isolated, thereby preventing the application data stored on the system server from being improperly shared or leaked.
[0065] Example 2
[0066] Embodiment 2 is a preferred embodiment of Embodiment 1
[0067] This embodiment introduces the interaction process between an application program and a system service in a specific scenario.
[0068] In a microkernel architecture, applications usually initiate service requests to system services through inter-process communication (IPC). Before initiating an IPC request, an IPC connection must first be established between the client and the server. This process involves the user calling the registration interface on the client to initialize communication. The following describes in detail the basic workflow of a typical IPC client thread registration, such as Figure 2 shown.
[0069] Step 1: The client calls the ipc_register_client interface, and its input parameter is the system service Cap number. At the same time, a shared memory is created as an information exchange buffer for the client and server to communicate after the IPC connection is successfully established.
[0070] Step 2: Traps into the kernel through system calls and passes the system service Cap number and the newly created shared memory Cap number to the kernel.
[0071] Step 3: The kernel indexes the requested system service through the system service Cap number provided by the client. The corresponding shared memory kernel object is indexed through the shared memory Cap number. After that, an IPC connection is created for the client and the server in the kernel. The main work is to create an IPC connection object and map the shared memory on the client, and record the mapping address in the IPC connection structure to prepare for shared memory access for subsequent IPC communication. After the IPC connection is created, the corresponding Cap number record is allocated on the client. Each subsequent IPC request from the client needs to carry the Cap number of this IPC connection before the corresponding system service request can be made. After that, the ServerContext kernel object is created, and a new private MPK is allocated to it, recorded in its structure, and the PKPU register is set. After the MPK configuration is completed, the registration thread logic is indexed through the registration function address recorded in the system service configuration structure. The thread switching function is called in the kernel, and the ServerContext Cap is used as a parameter to prepare to switch to the registration service thread of the system server.
[0072] Step 4: Switch to the registered service thread through the thread switching function sched_to_thread, and pass the ServerContext Cap number to the registered service thread.
[0073] Step 5: After the system service registration thread obtains the ServerContext Cap number, it performs basic initialization operations in the current ServerContext, including creating a main stack mapping, creating a service thread, obtaining its Cap number, and recording it in the Cap Table of ServerContext. At this point, the initialization of ServerContext and the system server thread is completed.
[0074] Step 6: After completing the registration and creation of the service thread, return to the kernel.
[0075] Step 7: After the service thread is created, the shared memory can be mapped in the service thread. After the mapping is completed, the mapping address is also recorded in the IPC connection structure to prepare for shared memory access for subsequent IPC communication. Set the PKPU register to restore the default state. Finally, set the IPC connection Cap and ServerContext Cap to the return value of the client thread, and prepare to switch back to the client registration service request thread.
[0076] Step 8: Switch to the client registration service request thread through the thread switching function sched_to_thread, and pass the IPC connection Cap number and ServerContext Cap number.
[0077] Step 9: The client thread obtains the IPC connection Cap number and ServerContext Cap number to complete the IPC client registration process.
[0078] After registration is completed, the kernel holds a new IPC connection object, which is the basis for communication between the client and the server. At the same time, the kernel will also generate a ServerContext kernel object, which is an independent environment for the service to run, ensuring the isolation and security of service operations. The ServerContext is also assigned a unique memory protection key (MPK) to control and isolate memory access, ensuring that only authorized operations can access related memory resources.
[0079] On the system server side, a new service thread is created, which is dedicated to processing requests from the client. The newly created service thread and ServerContext will index each other, so that the execution of the thread at any time is carried out in the security and isolation environment defined by the corresponding ServerContext.
[0080] On the client side of the application, after the registration process is completed, the client will obtain the Cap number of the newly created IPC connection object and the Cap number of the ServerContext. These two Cap numbers will be used for all subsequent IPC requests. In this way, the application can ensure that its requests are correctly sent to the corresponding service thread and processed in the designed isolation environment.
[0081] Next, we will introduce the basic process of an IPC request, such as Figure 3 shown.
[0082] Step 1: The client thread initiates an IPC request. The client thread holds the IPC connection Cap number and ServerContext Cap number returned after registration. Call the IPC request interface, the function interface is intsys_ipc_call (cap_t conn_cap, cap_t srvc_cap, struct ipc_msg*ipc_msg). Its input parameters are the IPC connection Cap number and ServerContext Cap number, as well as the IPC message to be transmitted. In the IPC message structure, not only data messages can be transmitted, but also the capabilities of various kernel resources, which means that the client can pass the capabilities required for its execution to the server through IPC.
[0083] Step 2: Traps into the kernel through system calls and passes the IPC connection Cap number, ServerContextCap number, and resource Capabi lity to the kernel.
[0084] Step 3: The kernel uses the IPC connection Cap number provided by the client to index the requested service thread. The corresponding ServerContext kernel object is indexed through the ServerContext Cap number, and its corresponding private MPK is found in the ServerContext object. After obtaining the MPK, the PKPU register is set so that the service thread's access to memory is restricted to its corresponding private domain. After completing the MPK configuration, configure the Cap Table of ServerContext. Write all the resource Capabilities passed in by the client into the Cap Table of ServerContext so that this ServerContext can obtain access rights to these resources and prepare for the execution of the service thread. After that, the thread switching function is called in the kernel, with the ServerContext Cap as a parameter, in preparation for switching to the service thread on the system server side.
[0085] Step 4: Switch to the service thread through the thread switching function thread_migrate_to_server, and pass the ServerContext Cap number to the service thread.
[0086] Step 5: After the system service thread obtains the ServerContext Cap number, it obtains the access rights of all record resources in the Cap Table of the current ServerContext and executes the processing logic. After completing the service execution, the ipc_return function is called and the execution status is returned to the kernel as a parameter.
[0087] Step 6: Return to the kernel, and the return parameter is the execution status result of the service thread.
[0088] Step 7: Get the execution status result in the kernel. Uninstall all client-provided resource capabilities in the ServerContext, so that it loses the ability to access the corresponding client resources. Switch the ServerContext of the system service to the default ServerContext, and reset the PKPU to the default state. Finally, set the execution status result as the return value of the client thread, and prepare to switch back to the client service request thread.
[0089] Step 8: Switch to the client thread through the thread switching function thread_migrate_to_server, and return the execution status result to the client thread.
[0090] Step 9: The client thread obtains the IPC request execution result and completes an IPC request process.
[0091] In the above process, it can be observed that the resources required for the execution of the service thread on the system server are mainly provided by the client thread. This design ensures that after the service execution is completed, the server's access rights to these resources are effectively revoked, achieving secure isolation of resources.
[0092] This mechanism not only ensures the security of resources, but also allows the client to save and manage its own resources. In this design concept, if necessary, the execution state can be used as a resource. The client keeps its own execution state on the server and passes it to the server through Capability and ServerContext at each service request. One advantage of this strategy is that even if the server fails (such as a system crash), the client still retains its own execution state. The server only needs to perform a simple restart to recover and continue execution based on the status information provided by the client. This reduces system recovery time and enhances service continuity.
[0093] Through the above specific IPC request examples, we can observe that the system achieves fine control and efficient management of service resources, ensuring a high degree of data security and isolation. At the same time, the client's active management of resources and state preservation strategy provide a kind of flexibility and control.
[0094] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0095] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A method for isolating resources on a server side of an operating system under a microkernel architecture, characterized in that: include: The application side initiates a service request to the kernel side; So that the kernel side forwards the service request to the operating system service side; So that the operating system server can process service requests from applications; The service request carries an execution request, information, and preset resources; The kernel side configures the execution environment of the operating system service based on the service request initiated by the application side, ensuring that the operating system service can be effectively isolated between different application programs.
2. The method for isolating operating system server resources under the microkernel architecture according to claim 1, characterized in that: Configure at least one ServerContext kernel object on the operating system server side, and provide independent isolated execution environments for different services through the ServerContext kernel object; On the operating system server side, each thread runs in a corresponding ServerContext kernel object, and the memory and available Capabilities accessed by the thread are restricted by the ServerContext kernel object, and the available Capabilities are passed to the application side.
3. The method for isolating operating system server resources under the microkernel architecture according to claim 2, characterized in that: When an application initiates an inter-process communication request, the inter-process communication request carries a ServerContext Capability, so that the kernel side indexes the actual ServerContext kernel object through the Capability, indicating the ServerContext used by the operating system server-side handler thread.
4. The method for isolating operating system server resources under the microkernel architecture according to claim 3, characterized in that: Each of the ServerContexts is configured with a Capability table, through which a Capability-based fine-grained permission management mechanism is implemented to control the access rights of applications to objects in operating system services; each ServerContext can only access objects that have indexes in its configured Capability table.
5. The method for isolating operating system server resources under the microkernel architecture according to claim 1, characterized in that: The ServerContext also configures memory tag information, including: private memory tag and global memory tag; When performing memory mapping, if the memory is mapped directly to the operating system service process, the global memory tag is used, corresponding to the global data area; when mapping memory in ServerContext, its private memory tag is used to ensure that only applications with the current ServerContext Capability can access the private memory.
6. The method for isolating operating system server resources under the microkernel architecture according to claim 1, characterized in that: The interaction between the application end and the operating system server end is performed through inter-process communication; during the inter-process communication process, the kernel end executes the switching of ServerContext in the operating system server end according to the ServerContext Capability provided by the application end; and switches the data domain in the operating system server end by modifying the PKRU register.
7. An operating system server resource isolation system under a microkernel architecture, characterized in that: include: The application side is used to initiate service requests to the kernel side; The kernel side is used to forward the service request to the operating system server side; The operating system server is used to process service requests from applications; The service request carries an execution request, information, and preset resources; The kernel side configures the execution environment of the operating system service based on the service request initiated by the application side, ensuring that the operating system service can be effectively isolated between different application programs.
8. The operating system server-side resource isolation system under the microkernel architecture according to claim 7, characterized in that: Configure at least one ServerContext kernel object on the operating system server side, and provide independent isolated execution environments for different services through the ServerContext kernel object; On the operating system server side, each thread runs in a corresponding ServerContext kernel object, and the memory and available capabilities accessed by the thread are restricted by the ServerContext kernel object, and the available capabilities are passed to the application side; When an application initiates an inter-process communication request, the inter-process communication request carries a ServerContext Capability, so that the kernel side indexes the actual ServerContext kernel object through the Capability, indicating the ServerContext used by the operating system server-side handler thread; Each of the ServerContexts is configured with a Capability table, through which a Capability-based fine-grained permission management mechanism is implemented to control the access rights of applications to objects in operating system services; each ServerContext can only access objects that have indexes in its configured Capability table.
9. The operating system server resource isolation system under the microkernel architecture according to claim 7, characterized in that: The ServerContext also configures memory tag information, including: private memory tag and global memory tag; When performing memory mapping, if the memory is mapped directly to the operating system service process, the global memory tag is used, corresponding to the global data area; when mapping memory in ServerContext, its private memory tag is used to ensure that only applications with the current ServerContext Capability can access the private memory.
10. The operating system server resource isolation system under the microkernel architecture according to claim 7, characterized in that: The interaction between the application end and the operating system server end is performed through inter-process communication; during the inter-process communication process, the kernel end executes the switching of ServerContext in the operating system server end according to the ServerContext Capability provided by the application end; and switches the data domain in the operating system server end by modifying the PKRU register.
Citation Information
Cited By
Server-free computing-oriented multi-thread execution and resource security sharing cloud computing system
CN119396548A
A cloud computing system for multi-threaded execution with resource security sharing for serverless computing
CN119396548B
Vehicle-mounted operation system and operation method based on QNX
CN119883388A
