A memory sharing method satisfying arinc 653 standard
By defining a common page directory and page tables in the partitioned operating system, memory sharing under the ARINC653 standard is achieved, solving the problems of complex partitioned access control and wasted space, and simplifying memory management.
Patent Information
- Application Number
- CN202311829239.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2043-12-27
AI Technical Summary
In partitioned operating systems, access control for multiple partitions to the same memory space is complex and difficult to manage. Traditional page table management methods lead to wasted space and difficulty in maintaining data consistency.
The kernel defines the common page directory and page tables, and memory sharing is achieved by copying the common page directory, ensuring that each partition and the kernel can access the shared memory, and configuring read and write access permissions.
Sharing memory space without changing the page table size simplifies management, avoids wasted space, and improves data consistency and access control efficiency.
Smart Images

Figure CN117851295B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer architecture, and particularly relates to a memory sharing method meeting the ARINC653 standard. BACKGROUND
[0002] Integrated Modular Avionics (IMA) integrates multiple application systems into a computer with high-speed processing capability, and a partitioned operating system is a main embedded real-time operating system adopted by IMA. In order to ensure determinacy and robustness, partitions in the partitioned operating system are isolated from each other in space. In some user-designed systems, multiple partitions need to access the same space to achieve the purpose of data sharing. The traditional way is that each partition separately maintains a page table for the space, so that the access control of the same physical space is realized by multiple page tables, the control is relatively complex, the space occupied by the management of the page tables is relatively large, and the maintenance of data consistency is more difficult.
[0003] Based on the above requirements, in order to meet the data sharing between the partitions and the kernel, a simple shared memory mechanism needs to be implemented to meet the user's data sharing requirements, so that the user can use it more simply and conveniently. SUMMARY
[0004] Therefore, the embodiments of the present application provide a memory sharing method meeting the ARINC653 standard, which solves the space sharing requirement between the partitions and the kernel in the partitioned operating system.
[0005] The embodiments of the present application provide the following technical solutions: a memory sharing method meeting the ARINC653 standard, which is used for memory sharing between the partitions in the core state and the user state, and includes the following steps: defining a group of common page directories and page tables by the core state; copying only the common page directories to all members needing to access the shared memory; and adding read-write access permissions of the page tables to all members needing to access the shared memory, so that all members needing to access the shared memory can access the page tables.
[0006] Further, the content of the common page directory includes page tables of all address spaces accessible by the core state, and the page table attributes are configured with read-write access permissions of the system state and the user state according to user requirements.
[0007] Further, all members needing to access the shared memory refer to the kernel of the core state and each partition of the user state.
[0008] Further, the page table records read-write access control attributes of the shared memory.
[0009] Further, the page directories in each partition of the user state include the common page directory and a private page directory, and the page table space corresponding to the private page directory can only be accessed by the corresponding partition of the private page directory.
[0010] Compared with the prior art, the technical scheme adopted by the embodiment of the present specification can achieve at least the following beneficial effects: by using the public page directory copying technology, the sharing of memory space is realized without changing the size of the original page table, and a simple and effective organization and management method is provided for the implementation of shared memory for partition operating systems, thereby avoiding unnecessary space waste. BRIEF DESCRIPTION OF DRAWINGS
[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description only constitute some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0012] Figure 1 is a schematic diagram of user mode and kernel mode memory sharing. DETAILED DESCRIPTION
[0013] The embodiments of the present application will be described in detail below with reference to the drawings.
[0014] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.
[0015] As shown in Figure 1 , the present application provides a memory sharing method meeting the ARINC653 standard, specifically:
[0016] The present application defines a set of public page directories, and the read and write access permissions of the page table in the public page directory determine whether the page space is a shared space, that is, the space containing both user mode read and write permissions and system mode read and write permissions is a shared memory space, and the space containing only system mode read and write permissions and user mode read and write permissions is a non-shared memory space.
[0017] The page directory content of the kernel and each partition contains a copy of the public page directory. For the kernel, the page directory content is consistent with the public page directory content; for the partition, the page directory content contains not only the content in the public page directory, but also its own private page directory content.
[0018] The sharing of memory space is realized through the public page directory and the corresponding page table. There are multiple copies of the public page directory, and there is only one copy of the page table in the public page directory. The kernel and each partition can access the page table where the shared memory is located through the public page directory content in their own page directory, thereby achieving the purpose of accessing the shared memory.
[0019] The detailed description is as follows:
[0020] Configure a memory space as a shared memory space in a configuration tool provided by a partition operating system meeting the ARINC653 standard, the shared memory space is named shareMem, the corresponding virtual address of the space is 0x0, the corresponding physical address of the space is 0x0, the size of the space is 0x1000000 bytes (16MB), and the read-write access permission of the space is user state readable and writable and system state readable and writable. Meanwhile, two partitions are configured, which are partition 1 and partition 2, and the two partitions and the core need to be able to access the shareMem space.
[0021] The core operating system performs MMU initialization, allocates space for the public page directory, the core page directory and the page directory of each partition, and completes the mapping of the page table in the public page directory according to the configuration, and copies the content in the public page directory to the page directory space of the core. At this time, the shareMem space has completed the mapping of the page table, and the page table of shareMem can be accessed through the public page directory and the core page directory.
[0022] According to the configuration, partition 1 is created and started, and in the process of creating partition 1, the space of partition 1 is established, and when the space is established, the public page directory is copied first, and then the establishment of the private space of partition 1 is completed. At this time, the shareMem space can be accessed by the core operating system and partition 1.
[0023] According to the configuration, partition 2 is created and started, and in the process of creating partition 2, the space of partition 2 is established, and when the space is established, the public page directory is copied first, and then the establishment of the private space of partition 2 is completed. At this time, the shareMem space can be accessed by the core operating system, partition 1 and partition 2.
[0024] At this time, the core operating system and the partitions can access shareMem, and the purpose of memory sharing is achieved.
[0025] The above is only a specific embodiment of the present application, which cannot limit the scope of the application. Therefore, the replacement of equivalent components or equivalent changes and modifications made within the scope of the present application should still be within the scope of the present patent. In addition, the technical features in the present application can be freely combined with each other, and the technical features can be freely combined with each other.
Claims
1. A memory sharing method satisfying the ARINC 653 standard, for memory sharing between each partition of a kernel mode and a user mode, characterized by, The method comprises the following steps: The core state defines a set of common page directories and page tables, the common page directories have multiple copies, the page tables have only one copy, the kernel and each partition can access the unique page table where the shared memory is located through the common page directory content in their own page directories, and the page table records the read-write access control attributes of the shared memory; Only the common page directories are copied to all members that need to access the shared memory, and the members that need to access the shared memory refer to the kernel of the core state and each partition of the user state; The read-write access permissions corresponding to the page table are added to all members that need to access the shared memory, so that all members that need to access the shared memory can access the page table, and the page directory in each partition of the user state contains not only the copied common page directory, but also a private page directory that can only be accessed by the corresponding partition.
2. The memory sharing method satisfying the ARINC 653 standard according to claim 1, wherein, The common page directory content contains the page tables of all address spaces that can be accessed by the core state, and the page table attributes are configured according to the read-write access permissions of the system state and the user state according to user demand.
3. The memory sharing method satisfying the ARINC 653 standard according to claim 1, wherein, The page table records the read-write access control attributes of the shared memory.
Citation Information
Patent Citations
Storage management method for partition operating system
CN104391803A
Method and device for determining global page directory, electronic equipment and storage medium
CN114327777A