An interface for servicing partitioned operating system device sharing

By designing an interface definition method for the server and virtual device stub drivers in a partitioned operating system, the problem of inconvenient partitioned device sharing in existing technologies is solved, and efficient device sharing and information security extension are achieved.

CN116107645BActive Publication Date: 2025-10-21XIAN AVIATION COMPUTING TECH RES INST OF AVIATION IND CORP OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211613966.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-15
Publication Date
2025-10-21
Estimated Expiration
2042-12-15

AI Technical Summary

Technical Problem

Existing methods for defining partitioned operating system device sharing interfaces do not support convenient and efficient use of partitioned device sharing functionality by users.

Method used

In the partitioned operating system, an interface definition method and process for device sharing in the partitioned operating system were designed. By setting server-side device stub drivers in the service partition and virtual device stub drivers in the client partition, device sharing management and data interaction between partitions are realized.

Benefits of technology

It supports users in using the partition device sharing function conveniently and efficiently, increases the amount of data exchanged, and provides support for the expansion of subsequent information security functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116107645B_ABST
    Figure CN116107645B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of computer system software, and particularly relates to an interface for serving partition operating system device sharing, and proposes a partition operating system device sharing interface definition method and a process organization method, which can support convenient and efficient use of partition device sharing functions by users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer system software, and in particular relates to an interface serving for device sharing of a partitioned operating system. Background Art

[0002] Integrated and modular avionics (IMA) systems integrate multiple application systems into high-speed computers, improving system energy efficiency through resource sharing. The trend toward integrated aviation systems has led to widespread adoption of partitioned operating systems (OSs) that meet the ARINC 653 standard and are the primary embedded real-time operating system (RTOS) used in IMA systems. In some user-designed systems, multiple partitions need to access the same device. To address this issue, given the mutually exclusive nature of partitioned devices in multi-core operating systems, device drivers are typically placed in a service partition. Other partitions, acting as client partitions, exchange requests with the shared service partition via port communication.

[0003] The existing interface definition method for device sharing of a partition operating system does not support users to use the partition device sharing function conveniently and efficiently. Summary of the Invention

[0004] In view of this, the present invention provides an interface serving partition operating system device sharing, and proposes an interface definition method and process organization method for designing partition operating system device sharing when sharing devices in a partition operating system, which can support users to use the partition device sharing function conveniently and efficiently.

[0005] In order to achieve the above technical objectives, the specific technical solutions adopted by the present invention are:

[0006] An interface for device sharing in a partitioned operating system. The device sharing mode of the partitioned operating system is as follows: a server-side device stub driver is set in the service partition, and the server-side device stub driver is used to manage the partition-shared devices and interact with real physical devices; a virtual device stub driver is set in the client partition, and the virtual device stub driver is used to implement the interaction between the client partition's shared device management and the service partition;

[0007] The process of the client partition accessing the real device in the service partition is as follows: the user program of the client partition exchanges data with the virtual device stub driver, and the virtual device stub driver communicates with the partition shared device management in the service partition through the inter-partition communication mechanism; the partition device shared management processes the data and then communicates with the server device stub driver, and then communicates with the real device through the server device stub driver;

[0008] The server-side device stub driver is provided with: a message callback processing interface for lost message processing during server-side shared device message processing, a server-side shared device message reading processing interface, and a server-side shared device message writing processing interface;

[0009] The input parameters of the lost message callback processing interface of the server-side shared device message processing process include: the original destination partition number of the lost message, the message type code, the message buffer starting address, the original message sending length and the error return value of the sending failure;

[0010] The output parameters of the server-side shared device reading device message processing interface include: message destination partition number, message type code, actual length of this message and return value after calling; the input parameters of the server-side shared device reading device message processing interface include: message buffer starting address and maximum length of sent message;

[0011] The output parameters of the server-side shared device message writing processing interface include: the return value after this call; the input parameters of the server-side shared device message writing processing interface include: the partition number of the message source, the message type code, the message buffer start address and the actual length of this message;

[0012] The virtual device stub driver is provided with: a client shared device message processing process lost message callback processing interface, a client shared device read device message processing interface and a client shared device message write processing interface;

[0013] The input parameters of the lost message callback processing interface of the client shared device message processing process include: global shared device number, message type code, message buffer starting address, received original message length and reception failure error return value;

[0014] The output parameters of the client-side shared device read device message processing interface include: message type code, actual length of this message and return value after calling; the input parameters of the client-side shared device read device message processing interface include: global shared device number, message buffer starting address and maximum length of sent message;

[0015] The output parameters of the client shared device message writing processing interface include: the return value after this call; the input parameters of the client shared device message writing processing interface include: the global shared device number, message type code, message buffer starting address and the actual length of this message.

[0016] Furthermore, if the message callback processing interface of the server-side shared device message processing process loses and needs to use the default print error interface, the hook parameter is passed in as NULL;

[0017] The message type codes include: read, write, control and other user-defined types.

[0018] Furthermore, if the client shared device message processing process loses the message callback processing interface and needs to use the default mounted print error interface, the mounting parameter is passed in as NULL.

[0019] Furthermore, when the client shared device reads the device message processing interface successfully receives the data sent by the service partition, it returns the read message length. If the reception fails, it returns an error code. If the requested message is not received, it returns 0.

[0020] Furthermore, if the client shared device message writing processing interface successfully sends the message to the service partition, SUCCESS is returned; if the sending fails, an error code is returned.

[0021] Furthermore, the status of the error code includes:

[0022] The global shared device number is out of range;

[0023] The port is not linked. The port of the service partition is not connected. The port of the client partition is not initialized correctly. Please check the configuration of the port and channel.

[0024] The message is too long. The maximum length of the received message bytes entered by the user is less than the length of the message.

[0025] There is no suitable lock, and the internal mutex lock cannot be acquired. Please check whether the partition device management is initialized correctly;

[0026] There is no available buffer space, the global number of the shared device passed in by the user is incorrect, or the device buffer is not initialized correctly. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0028] Figure 1 The diagram is a schematic diagram of shared device access within a partition by an interface serving device sharing of a partition operating system in a specific embodiment of the present invention. DETAILED DESCRIPTION

[0029] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0030] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.

[0031] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on this disclosure, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement an apparatus and / or practice a method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this apparatus and / or practice this method.

[0032] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The illustrations only show components related to the present disclosure and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.

[0033] Additionally, in the following description, specific details are provided to provide a thorough understanding of the examples. However, one skilled in the art will appreciate that the aspects described can be practiced without these specific details.

[0034] In the partition operating system that complies with the ARINC653 standard, the shared access mode of the devices in the partition is that when the client partition needs to access the real devices in the service partition, they all indirectly access the devices through the virtual shared device driver, and the information communication between them is realized through the inter-partition communication mechanism that complies with the standard to realize data transmission. Here we encapsulate the inter-partition communication function and attach it to the device management in the partition as a device access driver to realize the access of shared devices between partitions, such as Figure 1This mode unifies device access modes and increases the amount of data exchanged between devices accessing partitions. The operating system provides this device access mode to extend support for subsequent information security features.

[0035] The present invention provides a definition of an interface serving for device sharing of a partition operating system, which can support users in using the partition device sharing function conveniently and efficiently.

[0036] In one embodiment of the present invention, an interface for device sharing in a partitioned operating system is provided. The device sharing mode of the partitioned operating system is as follows: a server-side device stub driver is set in the service partition, and the server-side device stub driver is used to manage the partition shared devices and interact with the real physical devices; a virtual device stub driver is set in the client partition, and the virtual device stub driver is used to implement the interaction between the client partition shared device management and the service partition;

[0037] The process of client partition accessing real devices in the service partition is as follows: the user program in the client partition exchanges data with the virtual device stub driver, which communicates with the partition shared device management in the service partition through the inter-partition communication mechanism; the partition device shared management processes the data and then communicates with the server device stub driver, which then communicates with the real device through the server device stub driver.

[0038] The server-side device stub driver is set up with: a message callback processing interface for lost message processing during server-side shared device message processing, a server-side shared device message reading processing interface, and a server-side shared device message writing processing interface;

[0039] The input parameters of the lost message callback processing interface of the server-side shared device message processing process include: the original destination partition number of the lost message, the message type code, the message buffer start address, the original message sending length and the error return value of the sending failure;

[0040] The output parameters of the server-side shared device reading device message processing interface include: message destination partition number, message type code, actual length of this message and return value after calling; the input parameters of the server-side shared device reading device message processing interface include: message buffer starting address and maximum length of sent message;

[0041] The output parameters of the server-side shared device message writing processing interface include: the return value after this call; the input parameters of the server-side shared device message writing processing interface include: the partition number of the message source, the message type code, the message buffer start address and the actual length of this message;

[0042] The virtual device stub driver is provided with: a client shared device message processing process lost message callback processing interface, a client shared device read device message processing interface and a client shared device message write processing interface;

[0043] The input parameters of the lost message callback processing interface in the client shared device message processing process include: global shared device number, message type code, message buffer start address, received original message length and reception failure error return value;

[0044] The output parameters of the client-side shared device read device message processing interface include: message type code, actual length of this message and return value after calling; the input parameters of the client-side shared device read device message processing interface include: global shared device number, message buffer starting address and maximum length of sent message;

[0045] The output parameters of the client shared device message writing processing interface include: the return value after this call; the input parameters of the client shared device message writing processing interface include: the global shared device number, message type code, message buffer starting address and the actual length of this message.

[0046] In this embodiment, if the server-side shared device message processing process loses the message callback processing interface and needs to use the default hooked print error interface, the hook parameter is passed in as NULL;

[0047] Message type encoding types include: read, write, control and other custom types.

[0048] In this embodiment, if the client shared device message processing process loses the message callback processing interface and needs to use the default mounted print error interface, the mounting parameter is passed in as NULL.

[0049] In this embodiment, when the client shared device reads the device message processing interface successfully receives data sent by the service partition, it returns the read message length; if reception fails, it returns an error code; if no requested message is received, it returns 0.

[0050] In this embodiment, if the client shared device message writing processing interface successfully sends the message to the service partition, SUCCESS is returned; if the sending fails, an error code is returned.

[0051] In this embodiment, the error code status includes:

[0052] The global shared device number is out of range;

[0053] The port is not linked. The port of the service partition is not connected. The port of the client partition is not initialized correctly. Please check the configuration of the port and channel.

[0054] The message is too long. The maximum length of the received message bytes entered by the user is less than the length of the message.

[0055] There is no suitable lock, and the internal mutex lock cannot be acquired. Please check whether the partition device management is initialized correctly;

[0056] There is no available buffer space, the global number of the shared device passed in by the user is incorrect, or the device buffer is not initialized correctly.

[0057] The service of this embodiment is used to install the partition device sharing service partition device driver. On the partition device sharing server, three types of service interface content are installed, including the server-side shared device message processing process lost message callback processing interface, the server-side shared device message reading processing interface, and the server-side shared device message writing processing interface. The specific requirements of the three interfaces are as follows:

[0058] (1) The message callback processing interface of the server-side shared device message processing process includes the input parameters: the original destination partition number of the lost message, the message type code, the message buffer starting address, the original message sending length and the error return value of the sending failure.

[0059] It should be noted that the message callback processing interface for the server-side shared device message processing process is lost and NULL can be passed in if it is not needed. The system will use the default printing error interface.

[0060] It should be noted that the server-side shared device message processing process lost message callback processing can be turned on or off through the system message processing process lost processing open and close interface to select whether to turn on or off the lost message processing.

[0061] It should be noted that message type codes include read, write, control, and other custom types.

[0062] (2) The server-side shared device reads the device message processing interface, including output parameters: message destination partition number, message type code, actual length of this message and return value after calling; including input parameters: message buffer starting address, maximum length of sent message.

[0063] (3) The server-side shared device message writing processing interface includes output parameters: the return value after this call; and input parameters: the partition number of the message source, the message type code, the message buffer start address, and the actual length of this message.

[0064] The device sharing client includes three types of service interfaces: a callback processing interface for lost messages during the client-side shared device message processing process, an interface for reading device messages from a client-side shared device, and an interface for writing shared device messages. The specific requirements for these three interfaces are as follows:

[0065] (1) The client shared device message processing process loses the message callback processing interface, including the input parameter content: global shared device number, message type code, message buffer start address, received original message length and reception failure error return value.

[0066] It should be noted that the message callback processing interface for the client-side shared device message processing process is a user-installed interface. If it is not needed, NULL can be passed in and the system will use the default printing error interface.

[0067] (2) The client shared device reads the device message processing interface, including output parameters: message type code, actual length of this message and return value after calling; including input parameters: global shared device number, message buffer starting address, and maximum length of sent message.

[0068] It should be noted that if the data sent by the service partition is successfully received, the read message length will be returned. If the reception fails, an error code will be returned, and 0 will be returned if there is no requested message.

[0069] (3) The client shared device message writing processing interface includes output parameters: the return value after this call; and input parameters: the global shared device number, the message type code, the message buffer starting address, and the actual length of this message.

[0070] It should be noted that if the message is successfully sent to the service partition, SUCCESS is returned. If the message fails, an error code is returned. The error code of the client service includes the following status conditions:

[0071] ENOTSUP: The global shared device number is out of range;

[0072] ENOTCONN: The port is not linked. The port of the IO service partition is not connected. The port of the client partition is not initialized correctly. Please check the configuration of the port and channel.

[0073] EMSGSIZE: The message is too long. The maximum length of the received message bytes entered by the user is less than the length of the message.

[0074] ENOLCK: There is no suitable lock, and the internal mutex lock cannot be acquired. Please check whether the partition device management is initialized correctly;

[0075] ENOBUFS: There is no available buffer space, the shared device global number passed in by the user is incorrect, or the device buffer is not initialized correctly.

[0076] The following uses three partitions as an example. In the partition configuration, configure partition 1 as a shared service partition for partitioned devices, and partitions 2 and 3 as client partitions. The method includes:

[0077] Step 101: In the development environment provided by the ARINC 653 standard partition operating system, the configuration of partition 1 in the project is set as a service partition, and the configurations of partitions 2 and 3 are set as client partitions;

[0078] Step 102: The operating system configures the service partition and the client partition and establishes a communication connection between them;

[0079] Step 103: Partition 1, as a device sharing service partition, installs a server-side shared device message processing lost message callback processing interface, a server-side shared device message reading processing interface, and a server-side shared device message writing processing interface for a specific global shared device through the operating system service partition device sharing installation interface;

[0080] Step 104: Partition 2 and partition 3 are used as device-sharing client partitions through the operating system service partition device sharing installation interface, including the client-side shared device message processing process lost message callback processing interface, the client-side shared device read device message processing interface and the client-side shared device message write processing interface.

[0081] Step 105: Partition 1, as the device sharing service partition, reads the device message processing interface through the installed stub function interface server-side shared device, and distributes the message to each destination partition 2 or partition 3 after reading the message.

[0082] Step 106: Partition 1 transmits the device request data received from partitions 2 and 3 to the mounted server device driver through the virtual driver server shared device message writing processing interface installed by the partition device sharing server.

[0083] Step 107: Partition 2 and partition 3 serve as device-sharing client partitions and read the device message processing interface through the installed virtual driver function interface client-side shared device to receive data distributed by the service partition.

[0084] Step 108: Partition 2 and partition 3 send device request data to partition 1 through the installed virtual driver function interface client shared device message write processing interface.

[0085] This embodiment proposes an interface definition method and a process organization method for device sharing in a partition operating system when sharing devices in the partition operating system, which can support users to use the partition device sharing function conveniently and efficiently.

[0086] The above description is merely a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this disclosure should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.

Claims

1. An interface serving device sharing of a partitioned operating system, characterized in that: The device sharing mode of the partition operating system is as follows: a server-side device stub driver is set in the service partition, and the server-side device stub driver is used to manage the partition shared devices and interact with the real physical devices; a virtual device stub driver is set in the client partition, and the virtual device stub driver is used to realize the interaction between the client partition shared device management and the service partition; The process of the client partition accessing the real device in the service partition is as follows: the user program of the client partition exchanges data with the virtual device stub driver, and the virtual device stub driver communicates with the partition shared device management in the service partition through the inter-partition communication mechanism; the partition device shared management processes the data and then communicates with the server device stub driver, and then communicates with the real device through the server device stub driver; The server-side device stub driver is provided with: a message callback processing interface for lost message processing during server-side shared device message processing, a server-side shared device message reading processing interface, and a server-side shared device message writing processing interface; The input parameters of the lost message callback processing interface of the server-side shared device message processing process include: the original destination partition number of the lost message, the message type code, the message buffer starting address, the original message sending length and the error return value of the sending failure; The output parameters of the server-side shared device reading device message processing interface include: message destination partition number, message type code, actual length of this message and return value after calling; the input parameters of the server-side shared device reading device message processing interface include: message buffer starting address and maximum length of sent message; The output parameters of the server-side shared device message writing processing interface include: the return value after this call; the input parameters of the server-side shared device message writing processing interface include: the partition number of the message source, the message type code, the message buffer start address and the actual length of this message; The virtual device stub driver is provided with: a client shared device message processing process lost message callback processing interface, a client shared device read device message processing interface and a client shared device message write processing interface; The input parameters of the lost message callback processing interface of the client shared device message processing process include: global shared device number, message type code, message buffer starting address, received original message length and reception failure error return value; The output parameters of the client-side shared device read device message processing interface include: message type code, actual length of this message and return value after calling; the input parameters of the client-side shared device read device message processing interface include: global shared device number, message buffer starting address and maximum length of sent message; The output parameters of the client shared device message write processing interface include: the return value after this call; the input parameters of the client shared device message write processing interface include: the global shared device number, the message type code, the message buffer starting address and the actual length of this message, among which the message type code types include: read, write, control and other custom types.

2. The interface serving partition operating system device sharing according to claim 1, characterized in that: If the message callback processing interface of the server-side shared device message processing process needs to use the default printing error interface, the hook parameter is passed in as NULL.

3. The interface serving partition operating system device sharing according to claim 2, characterized in that: If the client shared device message processing process loses the message callback processing interface and needs to use the default print error interface, the hook parameter is passed in as NULL.

4. The interface serving partition operating system device sharing according to claim 3, characterized in that: When the client shared device reads the device message processing interface successfully receives the data sent by the service partition, it returns the read message length. If the reception fails, it returns an error code. If the requested message is not received, it returns 0.

5. The interface serving partition operating system device sharing according to claim 4, characterized in that: If the client shared device message write processing interface successfully sends the message to the service partition, it returns SUCCESS; if the sending fails, it returns an error code.

6. The interface serving partition operating system device sharing according to claim 5, characterized in that: The error code status includes: The global shared device number is out of range; The port is not linked. The port of the service partition is not connected. The port of the client partition is not initialized correctly. Please check the configuration of the port and channel. The message is too long. The maximum length of the received message bytes entered by the user is less than the length of the message. There is no suitable lock, and the internal mutex lock cannot be acquired. Please check whether the partition device management is initialized correctly; There is no available buffer space, the global number of the shared device passed in by the user is incorrect, or the device buffer is not initialized correctly.

Citation Information

Patent Citations

  • FC network communication device and method applied to ARINC653 operating system partitions

    CN110995668A