Equipment IO management method based on partition operating system

By designing standardized device operation interfaces and a unified I/O management system in embedded systems, the driver and application layers are decoupled, solving the coupling problem between driver development and application development, and achieving efficient utilization of device resources and improved system performance.

CN120873056APending Publication Date: 2025-10-31SHAANXI QIANSHAN AVIONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510923059.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

In embedded software development, the excessive coupling between driver development and application development leads to low development efficiency, a lack of uniformity and flexibility in device management, difficulty in adapting to the complex and ever-changing needs of embedded systems, and insufficient cross-partition device management mechanisms, resulting in low utilization of device resources.

Method used

The design standardizes the device operation interface and unifies the I/O management system to decouple the device driver from the application layer. The I/O management system coordinates the access of multiple applications to device resources. The dynamic loading driver mechanism and mutual exclusion access mechanism are adopted to ensure efficient utilization of device resources and mutual exclusion access.

Benefits of technology

It improves the development efficiency and system flexibility of embedded software, realizes efficient management and coordination of device resources, reduces system development and maintenance costs, and adapts to the complex and ever-changing needs of embedded systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120873056A_ABST
    Figure CN120873056A_ABST
Patent Text Reader

Abstract

The invention provides an equipment IO (Input / Output) management method based on a partition operating system, which belongs to the technical field of embedded systems, and specifically comprises the following steps: in a multi-partition operating system, designing a standardized equipment operation interface, and defining a unified shared I / O (Input / Output) standard operation interface for all airborne embedded hardware peripherals; in a multi-partition operating system, a unified I / O management system is established; all airborne embedded hardware peripherals are managed; all airborne embedded application layers call all airborne embedded hardware peripherals through an API interface of a unified I / O management system, the I / O management system dynamically selects corresponding I / O interface peripherals according to the types of all the airborne embedded hardware peripherals, and the application layers indirectly access all the airborne embedded hardware peripherals through the I / O management system. And decoupling of all airborne embedded hardware peripherals and an application layer is realized. Through the processing scheme of the invention, the development efficiency of embedded software and the system flexibility are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of embedded systems, and in particular to a device I / O management method based on a partitioned operating system. Background Technology

[0002] In embedded software development, excessive coupling between driver development and application development is a common problem. In traditional driver development models, the driver's API interface is highly bound to the application layer software. When the driver's API interface changes, the application layer software needs to be recompiled and adjusted, leading to low development efficiency. Furthermore, drivers are strongly correlated with device hardware attributes, resulting in a lack of uniformity and flexibility in device management, making it difficult to adapt to the complex and ever-changing requirements of embedded systems.

[0003] In multi-partition operating systems, device driver calls become more complex. Applications on different partitions need to access devices through a unified interface, but existing technologies lack effective cross-partition device management mechanisms, resulting in low utilization of device resources and limited system performance. Summary of the Invention

[0004] In view of this, this application provides a device I / O management method based on a partitioned operating system, which solves the problems in the prior art and improves the development efficiency and system flexibility of embedded software.

[0005] This application provides a device I / O management method based on a partitioned operating system, which adopts the following technical solution: A device I / O management method based on a partitioned operating system includes the following steps: In a multi-partition operating system, design standardized device operation interfaces; Define a unified shared I / O standard operation interface for all onboard embedded hardware peripherals to achieve mutual exclusive access to peripheral resources; In a multi-partition operating system, a unified I / O management system is built to manage the drivers of all devices and coordinate the access of multiple applications to device resources. The drivers of all onboard embedded hardware peripherals in the I / O management system are independent modules. Manage all onboard embedded hardware peripherals; All onboard embedded application layers call all onboard embedded hardware peripherals through the API interface of a unified I / O management system. The I / O management system dynamically selects the corresponding I / O interface peripherals according to the type of all onboard embedded hardware peripherals. The application layer indirectly accesses all onboard embedded hardware peripherals through the I / O management system, thereby decoupling all onboard embedded hardware peripherals from the application layer.

[0006] Optionally, the process of managing all onboard embedded hardware peripherals specifically includes: After the multi-partition operating system kernel starts up, the device drivers complete the initialization of all onboard embedded hardware peripherals, and the I / O management system completes the I / O registration of each onboard embedded hardware peripheral based on the initialization results. Create device descriptors for each onboard embedded hardware peripheral based on its I / O registration ID; Device descriptors and I / O operation interfaces are attached through the I / O management system.

[0007] Optionally, in a multi-partition operating system, mutex locks can be designed for the I / O operation interfaces to achieve mutual exclusion access to each I / O standard operation interface.

[0008] Optionally, standard I / O operation interfaces include create, delete, open, close, read, write, and ioctl.

[0009] Optionally, the I / O management system uses the dm_install_drv function to complete the I / O registration of each onboard embedded hardware peripheral based on the initialization results, and at the same time, the I / O management system uses the dm_add_drv function to complete the addition and installation of hardware peripherals.

[0010] Optionally, the mutex interfaces include ipSemTake and ipSemGive.

[0011] In summary, this application includes the following beneficial technical effects: By standardizing device operation interfaces and dynamically loading driver mechanisms, driver and application decoupling is achieved, improving the development efficiency of embedded software. Based on a unified I / O management system, efficient management and coordination of device resources are realized, improving system performance. In a multi-partition operating system, cross-partition communication mechanisms and device driver sharing mechanisms enable efficient utilization of device resources, reducing system development and maintenance costs. This enhances the flexibility and maintainability of embedded systems, adapting to complex and ever-changing embedded system requirements. Attached Figure Description To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a block diagram illustrating the principle of real-time device I / O management based on a partitioned operating system in this application. Figure 2This is a flowchart illustrating the calling process of all embedded hardware peripherals in this application. Detailed Implementation

[0013] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0014] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. 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 this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0015] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this application, those skilled in the art will understand that one 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 set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.

[0016] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. The illustrations only show the components related to this application and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0017] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.

[0018] This application provides a device I / O management method based on a partitioned operating system.

[0019] like Figure 1 and Figure 2As shown, a device I / O management method based on a partitioned operating system includes the following steps: In a multi-partition operating system, design a standardized device operation interface.

[0020] Define a unified shared I / O standard operation interface for all onboard embedded hardware peripherals to achieve mutual exclusive access to peripheral resources.

[0021] Design standardized interfaces, such as create, delete, open, close, read, write, and ioctl. These interfaces are called in a unified manner at the application layer, while the specific device implementation details are handled by the driver layer. By abstracting the device model, the hardware characteristics of different devices are abstracted into a unified device model, enabling drivers to interact with devices in a consistent manner.

[0022] In a multi-partition operating system, a unified I / O management system is established to manage all device drivers and coordinate access to device resources by multiple applications. Within the I / O management system, the drivers for all onboard embedded hardware peripherals are independent modules. The I / O management system is responsible for managing all device drivers, including device initialization, configuration, and status monitoring. The application layer indirectly accesses devices through the I / O management system. The I / O management system also coordinates access to device resources by multiple applications, ensuring efficient utilization and mutual exclusion of device access.

[0023] Manage all onboard embedded hardware peripherals.

[0024] All onboard embedded application layers call all onboard embedded hardware peripherals through the API interface of a unified I / O management system, without needing to concern themselves with the specific implementation details of the devices. The I / O management system dynamically selects the appropriate I / O interface peripheral based on the type of all onboard embedded hardware peripherals. The application layer does not need to directly call the driver; instead, it indirectly accesses all onboard embedded hardware peripherals through the I / O management system, thus decoupling all onboard embedded hardware peripherals from the application layer.

[0025] In one specific embodiment, the system architecture includes a device driver layer, an I / O management system, and an application layer. The device driver layer is responsible for the hardware operations of specific devices, the I / O management system is responsible for the unified management and scheduling of devices, and the application layer accesses devices through a unified API interface. Each device driver is designed as an independent module, supporting dynamic loading and unloading. When hardware changes, only the corresponding driver module needs to be updated, without recompiling the entire system. Drivers register their supported device types and interfaces with the I / O management system through a registration mechanism, and the application layer obtains a list of available devices by querying the I / O management system. The application layer accesses devices by calling the I / O management system's API interface. The I / O management system dynamically selects the appropriate driver based on the device type and passes the device operation request to the device driver layer. After completing the specific hardware operation, the device driver layer returns the result to the I / O management system, which ultimately passes it to the application layer. The application layer calls the device through the unified API interface without needing to concern itself with the specific implementation details of the device; the I / O management system dynamically selects the appropriate driver based on the device type. The application layer does not need to directly call the driver but accesses the device indirectly through the I / O management system, thus achieving decoupling between the driver and the application. In a multi-partition operating system, the device driver is shared by multiple partitions. Applications in different partitions access the device through a unified I / O interface. The I / O management system is responsible for coordinating access to device resources to ensure efficient utilization of the device.

[0026] This application achieves decoupling between device drivers and the application layer by designing standardized device operation interfaces, dynamic driver loading mechanisms, and cross-partition device management mechanisms, thereby improving the development efficiency and system flexibility of embedded software.

[0027] In this embodiment of the application, an efficient cross-partition communication mechanism is designed in a multi-partition operating system, enabling applications on different partitions to access devices through a unified I / O interface. Device drivers can be shared across multiple partitions, avoiding redundant development and resource waste.

[0028] The process of managing all onboard embedded hardware peripherals specifically includes: After the multi-partition operating system kernel boots up, the device drivers initialize all onboard embedded hardware peripherals. The I / O management system registers the I / O of each onboard embedded hardware peripheral based on the initialization results. It then creates device descriptors for each peripheral based on its I / O registration ID and attaches the device descriptors and I / O operation interfaces through the I / O management system.

[0029] The standard I / O operation interfaces include create, delete, open, close, read, write, and ioctl.

[0030] Based on the initialization results, the I / O management system uses the dm_install_drv function to complete the I / O registration of each onboard embedded hardware peripheral. At the same time, the I / O management system uses the dm_add_drv function to add and install hardware peripherals.

[0031] In a multi-partition operating system, mutex locks are designed for the I / O operation interfaces to achieve mutual exclusion access to each standard I / O operation interface.

[0032] The mutex interfaces include ipSemTake and ipSemGive. Setting a mutex interface ensures that driver resources are used by only one partition at a time, guaranteeing the correctness of accessing or manipulating driver hardware resources.

[0033] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A device I / O management method based on a partitioned operating system, characterized in that, Includes the following steps: In a multi-partition operating system, design standardized device operation interfaces; Define a unified shared I / O standard operation interface for all onboard embedded hardware peripherals to achieve mutual exclusive access to peripheral resources; In a multi-partition operating system, a unified I / O management system is built to manage the drivers of all devices and coordinate the access of multiple applications to device resources. The drivers of all onboard embedded hardware peripherals in the I / O management system are independent modules. Manage all onboard embedded hardware peripherals; All onboard embedded application layers call all onboard embedded hardware peripherals through the API interface of a unified I / O management system. The I / O management system dynamically selects the corresponding I / O interface peripherals according to the type of all onboard embedded hardware peripherals. The application layer indirectly accesses all onboard embedded hardware peripherals through the I / O management system, thereby decoupling all onboard embedded hardware peripherals from the application layer.

2. The device I / O management method based on a partitioned operating system according to claim 1, characterized in that, The process of managing all onboard embedded hardware peripherals specifically includes: After the multi-partition operating system kernel starts up, the device drivers complete the initialization of all onboard embedded hardware peripherals, and the I / O management system completes the I / O registration of each onboard embedded hardware peripheral based on the initialization results. Create device descriptors for each onboard embedded hardware peripheral based on its I / O registration ID; Device descriptors and I / O operation interfaces are attached through the I / O management system.

3. The device I / O management method based on a partitioned operating system according to claim 1, characterized in that, In a multi-partition operating system, mutex locks are designed for the I / O operation interfaces to achieve mutual exclusion access to each standard I / O operation interface.

4. The device I / O management method based on a partitioned operating system according to claim 1, characterized in that, The standard I / O operation interfaces include create, delete, open, close, read, write, and ioctl.

5. The device I / O management method based on a partitioned operating system according to claim 1, characterized in that, Based on the initialization results, the I / O management system uses the dm_install_drv function to complete the I / O registration of each onboard embedded hardware peripheral. At the same time, the I / O management system uses the dm_add_drv function to add and install hardware peripherals.

6. The device I / O management method based on a partitioned operating system according to claim 1, characterized in that, The mutex interfaces include ipSemTake and ipSemGive.