CN115878210A - System configuration processing method and related equipment - Google Patents

System configuration processing method and related equipment Download PDF

Info

Publication number
CN115878210A
CN115878210A CN202111152830.2A CN202111152830A CN115878210A CN 115878210 A CN115878210 A CN 115878210A CN 202111152830 A CN202111152830 A CN 202111152830A CN 115878210 A CN115878210 A CN 115878210A
Authority
CN
China
Prior art keywords
configuration item
system configuration
request
shared memory
service process
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111152830.2A
Other languages
Chinese (zh)
Inventor
刘春艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202111152830.2A priority Critical patent/CN115878210A/en
Publication of CN115878210A publication Critical patent/CN115878210A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

The embodiment of the application discloses a system configuration method which can be applied to a micro-kernel architecture. The method in the embodiment of the application comprises the following steps: the user process can determine first access interface information of the first system configuration item through the first shared memory, and transmit a first request to the first system service process through the first access interface information, so that first access operation of the user to the first system configuration item is realized. Compared with multiple IPC communications brought by using an independent pseudo file system or other service for centralized management (such as a key value KV process or a system service for centralized management), the method has the advantages that the user process can directly perform first access operation on the first system configuration item, and the first access operation efficiency of the user process on the first system configuration item is improved.

Description

System configuration processing method and related equipment
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a system configuration processing method and related equipment.
Background
At present, the operating system architecture in the industry mainly includes a micro kernel architecture and a macro kernel architecture, and the micro kernel architecture (QNX, SEL4, fuchsia, etc.) is characterized in that the kernel itself is very small, many system service functions (such as file system, memory management, network, driver, etc.) are placed in a user mode to run as independent service processes (hereinafter referred to as system services), and the kernel mode only retains key functions { such as interrupt processing, timer function, inter-process communication (IPC), memory mapping, etc. }. The access between system services is handled by means of IPC.
At present, in a scenario based on a Linux kernel, linux uses a pseudo file system (procfs/sysfs, etc.) as a control plane interface of the kernel, provides system configuration management for the upper layer, and is widely used by upper layer applications and tools. In these scenarios, to replace the Linux kernel with the microkernel, the microkernel must also provide a consistent procfs/sysfs interface to access system configuration items in order to be compatible with stock applications and tools. The pseudo file system is used as an independent service and belongs to different processes on a user mode with other system services. The user program accesses the system configuration item through the procfs/sysfs file operation, and the operation on the procfs/sysfs file is firstly processed by the IPC to the procfs/sysfs service process, and the procfs/sysfs service process is sent to the specific system service processing through the IPC after the file-related analysis and the necessary security authentication are carried out.
However, in the above system configuration management technique, multiple IPC communications between the procfs/sysfs service process and the system service process are required for the access of the system configuration items.
Disclosure of Invention
The embodiment of the application provides a system configuration processing method and related equipment. The access operation efficiency of the user process to the system configuration items can be improved.
A first aspect of the embodiments of the present application provides a system configuration processing method, which may be applied to a microkernel architecture. The method comprises the following steps: a user process acquires a first request, wherein the first request is used for the user process to perform first access operation on a first system configuration item provided by a first system service process; the user process determines first access interface information of a first system configuration item through a first shared memory, the first shared memory has a mapping relation with virtual address spaces of the user process and a first system service process respectively, and the first access interface information is used for communication between the user process and the first system service process; and the user process transmits a first request to the first system service process through the first access interface information, so that the first system service process responds to the first request and executes a first access operation by using a function corresponding to the first system configuration item. The first system configuration item is at least one configuration item in a plurality of system configuration items provided by the first system service process, and the first system configuration item can be understood as a control interface provided by the first system service process to the outside. The user process and the first system service process are both in a user mode in the microkernel architecture.
In the embodiment of the application, the user process may determine the first access interface information of the first system configuration item through the first shared memory, and transmit the first request to the first system service process through the first access interface information, thereby implementing the first access operation of the user to the first system configuration item. Compared with multiple times of IPC communication brought by using an independent pseudo file system or other service for centralized management (such as key-value (KV) process or using a certain system service for centralized management), the user process can directly perform first access operation on the first system configuration item, and the first access operation efficiency of the user process on the first system configuration item is improved.
Optionally, in a possible implementation manner of the first aspect, the first system service process includes: at least one service process of process management, memory management, file system management, drive management and network management. It is understood that the memory management and the file system management may be the same service process, or the service process is understood to support the memory management and the file system management.
In this possible implementation manner, the functions of the first system service process have multiple implementation manners, and the user process can perform multi-style access operation on the system service processes with multiple functions.
Optionally, in a possible implementation manner of the first aspect, the step of: the user process determines first access interface information of a first system configuration item through a first shared memory, and the first access interface information comprises the following steps: a user process acquires a data storage structure through a first shared memory, wherein the data storage structure is used for storing entry information created by a first system service process, and the entry information comprises an identifier of a first system configuration item and first access interface information of the first system configuration item; the user process determines first access interface information via the first request and the data storage structure.
In this possible implementation manner, the user process may directly determine the first access interface information in a manner that the first shared memory queries the data storage structure. And executing the first access operation through the first access interface information. Compared with multiple times of IPC communication in the prior art, the user process can directly perform the first access operation on the first system configuration item, and the first access operation efficiency of the user process on the first system configuration item is improved.
Optionally, in a possible implementation manner of the first aspect, the step of: the method for acquiring the data storage structure by the user process through the first shared memory comprises the following steps: and if the first access operation is file operation, the user process queries the data storage structure by calling the file system interface, and the first access operation comprises opening, reading, writing or closing operation.
In this possible implementation, the user process may query the data storage structure by calling the file system interface, so that the method may be compatible with the file system interface.
Optionally, in a possible implementation manner of the first aspect, the step of: the method for acquiring the data storage structure by the user process through the first shared memory comprises the following steps: and if the first access operation is database operation, the user process queries the data storage structure in a database mode, the form of the database comprises key values KV or trees, and the first access operation comprises setting or obtaining.
In this possible implementation, the user process may query the data storage structure in a manner of querying the database, so that the method may be compatible with the database query manner.
Optionally, in a possible implementation manner of the first aspect, the step further includes: the user process acquires a second request, and the second request is used for the user process to perform second access operation on a second system configuration item of a second system service process; the user process determines second access interface information of a second system configuration item through a second shared memory, the second shared memory is mapped to virtual address spaces of the user process and a second system service process, and the second shared memory is different from the first shared memory; and the user process transmits a second request to the second system service process through the second access interface information, so that the second system service process responds to the second request and executes a second access operation by using the function corresponding to the second system configuration item. Furthermore, other processes except the first system service process can only read and map and access the first shared memory. Other processes than the second system service process can only read the map and access the second shared memory.
In this possible implementation manner, the first system service process and the second system service process each manage their own shared memory region, manage the system configuration items that they can support on their own shared memory region, and all other modules can only read-only map and access the shared memory, which has better security isolation.
A second aspect of the present embodiment provides a system configuration processing method, which may be applied to a microkernel architecture. The method comprises the following steps: a first system service process applies for a first shared memory from a micro-kernel operating system, and the first shared memory has a mapping relation with virtual address spaces of a user process and the first system service process respectively; a first system service process manages a first system configuration item in a first shared memory; a first system service process receives a first request transmitted by a user process, wherein the first request is used for the user process to perform first access operation on a first system configuration item of the first system service process; and the first system service process responds to the first request and executes a first access operation by using a function corresponding to the first system configuration item.
In the embodiment of the application, each system service manages the own shared memory area, the system configuration items which can be supported by the system service are managed on the own shared memory area, and the user process can access the system configuration items in the system service process in a mode of inquiring the data storage structure on the shared memory.
Optionally, in a possible implementation manner of the second aspect, the first system service process includes: at least one service process of process management, memory management, file system management, drive management and network management. It is understood that the memory management and the file system management may be the same service process, or that the service process supports both the memory management and the file system management.
In this possible implementation manner, the functions of the first system service process have multiple implementation manners, and the user process can perform multi-style access operation on the system service processes with multiple functions.
Optionally, in a possible implementation manner of the second aspect, the step of: the first system service process manages a first system configuration item in a first shared memory, and comprises the following steps: the method comprises the steps that a first system service process creates entry information corresponding to a first system configuration item in a first shared memory, wherein the entry information comprises an identifier of the first system configuration item and first access interface information of the first system configuration item; the first system service process adds entry information in the data storage structure.
In this possible implementation manner, the first system service process may create entry information corresponding to the first system configuration item in the first shared memory, so that the subsequent user process may directly determine the first access interface information in the entry information in a manner that the first shared memory queries the data storage structure. And executing the first access operation through the first access interface information. On one hand, compared with multiple times of IPC communication in the prior art, the user process can directly perform the first access operation on the first system configuration item, and the first access operation efficiency of the user process on the first system configuration item is improved. On the other hand, the first system service process can directly add entries on the shared memory, and does not need to go to a pseudo file system or other processes managed in a centralized way to create configuration items, so that the creation efficiency of the system configuration items can be improved.
Optionally, in a possible implementation manner of the second aspect, the step of: the first system service process responds to the first request, including: and if the first request authentication is successful, the first system service process responds to the read-write request.
In this possible implementation manner, the process is authenticated before responding to the first request, so that the user process without the access right cannot perform access operation on the first system configuration item, thereby reducing the risk of tampering the first system configuration item.
Optionally, in a possible implementation manner of the second aspect, the authentication of the first request is performed in a service process of the first system.
In the possible implementation mode, the first system service process authenticates the configuration item provided by the first system service process, and the mode of respectively self-managing has better security isolation.
A third aspect of the embodiments of the present application provides a system configuration processing method, which may be applied to an electronic device, and the method includes: the method comprises the steps that a first request is obtained, the first request is used for indicating a first process to carry out access processing on a system configuration item in a second process in a mode of inquiring a data storage structure on a shared memory, the first process is an application program in a user mode, the second process is a system program in the user mode, the shared memory has a mapping relation with virtual address spaces of the first process and the second process respectively, the data storage structure comprises an identification of the system configuration item and interface information of the identification of the system configuration item, and the interface information is used for communication between the first process and the second process; and responding to the first request, and the electronic equipment executes access processing by using a function corresponding to the system configuration item through a second process.
In the embodiment of the application, a user can access the system configuration item in the system service process by inquiring the data storage structure on the shared memory, and compared with multiple IPC communications using an independent intermediate service process (such as a pseudo file system or a KV process) in the prior art, the user can directly access the system configuration item, so that the access efficiency of the user to the system configuration item is improved.
A fourth aspect of the present application provides an electronic device, where the electronic device employs a microkernel architecture, and the electronic device includes: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first request, and the first request is used for a user process to perform first access operation on a first system configuration item provided by a first system service process; the determining unit is used for determining first access interface information of a first system configuration item through a first shared memory, the first shared memory has a mapping relation with virtual address spaces of a user process and a first system service process respectively, and the first access interface information is used for communication between the user process and the first system service process; and the transfer unit is used for transferring the first request to the first system service process through the first access interface information so that the first system service process responds to the first request and executes the first access operation by using the function corresponding to the first system configuration item.
Optionally, in a possible implementation manner of the fourth aspect, the first system service process includes: at least one service process of process management, memory management, file system management, drive management and network management.
Optionally, in a possible implementation manner of the fourth aspect, the determining unit is specifically configured to obtain a data storage structure through the first shared memory, where the data storage structure is configured to store entry information created by the first system service process, and the entry information includes an identifier of the first system configuration item and first access interface information of the first system configuration item; and the determining unit is specifically used for determining the first access interface information through the first request and the data storage structure.
Optionally, in a possible implementation manner of the fourth aspect, the determining unit is specifically configured to query, by the user process, the data storage structure by invoking a file system if the first access operation is a file operation, where the first access operation includes an open operation, a read operation, a write operation, or a close operation.
Optionally, in a possible implementation manner of the fourth aspect, the determining unit is specifically configured to, if the first access operation is a database operation, query the data storage structure by the user process in a database manner, where the database includes a key value KV or a tree, and the first access operation includes setting or obtaining.
Optionally, in a possible implementation manner of the fourth aspect, the obtaining unit is further configured to obtain a second request, where the second request is used for a user process to perform a second access operation on a second system configuration item of a second system service process; the determining unit is further configured to determine second access interface information of a second system configuration item through a second shared memory, where the second shared memory is mapped to virtual address spaces of the user process and a second system service process, and the second shared memory is different from the first shared memory; and the transfer unit is further used for transferring the second request to the second system service process through the second access interface information, so that the second system service process responds to the second request and executes a second access operation by using the function corresponding to the second system configuration item.
A fifth aspect of the present application provides an electronic device, where the electronic device employs a microkernel architecture, and the electronic device includes: the application unit is used for applying a first shared memory to the microkernel operating system, and the first shared memory has a mapping relation with virtual address spaces of a user process and a first system service process respectively; the management unit is used for managing a first system configuration item in the first shared memory; the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a first request transmitted by a user process, and the first request is used for the user process to perform first access operation on a first system configuration item of a first system service process; and the execution unit is used for responding to the first request and executing the first access operation by using the function corresponding to the first system configuration item.
Optionally, in a possible implementation manner of the fifth aspect, the first system service process includes: at least one service process of process management, memory management, file system management, drive management and network management.
Optionally, in a possible implementation manner of the fifth aspect, the management unit is specifically configured to create entry information corresponding to the first system configuration item in the first shared memory, where the entry information includes an identifier of the first system configuration item and first access interface information of the first system configuration item; and the management unit is specifically used for adding entry information in the data storage structure.
Optionally, in a possible implementation manner of the fifth aspect, the execution unit is specifically configured to respond to the read-write request by the first system service process if the first request is authenticated successfully.
Optionally, in a possible implementation manner of the fifth aspect, the authentication of the first request is performed in a first system service process.
A sixth aspect of the present application provides an electronic device, including: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first request, the first request is used for indicating a first process to access a system configuration item in a second process in a mode of inquiring a data storage structure on a shared memory, the first process is an application program in a user mode, the second process is a system program in the user mode, the shared memory has a mapping relation with virtual address spaces of the first process and the second process respectively, the data storage structure comprises an identifier of the system configuration item and interface information of the identifier of the system configuration item, and the interface information is used for the communication between the first process and the second process; and the execution unit is used for responding to the first request, and the electronic equipment executes access processing by using the function corresponding to the system configuration item through a second process.
A seventh aspect of the present application provides an electronic device, which performs the method in the first aspect or any possible implementation manner of the first aspect, or performs the method in the second aspect or any possible implementation manner of the second aspect, or performs the method in any possible implementation manner of the third aspect or any possible implementation manner of the third aspect.
An eighth aspect of the present application provides an electronic apparatus, comprising: a processor coupled with a memory, the memory being configured to store a program or instructions, which, when executed by the processor, causes the electronic device to implement the method in the first aspect or any possible implementation manner of the first aspect, or causes the electronic device to implement the method in the second aspect or any possible implementation manner of the second aspect, or causes the electronic device to implement the method in any possible implementation manner of the third aspect or the third aspect.
A ninth aspect of the present application provides a microkernel architecture comprising a user process as in the first aspect or any possible implementation of the first aspect and/or a first system service process as in the second aspect or any possible implementation of the second aspect.
A tenth aspect of the present application provides a computer-readable medium having stored thereon a computer program or instructions which, when run on a computer, cause the computer to perform the method of the aforementioned first aspect or any possible implementation of the first aspect, or cause the computer to perform the method of the aforementioned second aspect or any possible implementation of the second aspect, or cause the computer to perform the method of the aforementioned third aspect or any possible implementation of the third aspect.
An eleventh aspect of the present application provides a computer program product which, when executed on a computer, causes the computer to perform the method of the foregoing first aspect or any possible implementation manner of the first aspect, any possible implementation manner of the second aspect or the second aspect, or any possible implementation manner of the third aspect.
For technical effects brought by the fourth, seventh, eighth, ninth, and tenth aspects or any one of possible implementation manners, reference may be made to technical effects brought by the first aspect or different possible implementation manners of the first aspect, and details are not described here.
For example, the technical effect brought by the fifth, seventh, eighth, ninth, and tenth aspects or any one of the possible implementation manners of the fifth aspect may refer to the technical effect brought by the second aspect or the different possible implementation manners of the second aspect, and details are not described here.
For technical effects brought by the sixth, seventh, eighth, tenth aspects or any one of possible implementation manners, reference may be made to technical effects brought by different possible implementation manners of the third aspect or the third aspect, and details are not described here again.
According to the technical scheme, the embodiment of the application has the following advantages: the user process can determine first access interface information of the first system configuration item through the first shared memory, and transmit a first request to the first system service process through the first access interface information, so that first access operation of the user to the first system configuration item is realized. Compared with multiple IPC communications using independent pseudo file systems in the prior art, the user process can directly perform first access operation on the first system configuration item, and the first access operation efficiency of the user process on the first system configuration item is improved.
Drawings
Fig. 1 is a schematic structural diagram of a micro core architecture according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a conventional microkernel architecture;
FIG. 3 is a schematic diagram of another conventional microkernel architecture;
fig. 4 is a schematic structural diagram of a micro core architecture according to an embodiment of the present application;
fig. 5 is a schematic diagram illustrating a mapping principle of a shared memory according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a system configuration processing method according to an embodiment of the present application;
FIG. 7 is a block diagram illustrating an alternative micro-kernel architecture according to an embodiment of the present application;
fig. 8 is another schematic flow chart of a system configuration processing method according to an embodiment of the present application;
fig. 9 to 12 are schematic structural diagrams of electronic devices provided in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a system configuration processing method and related equipment. The access operation efficiency of the user process to the system configuration items can be improved.
Embodiments of the present application will now be described with reference to the accompanying drawings, and it is to be understood that the described embodiments are merely illustrative of some, but not all, embodiments of the present application. As can be known to those skilled in the art, with the development of technology and the emergence of new scenes, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present embodiment, "a plurality" means two or more unless otherwise specified.
In order to facilitate understanding of the technical solutions provided in the present application, some concepts are first introduced below.
1. Microkernel and macrokernel
Microkernel: an operating system kernel architecture is represented by QNX, L4, fuchsia and the like, and realizes the 'miniaturization' of a kernel by running most system services in a user mode in an independent process mode.
Macro kernel: an operating system kernel architecture is represented by Linux, unix and the like, and realizes a large and complete 'macro' kernel by concentrating all system service functions in the kernel.
2. Program and process
A program is a collection of instructions and data that may be stored as a target file in a disk or stored as segments in a memory address space. A process refers to a running entity of a program. In other words, a program is a description of instructions, data, and their organization, and a process is an execution entity of the program. Multiple threads can be concurrent in a process, each thread executing a different task in parallel. The thread may be an actual operation unit of the process, but the embodiment of the present application does not explicitly distinguish the thread from the process, and the process is used instead in the description process.
The system program refers to a system for controlling and coordinating computer equipment and external equipment, supporting development and operation of application software, and is a collection of various programs without user intervention.
The application programs are corresponding to system software, are various programming languages which can be used by users, and are a collection of programs which are compiled by various programming languages, and are divided into application software packages and user programs.
3. File system
A file system is a collection of software and managed files and data structures (e.g., directories and index tables, etc.) in an operating system that manages computer software resources in the form of files. From a system perspective, a file system is used for organizing, allocating and recycling storage space of a file storage and is responsible for storage, retrieval, sharing and protection of files. From the perspective of users, the file system mainly realizes "access by name", and users of the file system can access information in files as long as they know the file names of the required files, and do not need to know where the files are stored.
First, a structure of the microkernel is described, as shown in fig. 1, in the microkernel structure, an application program and a system program are respectively run in a user mode in an independent process, and the microkernel is run in a kernel mode.
First, a kernel mode and a user mode are explained. The kernel mode and the user mode are two working states of a Central Processing Unit (CPU). If a process executes a system call and executes kernel codes, the process is called to be in a kernel state; if a process executes user code, the process is said to be in a user state. The kernel state may also be referred to as a privileged state, and the user state may also be referred to as a non-privileged state, and the kernel state and the user state are uniformly used for description hereinafter.
Specifically, in the ARM architecture, EL0 is used to represent a user state, and EL1 is used to represent a kernel state; in the X86 architecture, ring3 is used to represent user mode, and ring0 is used to represent kernel mode.
A microkernel is one such kernel: it only performs the functions that the kernel has to perform, including clock interrupt, process creation and destruction, process scheduling, interprocess communication, while others such as file systems, memory management, device drivers, etc. are placed in the user state space as system processes. In other words, the microkernel is a typical macro kernel as Linux, and besides clock interrupt, process creation and destruction, process scheduling, and inter-process communication, other file systems, memory management, input/output, and device driver management need to be completed by the kernel. In other words, the microkernel is responsible for the most core functions, other functions are added in a plug-in mode through a user mode independent process, and then the microkernel is responsible for management and scheduling of the process and communication among the processes, so that the functions required by the whole kernel are completed. Basically one function is problematic but it exists as an independent process with little effect on other processes resulting in the kernel being unavailable, at most, one function of the kernel is now unavailable.
Currently, interaction between a user process and a system process requires the introduction of an intermediate service process (e.g., a pseudo file system process or a key-value process) through which system configuration management is provided to the user process. The intermediate service process is used as an independent centralized management service process and is in a different process with other system services. Two cases of the intermediate service process are described below:
first, the intermediary service process is a pseudo file system process.
This approach may also be understood as system configuration management through a pseudo file system process. For example, the creating, deleting and reading and writing processes of the procfs/sysfs file are all processed by analyzing the pseudo file system process, interacting with each system service process (for example, a first system service process and a second system service process), and finally processing by each system service process. The method can solve the compatibility problem of procfs/sysfs, but for the access of the system configuration item, the access of the user process to the first system service process needs multiple IPC communication between the pseudo file system process and the first system service process.
For example, please refer to fig. 2, taking an example that a user process accesses a system configuration item a in a first system service process through a pseudo file system process, the user program accesses the system configuration item through a procfs/sysfs file operation, and operates a procfs/sysfs file by first processing IPC to the pseudo file system process, and after the pseudo file system process performs file-related analysis and file operation authentication, the pseudo file system process sends the file to the first system service process through IPC again for processing, so as to implement operation of an a processing function.
Second, the intermediate service process is a key-value (KV) process.
The KV process provides system configuration management for the user process, or is understood to provide a non-file system class access interface for the user process. Similar to the first approach described above, multiple IPC communications between the KV process and the first system service process are required for access to the first system service process by the user process.
For example, referring to fig. 3, taking an example that a user process accesses a system configuration item a in a first system service process through a KV process, similar to fig. 2, multiple times of IPC communication between the KV process and the first system service process are required for the access of the user process to the first system service process.
It can be seen that in the above two ways, the access of the user process to the first system service process requires multiple IPC communications between the intermediate service process and the first system service process.
In order to solve the above problems, the present application provides a micro-kernel architecture and a system configuration processing method, where a user process may access a system configuration item in a system service process by querying configuration item information on a shared memory, and compared with multiple IPC communications using an independent pseudo file system in the prior art, the user process may directly access the system configuration item, thereby improving the access efficiency of the user process to the system configuration item.
Referring to fig. 4, a microkernel architecture provided in an embodiment of the present application includes a user mode and a kernel mode, where a user process, a first system service process, and a second system service process are in the user mode, and the microkernel is in the kernel mode.
The first system service process and the second system service process may be understood as service processes providing system configuration, and the system configuration item refers to a control interface provided by the system service processes to the outside.
The first system service process is configured to apply for a shared memory (i.e., a first shared memory) of an SHM1 from a microkernel operating system, where the shared memory of the SHM1 includes a shared memory 1 and a shared memory 2. And is further configured to manage a system configuration item a and a system configuration item B supported by the first system service process in the shared memory 1 and the shared memory 2. The system configuration item A is processed through an A processing function, and the system configuration item B is processed through a B processing function. In addition, the shared memory 1 and the shared memory 2 have a mapping relationship with the virtual address spaces of the user process and the first system service process, respectively. The shared memory 1 stores the access interface information of the system configuration item A, and the shared memory 2 stores the access interface information of the system configuration item B. Shared memory 1 and shared memory 2 may also be understood as different management units on the first shared memory.
The second system service process is configured to apply for a shared memory of the SHM2 (i.e., a second shared memory) from the microkernel operating system, where the shared memory of the SHM2 includes a shared memory 3 and a shared memory 4. And is further configured to manage a system configuration item C and a system configuration item D supported by the second system service process in the shared memory 3 and the shared memory 4. The system configuration item C is further used for processing the system configuration item C through a C processing function, and the system configuration item D is further used for processing the system configuration item D through a D processing function. In addition, the shared memory 3 and the shared memory 4 have a mapping relationship with the virtual address space of the user process and the virtual address space of the second system service process, respectively. The shared memory 3 stores the access interface information of the system configuration item C, and the shared memory 4 stores the access interface information of the system configuration item D. Shared memory 3 and shared memory 4 may also be understood as distinct management units on the second shared memory.
And the user process is used for receiving the access request of the user to the system configuration item. And is used for processing (for example, reading and writing) the system configuration item a and the system configuration item B through the shared memory 1 and the shared memory 2. And is further configured to process (e.g., read/write processing, etc.) the system configuration items C and D through the shared memory 3 and the shared memory 4.
To facilitate understanding of the mapping principle of the shared memory (SHM), please refer to fig. 5, which takes the example that the user process and the first system service process share the memory, and the user process maps the first virtual address in the virtual address space of the user process to the first shared memory in the physical memory of the microkernel through the page table 1. The first system service process maps a second virtual address in the virtual address space of the first system service process to a first shared memory in the physical memory of the microkernel through the page table 2. That is, the same physical memory is mapped to the respective virtual address spaces of the user process and the first system service process for facilitating communication.
Optionally, other processes except the first system service process can only read the mapping and access the first shared memory. Other processes than the second system service process can only read the mapping and access the second shared memory.
Optionally, the first system service process is further configured to authenticate a processing operation process of the system configuration item a, and after the authentication is passed, the a processing function is used to execute processing of the system configuration item a by the user process. And the system configuration item B processing method is also used for authenticating the processing operation process of the system configuration item B, executing the processing of the user process on the system configuration item B by using the B processing function after the authentication is passed, and returning the processing result to the user process. And the second system service process is also used for authenticating the processing operation process of the system configuration item C, and after the authentication is passed, the processing of the system configuration item C by the user process is executed by using the C processing function. And the system configuration item processing module is also used for authenticating the processing operation process of the system configuration item D, executing the processing of the user process on the system configuration item D by using the D processing function after the authentication is passed, and returning the processing result to the user process.
Alternatively, the user process may provide a client library with which to encapsulate the mapping of the shared memory. That is, the mapping of the shared memory is encapsulated into an interface, and the user process calls the interface to realize the mapping of the shared memory.
Further, the user process may also utilize the client library to encapsulate the mapping of the shared memory and query the configuration items. Namely, the mapping of the shared memory and the query configuration item are encapsulated into an interface, and the user process can directly determine the information of the access interface by calling the interface, so as to transmit the access operation request to the system service process to which the configuration item belongs.
Additionally, a user may select a file system compatible interface when accessing the system configuration items. In other words, it suffices to provide a corresponding interface based on the configuration item query.
Illustratively, as shown in FIG. 4, if a user desires to provide a procfs/sysfs compatible file system interface, the fslib interface may be interfaced to the configuration item query interface.
The microkernel architecture in the embodiment of the present application may include a greater number of user processes, system service processes, and processing functions, and the embodiment of the present application only describes that the microkernel architecture includes one user process, two system service processes, and four processing functions as an example, and the number of the user processes, the number of the system service processes, the number of system configuration items supported by the system service processes, the number of the processing functions, and the like are not limited here.
The micro-kernel architecture provided by the embodiment of the application can be applied to platforms of various architectures such as an Intel architecture, an ARM architecture, an AARCH64 architecture and the like.
As can be seen from comparing fig. 2/3 and fig. 4, in the micro kernel architecture provided in the embodiment of the present application, on one hand, a user process can access a system configuration item in a system service process by querying configuration item information on a shared memory, and compared with multiple IPC communications using independent intermediate service processes (e.g., a pseudo file system or a KV process) in the prior art, the user process can directly access the system configuration item, thereby improving the access efficiency of the user process to the system configuration item. On the other hand, each system service manages its own shared memory area, manages the system configuration items that it can support on its own shared memory area, all other modules can only read-only map and access the shared memory, and authenticates the configuration items provided by itself by the service itself, which has better security isolation.
The following describes the system configuration processing method according to the embodiment of the present application in detail with reference to the micro-kernel architecture of fig. 4 and the accompanying drawings.
Referring to fig. 6, an embodiment of a system configuration processing method provided in this application may be applied to an electronic device, and may also be applied to a component (e.g., a processor, a chip, or a system-on-chip) of the electronic device, where the embodiment includes steps 601 to 606.
In this embodiment, the electronic device may be a terminal device for serving a user, or a cloud device. The terminal device may include a Head Mounted Display (HMD), which may be a combination of a Virtual Reality (VR) box and a terminal, a VR all-in-one machine, a Personal Computer (PC), an Augmented Reality (AR) device, a Mixed Reality (MR) device, and the like, and may further include a cellular phone (cellular phone), a smart phone (smart phone), a Personal Digital Assistant (PDA), a tablet computer, a laptop computer (laptop computer), a Personal Computer (PC), a vehicle-mounted terminal, and the like, which are not limited herein.
Step 601, a first system service process applies for a first shared memory to a microkernel operating system.
The first system service process may apply for the first shared memory from the microkernel operating system, and map the first shared memory allocated by the microkernel operating system to a virtual address space of the first system service process. In addition, the first shared memory has a mapping relation with a virtual address space of a user process. For a detailed description, reference may be made to the description of the embodiment corresponding to fig. 5, which is not repeated herein.
Step 602, a first system service process manages a first system configuration item in a first shared memory.
After the first system service process maps the first shared memory to the virtual address space of the first system service process, the first system configuration item may be managed in the first shared memory.
Optionally, the first system service process initializes the data storage structure on the first shared memory. And creating entry information corresponding to a first system configuration item supported by a first system service process in the first shared memory, wherein the entry information comprises an identifier of the first system configuration item and first access interface information of the first system configuration item. The first access interface information is used for the user process to communicate with the first system service process.
Optionally, the first access interface information includes a name of the first system configuration item, a name of a process to which the first system configuration item belongs, an interface identifier of the process, and the like.
It is understood that the first system service process may dynamically add and/or delete entry information in the data storage structure, or may use an encapsulation interface, which is not limited herein. The first system service process calls the interface to complete initialization and mapping of the first shared memory, and/or a data storage structure management method on the first shared memory, and the first system service process can call the interface to conveniently add and/or delete entry information.
In this embodiment, the first system configuration item is a system configuration item accessible by a user, and the first system service process may include: at least one of a file system, memory management, network management, or drive management, which is not limited herein. The first system configuration item is at least one of a plurality of system configuration items provided by the first system service process.
Step 603, the user process obtains the first request.
The user process acquires a first request of a user, wherein the first request is used for the user process to perform first access operation on a first system configuration item of a first system service process. The user may refer to a developer, a maintenance person, and the like, which is not limited herein.
The first access operation in the embodiment of the present application may include: opening (open), reading (read), writing (write), closing (close), setting (set), obtaining (get), and the like, which are not limited herein.
Illustratively, the first request may be read ("/proc/pidxx/status") or get ("pidxx _ status").
In step 604, the user process determines first access interface information of the first system configuration item through the first shared memory.
The user process obtains a data storage structure through the first shared memory, where the data storage structure stores the entry information created by the first system service process in step 602. The data storage structure may be in the form of a file system or a database (e.g., a key value KV or a tree), etc., which is not limited herein.
If the first access operation in the first request is a file operation, the user process may query the data storage structure by calling the file system LIB. If the first access operation in the first request is a database operation, the user process may query the data storage structure in a database manner. The file operation comprises at least one of opening (open), reading (read), writing (write), closing (close) and the like. The database operation comprises at least one of setting (set), obtaining (get) and the like.
For example, referring to fig. 7, fig. 7 may be understood as a system configuration processing method in which, under the microkernel architecture shown in fig. 4, a first system configuration item is taken as a system configuration item a, and a function corresponding to the system configuration item a is taken as an a processing function. The configuration item query in fig. 7 may be understood as querying the first access interface information in the data storage structure. The system interface (Sysif) may be understood as an interface identifier of the first access interface information.
The user process may determine, through the first request and the data storage structure, first access interface information, where the first access interface information is used for the user process to communicate with the first system service process, and the description of the first access interface information may specifically refer to step 603, which is not described herein again.
Optionally, the user process determines a first system configuration item (for example, system configuration item a) in the first request, and determines that the first access operation in the first request is a file operation, the user process first calls the file system LIB, queries the stored entry information from the file system LIB area, and then determines the first access interface information according to the system configuration item a.
Step 605, the user process transmits a first request to the first system service process through the first access interface information.
The user process, after determining the first access interface information, may communicate the first request to the first system service process via the first access interface information.
In step 606, the first system service process responds to the first request and performs a first access operation using a function corresponding to the first system configuration item.
After receiving the first request transmitted by the user process, the first system service process may respond to the first request and perform a first access operation using a function corresponding to the first system configuration item.
For example, if the function corresponding to the system configuration item a is an a processing function, the first system service process executes the first access operation using the a processing function.
After the first system service process performs the first access operation using the function, the processing result may be returned to the user process.
For example, if the first access operation is a read-write operation, after the first system service process executes the first access operation using the function, the read-write result may be returned to the user process.
Optionally, after the user process receives the processing result, the processing result may be presented to the user.
Optionally, the execution of this step is constrained conditionally, that is, the first system service process may authenticate the first access operation process of the first system configuration item, and if the authentication is successful, the first system service process may respond to the first request and execute the first access operation using a function corresponding to the first system configuration item. Authentication may be understood as determining whether a user process has the right to perform a first access operation to a first system configuration item in a first system service process.
In the embodiment of the present application, a specific manner of authentication is not limited, and specifically, the user process, the first system configuration item, and the first access operation may be matched in the security policy, and if matching is successful, it indicates that authentication is successful. The security policy may be understood as a security rule, which may be set by a user or by default. The authentication may also be understood as determining whether the first access operation performed by the user process on the first system configuration item complies with the security policy.
Of course, the user process may also perform access processing on the second system configuration item in the second system service process, that is, the user process obtains a second request, where the second request is used for the user process to perform second access processing on the second system configuration item of the second system service process. And the user process determines second access interface information of a second system configuration item through a second shared memory, the second shared memory is mapped to virtual address spaces of the user process and a second system service process, and the second shared memory is different from the first shared memory. And the user process transmits a second request to the second system service process through the second access interface information, and the second system service process responds to the second request and executes second access processing by using a function corresponding to the second system configuration item. The description is similar to the case where the user process performs access processing on the first system configuration item in the first system service process, and is not described herein again.
In the embodiment of the application, on one hand, the user process can access the system configuration item in the system service process by querying the data storage structure on the shared memory, and compared with multiple times of IPC communication in which an independent intermediate service process (such as a pseudo file system or a KV process) is used in the prior art, the user process can directly access the system configuration item, so that the access efficiency of the user process to the system configuration item is improved. On the other hand, each system service manages its own shared memory area, manages the system configuration items that it can support on its own shared memory area, all other modules can only read-only map and access the shared memory, and authenticates the configuration items provided by itself by the service itself, which has better security isolation.
Referring to fig. 8, another embodiment of the system configuration processing method provided in this embodiment of the present application may be applied to an electronic device, and may also be applied to a component (e.g., a processor, a chip, or a system-on-chip) of the electronic device, where the embodiment includes step 801 and step 802.
Step 801, obtain a first request.
In this embodiment, the first request may be preset or input by a user. The first request is used for indicating a first process to perform access processing on a system configuration item in a second process in a mode of inquiring a data storage structure on a shared memory, the first process is an application program in a user mode, the second process is a system program in the user mode, the shared memory has a mapping relation with virtual address spaces of the first process and the second process respectively, the data storage structure comprises an identifier of the system configuration item and interface information of the identifier of the system configuration item, and the interface information is used for communication between the first process and the second process.
The descriptions of the first request, the first process, the second process, the shared memory and the like may refer to the descriptions of the first request, the user process, the first system service process, the first shared memory and the like in the embodiment shown in fig. 6, and are not described herein again.
Step 802, in response to the first request, the electronic device executes access processing by using a function corresponding to the system configuration item through a second process.
After receiving the first request transmitted by the first process, the second process in the electronic device may perform, in response to the first request, access processing by the second process using a function corresponding to the system configuration item.
The above description of the access processing and the like may refer to the description of the first access processing and the like in the foregoing embodiment shown in fig. 6, and will not be described again here.
In the embodiment of the application, on one hand, a user can access the system configuration item in the system service process by querying the data storage structure on the shared memory, and compared with multiple times of IPC communication in which an independent intermediate service process (such as a pseudo file system or a KV process) is used in the prior art, the user can directly access the system configuration item, so that the access efficiency of the user to the system configuration item is improved. On the other hand, each system service manages its own shared memory area, and manages the system configuration items that it can support on its own shared memory area, all other modules can only map and access the shared memory, and authenticate the configuration items provided by itself by the service itself, and this way of respective self-management has better security isolation.
With reference to fig. 9, the electronic device in the embodiment of the present application is described below, and an embodiment of the electronic device in the embodiment of the present application includes:
an obtaining unit 901, configured to obtain a first request, where the first request is used for the user process to perform a first access operation on a first system configuration item provided by a first system service process;
a determining unit 902, configured to determine first access interface information of the first system configuration item through a first shared memory, where the first shared memory has a mapping relationship with virtual address spaces of the user process and the first system service process, respectively, and the first access interface information is used for the user process to communicate with the first system service process;
a transferring unit 903, configured to transfer the first request to the first system service process through the first access interface information, so that the first system service process executes the first access operation using a function corresponding to the first system configuration item in response to the first request.
In this embodiment, operations performed by each unit in the electronic device are similar to those described in the embodiments shown in fig. 4 to 8, and are not described again here.
In this embodiment, the determining unit 902 may determine the first access interface information of the first system configuration item through the first shared memory, and the transmitting unit 903 transmits the first request to the first system service process through the first access interface information, so as to implement the first access operation of the user on the first system configuration item. Compared with multiple IPC communications using independent pseudo file systems in the prior art, the user process can directly perform first access operation on the first system configuration item, and the first access operation efficiency of the user process on the first system configuration item is improved.
Referring to fig. 10, another embodiment of the electronic device in the embodiment of the present application includes:
an application unit 1001, configured to apply a first shared memory to a microkernel operating system, where the first shared memory has a mapping relationship with a virtual address space of a user process and a virtual address space of a first system service process;
a management unit 1002, configured to manage a first system configuration item in the first shared memory;
a receiving unit 1003, configured to receive a first request transmitted by the user process, where the first request is used for the user process to perform a first access operation on the first system configuration item of the first system service process;
an executing unit 1004, configured to execute the first access operation using a function corresponding to the first system configuration item in response to the first request.
In this embodiment, operations performed by each unit in the electronic device are similar to those described in the embodiments shown in fig. 4 to fig. 8, and are not repeated herein.
In this embodiment, the management unit 1002 of each system service process manages the shared memory area thereof, manages the system configuration items that can be supported by the user on the shared memory area thereof, and the user process can access the system configuration items in the system service process by querying the data storage structure on the shared memory.
Referring to fig. 11, another embodiment of an electronic device in the embodiment of the present application includes:
an obtaining unit 1101, configured to obtain a first request, where the first request is used to instruct a first process to perform access processing on a system configuration item in a second process by querying a data storage structure on a shared memory, the first process is an application program in a user mode, the second process is a system program in the user mode, the shared memory has a mapping relationship with virtual address spaces of the first process and the second process, the data storage structure includes an identifier of the system configuration item and interface information of the system configuration item, and the interface information is used for communicating between the first process and the second process;
an executing unit 1102, configured to, in response to the first request, execute, by the electronic device, the access processing by using a function corresponding to the system configuration item through the second process.
In this embodiment, operations performed by each unit in the electronic device are similar to those described in the embodiments shown in fig. 4 to 8, and are not described again here.
In this embodiment, the user may access the system configuration item in the system service process by querying the data storage structure in the shared memory, and compared with multiple IPC communications using an independent intermediate service process (e.g., a pseudo file system or a KV process) in the prior art, the user may directly access the system configuration item, thereby improving the access efficiency of the user to the system configuration item.
Referring to fig. 12, a schematic structural diagram of another electronic device provided in the present application is shown. The electronic device may include a processor 1201, memory 1202, and a communication interface 1203. The processor 1201, memory 1202, and communication interface 1203 are interconnected by wires. Among other things, memory 1202 has stored therein program instructions and data.
The memory 1202 stores program instructions and data corresponding to the steps executed by the electronic device in the corresponding embodiments shown in fig. 4 to 8.
A processor 1201 configured to perform the steps performed by the electronic device according to any of the embodiments shown in fig. 4 to 8.
The communication interface 1203 may be configured to receive and transmit data, and is configured to perform steps related to obtaining, transmitting, and receiving in any of the embodiments shown in fig. 4 to fig. 8.
In one implementation, the electronic device may include more or fewer components than those shown in fig. 12, which are merely illustrative and not limiting.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated units described above may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
When the integrated unit is implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
The terms "first," "second," and the like in the description and in the claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances and are merely descriptive of the various embodiments of the application and how objects of the same nature can be distinguished. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.

Claims (28)

1. A system configuration processing method is applied to a micro-kernel architecture, and comprises the following steps:
a user process acquires a first request, wherein the first request is used for the user process to perform first access operation on a first system configuration item provided by a first system service process;
a user process determines first access interface information of the first system configuration item through a first shared memory, the first shared memory has a mapping relation with virtual address spaces of the user process and the first system service process respectively, and the first access interface information is used for the communication between the user process and the first system service process;
and the user process transmits the first request to the first system service process through the first access interface information, so that the first system service process responds to the first request and executes the first access operation by using a function corresponding to the first system configuration item.
2. The method of claim 1, wherein the first system service process comprises: at least one service process of process management, memory management, file system management, drive management and network management.
3. The method according to claim 1 or 2, wherein the determining, by the user process, the first access interface information of the first system configuration item through the first shared memory includes:
the user process obtains a data storage structure through the first shared memory, where the data storage structure is used to store entry information created by the first system service process, and the entry information includes an identifier of the first system configuration item and the first access interface information of the first system configuration item;
the user process determines the first access interface information via the first request and the data storage structure.
4. The method of claim 3, wherein the user process obtaining the data storage structure via the first shared memory comprises:
and if the first access operation is a file operation, the user process queries the data storage structure by calling a file system, wherein the first access operation comprises opening, reading, writing or closing operation.
5. The method of claim 3, wherein the user process obtaining the data storage structure via the first shared memory comprises:
and if the first access operation is a database operation, the user process queries the data storage structure in a database mode, the form of the database comprises a key value KV or a tree, and the first access operation comprises setting or obtaining.
6. The method according to any one of claims 1 to 5, further comprising:
the user process acquires a second request, wherein the second request is used for the user process to perform second access operation on a second system configuration item of a second system service process;
the user process determines second access interface information of the second system configuration item through a second shared memory, the second shared memory is mapped to virtual address spaces of the user process and the second system service process, and the second shared memory is different from the first shared memory;
and the user process transmits the second request to the second system service process through the second access interface information, so that the second system service process responds to the second request and executes the second access operation by using a function corresponding to the second system configuration item.
7. A system configuration processing method is applied to a micro-kernel architecture, and comprises the following steps:
a first system service process applies for a first shared memory from a micro-kernel operating system, wherein the first shared memory has a mapping relation with a user process and a virtual address space of the first system service process respectively;
the first system service process manages a first system configuration item in the first shared memory;
the first system service process receives a first request transmitted by the user process, wherein the first request is used for the user process to perform first access operation on the first system configuration item of the first system service process;
and the first system service process responds to the first request and executes the first access operation by using a function corresponding to the first system configuration item.
8. The method of claim 7, wherein the first system service process comprises: at least one service process of process management, memory management, file system management, drive management and network management.
9. The method of claim 7 or 8, wherein the first system service process managing a first system configuration item in the first shared memory comprises:
the first system service process creates entry information corresponding to the first system configuration item in the first shared memory, wherein the entry information comprises an identifier of the first system configuration item and first access interface information of the first system configuration item;
the first system service process adds the entry information in a data storage structure.
10. The method of any of claims 7 to 9, wherein the first system service process responding to the first request comprises:
and if the first request authentication is successful, the first system service process responds to the read-write request.
11. The method of claim 10, wherein the authentication of the first request is performed in the first system service process.
12. A system configuration processing method is applied to an electronic device, and comprises the following steps:
acquiring a first request, wherein the first request is used for indicating a first process to perform access processing on a system configuration item in a second process in a manner of querying a data storage structure on a shared memory, the first process is an application program in a user mode, the second process is a system program in the user mode, the shared memory has a mapping relation with virtual address spaces of the first process and the second process respectively, the data storage structure comprises an identifier of the system configuration item and interface information of the identifier of the system configuration item, and the interface information is used for communication between the first process and the second process;
and responding to the first request, and the electronic equipment executes the access processing by using a function corresponding to the system configuration item through the second process.
13. An electronic device, wherein the electronic device employs a microkernel architecture, the electronic device comprising:
an obtaining unit, configured to obtain a first request, where the first request is used for the user process to perform a first access operation on a first system configuration item provided by a first system service process;
a determining unit, configured to determine first access interface information of the first system configuration item through a first shared memory, where the first shared memory has a mapping relationship with virtual address spaces of the user process and the first system service process, respectively, and the first access interface information is used for the user process to communicate with the first system service process;
a transfer unit, configured to transfer the first request to the first system service process through the first access interface information, so that the first system service process, in response to the first request, executes the first access operation using a function corresponding to the first system configuration item.
14. The apparatus of claim 13, wherein the first system service process comprises: at least one service process of process management, memory management, file system management, drive management and network management.
15. The apparatus according to claim 13 or 14, wherein the determining unit is specifically configured to obtain a data storage structure through the first shared memory, where the data storage structure is configured to store entry information created by the first system service process, and the entry information includes an identifier of the first system configuration item and the first access interface information of the first system configuration item;
the determining unit is specifically configured to determine the first access interface information through the first request and the data storage structure.
16. The device according to claim 15, wherein the determining unit is specifically configured to query the data storage structure by invoking a file system if the first access operation is a file operation, where the first access operation includes an open operation, a read operation, a write operation, or a close operation.
17. The device according to claim 15, wherein the determining unit is specifically configured to query the data storage structure by the user process in a database mode if the first access operation is a database operation, where the database includes a key value KV or a tree, and the first access operation includes setting or obtaining.
18. The apparatus according to any one of claims 13 to 17, wherein the obtaining unit is further configured to obtain a second request, where the second request is used for the user process to perform a second access operation on a second system configuration item of a second system service process;
the determining unit is further configured to determine second access interface information of the second system configuration item through a second shared memory, where the second shared memory is mapped to virtual address spaces of the user process and the second system service process, and the second shared memory is different from the first shared memory;
the transfer unit is further configured to transfer the second request to the second system service process through the second access interface information, so that the second system service process executes the second access operation using a function corresponding to the second system configuration item in response to the second request.
19. An electronic device, wherein the electronic device employs a microkernel architecture, the electronic device comprising:
the system comprises an application unit and a processing unit, wherein the application unit is used for applying a first shared memory to a microkernel operating system, and the first shared memory has a mapping relation with a virtual address space of a user process and a virtual address space of a first system service process respectively;
a management unit, configured to manage a first system configuration item in the first shared memory;
a receiving unit, configured to receive a first request transmitted by the user process, where the first request is used for the user process to perform a first access operation on the first system configuration item of the first system service process;
and the execution unit is used for responding to the first request and executing the first access operation by using a function corresponding to the first system configuration item.
20. The apparatus of claim 19, wherein the first system service process comprises: at least one service process of process management, memory management, file system management, drive management and network management.
21. The apparatus according to claim 19 or 20, wherein the management unit is specifically configured to create entry information corresponding to the first system configuration item in the first shared memory, where the entry information includes an identifier of the first system configuration item and first access interface information of the first system configuration item;
the management unit is specifically configured to add the entry information to a data storage structure.
22. The device according to any one of claims 19 to 21, wherein the execution unit is specifically configured to, if the first request is authenticated successfully, respond to the read-write request by the first system service process.
23. The apparatus of claim 22, wherein the authentication of the first request is performed in the first system service process.
24. An electronic device, characterized in that the electronic device comprises:
an obtaining unit, configured to obtain a first request, where the first request is used to instruct a first process to perform access processing on a system configuration item in a second process by querying a data storage structure on a shared memory, the first process is an application program in a user mode, the second process is a system program in the user mode, the shared memory has a mapping relationship with virtual address spaces of the first process and the second process, the data storage structure includes an identifier of the system configuration item and interface information of the system configuration item, and the interface information is used for communication between the first process and the second process;
and the execution unit is used for responding to the first request, and the electronic equipment executes the access processing by using the function corresponding to the system configuration item through the second process.
25. A microkernel architecture, characterized in that it comprises a user process according to any of the preceding claims 1 to 6 and/or a first system service process according to any of the preceding claims 7 to 11.
26. An electronic device comprising a memory and a processor; the memory stores code, the processor is configured to execute the code, and when executed, the electronic device performs the method of any of claims 1-12.
27. A computer readable storage medium comprising computer readable instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 12.
28. A computer program product comprising computer readable instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 12.
CN202111152830.2A 2021-09-29 2021-09-29 System configuration processing method and related equipment Pending CN115878210A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111152830.2A CN115878210A (en) 2021-09-29 2021-09-29 System configuration processing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111152830.2A CN115878210A (en) 2021-09-29 2021-09-29 System configuration processing method and related equipment

Publications (1)

Publication Number Publication Date
CN115878210A true CN115878210A (en) 2023-03-31

Family

ID=85756245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111152830.2A Pending CN115878210A (en) 2021-09-29 2021-09-29 System configuration processing method and related equipment

Country Status (1)

Country Link
CN (1) CN115878210A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123265A (en) * 2013-04-26 2014-10-29 华为技术有限公司 Method and system for communication among multiple kernels
CN104216862A (en) * 2013-05-29 2014-12-17 华为技术有限公司 Method and device for communication between user process and system service
CN104572313A (en) * 2013-10-22 2015-04-29 华为技术有限公司 Inter-process communication method and device
CN105868028A (en) * 2015-01-23 2016-08-17 华为技术有限公司 Method and device for sharing data between processes, and terminal
CN107729159A (en) * 2017-09-29 2018-02-23 华为技术有限公司 The address mapping method and device of a kind of shared drive
CN109933441A (en) * 2019-02-28 2019-06-25 上海交通大学 Micro-kernel Inter-Process Communication method and system
CN111488182A (en) * 2020-04-13 2020-08-04 北京字节跳动网络技术有限公司 System configuration method, device, equipment and storage medium
CN112131018A (en) * 2020-09-17 2020-12-25 国网宁夏电力有限公司营销服务中心(国网宁夏电力有限公司计量中心) Method for rapidly communicating processes of microkernel operating system
CN113064697A (en) * 2021-04-01 2021-07-02 上海交通大学 Method for accelerating communication between microkernel processes by using multiple hardware characteristics

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123265A (en) * 2013-04-26 2014-10-29 华为技术有限公司 Method and system for communication among multiple kernels
US20160041923A1 (en) * 2013-04-26 2016-02-11 Huawei Technologies Co., Ltd. Inter-Manycore Communications Method and System
CN104216862A (en) * 2013-05-29 2014-12-17 华为技术有限公司 Method and device for communication between user process and system service
CN104572313A (en) * 2013-10-22 2015-04-29 华为技术有限公司 Inter-process communication method and device
CN105868028A (en) * 2015-01-23 2016-08-17 华为技术有限公司 Method and device for sharing data between processes, and terminal
CN107729159A (en) * 2017-09-29 2018-02-23 华为技术有限公司 The address mapping method and device of a kind of shared drive
CN109933441A (en) * 2019-02-28 2019-06-25 上海交通大学 Micro-kernel Inter-Process Communication method and system
CN111488182A (en) * 2020-04-13 2020-08-04 北京字节跳动网络技术有限公司 System configuration method, device, equipment and storage medium
CN112131018A (en) * 2020-09-17 2020-12-25 国网宁夏电力有限公司营销服务中心(国网宁夏电力有限公司计量中心) Method for rapidly communicating processes of microkernel operating system
CN113064697A (en) * 2021-04-01 2021-07-02 上海交通大学 Method for accelerating communication between microkernel processes by using multiple hardware characteristics

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
顾飞: "共享内存IPC机制的形式化验证与实现", 《中国优秀硕士学位论文全文数据库》信息科技辑, 31 October 2012 (2012-10-31), pages 138 - 2134 *

Similar Documents

Publication Publication Date Title
Chen et al. Enabling FPGAs in the cloud
CN103080912B (en) Microprocessor system and by Memory Management Unit thereon and management method
US5459867A (en) Kernels, description tables, and device drivers
US10416979B2 (en) Package installation on a host file system using a container
US9189436B2 (en) Abstracting special file interfaces to concurrently support multiple operating system levels
US10833955B2 (en) Dynamic delivery of software functions
EP3518116A1 (en) Method and apparatus for layered access of file in virtualization instance
CN101297280A (en) Configuration of isolated extensions and device drivers
CN106648462B (en) Date storage method and device
US20220261489A1 (en) Capability management method and computer device
CN113010265A (en) Pod scheduling method, scheduler, memory plug-in and system
WO2022170946A1 (en) Access control method and related apparatus
US7350210B2 (en) Generic data persistence application program interface
CN115048060B (en) Storage management method and device, electronic equipment and storage medium
CN115878210A (en) System configuration processing method and related equipment
CN113986858B (en) Linux compatible android system shared file operation method and device
CN111382136B (en) File system mirror image and file request method
CN112580086B (en) Access protection method, device and equipment for configuration file and storage medium
CN112470443B (en) Isolating a reset-directed biometric device to a remote session
US11630804B1 (en) Classifying and storing multiple layers of a file system
CN117692322B (en) Network card configuration method and device, electronic equipment and storage medium
CN116107668B (en) Application program running method and system
CN113296910B (en) File system calling method and device, terminal equipment and readable storage medium
US20240012666A1 (en) Protecting container images and runtime data
CN117435557A (en) GPU instruction stream file access method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination