A container management method and device, computer equipment and storage medium
Patent Information
- Application Number
- CN202211642093.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2042-12-20
AI Technical Summary
[0003]本发明实施例提供一种容器管理方法、装置、计算机设备及存储介质,以解决任务关键型领域向云原生、DevOps等进行转型的需求,在资源小且实时性要求高的领域提供了容器引擎的实现方案
[0029]本发明实施例提供了一种容器管理方法,首先接收用户在用户态容器管理应用上提供的容器管理命令,然后基于该容器管理命令调用内核态容器管理设备,并将该容器管理命令转变为ioctl命令,再通过内核态容器管理设备根据该ioctl命令对目标容器进行控制,并向用户态容器管理应用返回操作结果。本发明实施例所提供的容器管理方法,提出了适合于实时操作系统下的容器引擎实现的框架,采用“应用+设备”的方式实现容器的管理引擎,使得所需的硬件成本更低,在嵌入式领域常用的低算力、小内存设备(如ARM9@300MHz+16MBRAM)上也可以实现面向云原生、DevOps的方案,而且结构简单,维护成本更低,执行效率更高。
Smart Images

Figure CN116302310B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer container technology, and in particular to a container management method, apparatus, computer device, and storage medium. Background Technology
[0002] Unlike internet technologies, mission-critical domains have consistently struggled to improve productivity through more efficient R&D-test-deployment methods. Because of the lack of foundational software, many industrial production sectors still rely on the waterfall model for development, which is inefficient and hinders the transition to cloud-native and DevOps approaches. Current mainstream container engines like Docker employ a typical client / server architecture. The Docker client provides application-level access commands, and container management is achieved through communication between the client and the Docker daemon. This container management approach is costly, consumes significant system resources, is complex, and inefficient, making it unsuitable for real-time operating systems. Summary of the Invention
[0003] This invention provides a container management method, apparatus, computer device, and storage medium to address the need for mission-critical domains to transform to cloud-native and DevOps approaches, and provides a container engine implementation solution for domains with limited resources and high real-time requirements.
[0004] In a first aspect, embodiments of the present invention provide a container management method, the method comprising:
[0005] Receive container management commands provided by the user in the user-space container management application;
[0006] The container management command is used to invoke the kernel-mode container management device and is then converted into an ioctl command.
[0007] The kernel-mode container management device controls the target container according to the ioctl command and returns the operation result to the user-mode container management application.
[0008] Optionally, before receiving container management commands provided by the user on the user-space container management application, the method further includes:
[0009] Load the module file for the kernel-mode container management device;
[0010] Start the user-space container management application to enable the kernel-space container management device to function.
[0011] Request relevant system resources;
[0012] Accordingly, after controlling the target container via the kernel-mode container management device according to the ioctl command and returning the operation result to the user-mode container management application, the method further includes:
[0013] Release the system resources.
[0014] Optionally, the user-mode container management application and the kernel-mode container management device are developed using the C / C++ language.
[0015] Optionally, the kernel-mode container management device encapsulates a container management API interface containing real-time operating system content, used to provide the ioctl command, change the state of the target container, and return the operation result.
[0016] Optionally, the ioctl commands include: commands to install a container, commands to obtain a list of containers in the system, commands to start a container, commands to stop a container, commands to query container configuration, and commands to query container status; the ioctl commands conform to the OCI Runtime standard requirements.
[0017] Optionally, the user-space container management application supports the management of container images of the OCI image standard, including pull operations, unpacking operations, loading operations, and saving operations.
[0018] Optionally, returning the operation result to the user-space container management application includes:
[0019] The operation result is returned to the user-mode container management application in a synchronous or asynchronous manner.
[0020] Secondly, embodiments of the present invention also provide a container management device, the device comprising:
[0021] The command receiving module is used to receive container management commands provided by users on user-space container management applications;
[0022] The command translation module is used to invoke the kernel-mode container management device based on the container management command, and to translate the container management command into an ioctl command;
[0023] The command execution module is used to control the target container through the kernel-mode container management device according to the ioctl command, and return the operation result to the user-mode container management application.
[0024] Thirdly, embodiments of the present invention also provide a computer device, the computer device comprising:
[0025] One or more processors;
[0026] Memory, used to store one or more programs;
[0027] When the one or more programs are executed by the one or more processors, the one or more processors implement the container management method provided in any embodiment of the present invention.
[0028] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the container management method provided in any embodiment of the present invention.
[0029] This invention provides a container management method. First, it receives a container management command provided by a user in a user-space container management application. Then, it invokes a kernel-space container management device based on the command, converting the command into an ioctl command. The kernel-space container management device then controls the target container according to the ioctl command and returns the operation result to the user-space container management application. This invention proposes a framework suitable for implementing a container engine under a real-time operating system. It adopts an "application + device" approach to implement the container management engine, resulting in lower hardware costs. It can also implement cloud-native and DevOps solutions on low-computing-power, low-memory devices commonly used in embedded systems (such as ARM9@300MHz + 16MBRAM). Furthermore, it has a simple structure, lower maintenance costs, and higher execution efficiency. Attached Figure Description
[0030] Figure 1 A flowchart of the container management method provided in Embodiment 1 of the present invention;
[0031] Figure 2 This is a schematic diagram of the container management device provided in Embodiment 2 of the present invention;
[0032] Figure 3 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Detailed Implementation
[0033] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0034] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. The process can be terminated when its operation is complete, but may also have additional steps not included in the figures. The process can correspond to a method, function, procedure, subroutine, subroutine, etc.
[0035] Example 1
[0036] Figure 1 This is a flowchart of a container management method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where a container engine is built to manage containers based on an operating system that already has embedded real-time lightweight secure containers. This method can be executed by the container management device provided in this embodiment of the invention. This device can be implemented in hardware and / or software, and is generally integrated into a computer device. Figure 1 As shown, the specific steps include the following:
[0037] S11. Receive container management commands provided by the user on the user-mode container management application.
[0038] S12. Invoke the kernel-mode container management device based on the container management command, and convert the container management command into an ioctl command.
[0039] S13. The kernel-mode container management device controls the target container according to the ioctl command and returns the operation result to the user-mode container management application.
[0040] Specifically, this embodiment first employs a real-time operating system framework and application model to implement a container engine function similar to Docker. This involves constructing a container engine composed of a kernel-mode container management device and a user-mode container management application. This engine allows for the management of container resources and lifecycles on top of the real-time operating system. Specifically, the user-mode container management application receives container management commands from the user. Upon receiving a command, the application can invoke the kernel-mode container management device via ioctl, converting the command into an ioctl command. The kernel-mode container management device can then perform corresponding ioctl operations to control the target container, such as setting resource isolation, quota limits, or obtaining its status. The target container can be a container with a specified container ID. By providing a kernel-mode container management device, many functions of secure containers can be operated based on the container engine's kernel-mode container management device, offering a simpler operation method to the application layer and transforming operations on system APIs in existing technologies into operations on the management device. In addition to providing a kernel-mode container management device, a user-mode container management application is also provided. This application allows users to manage the container lifecycle through container management commands, enabling them to easily modify the container lifecycle, perform operations such as packaging and unpacking containers, and transfer images to container image repositories. The execution of these container management commands is based on access to the kernel-mode container management device, which differs from the traditional container state management method implemented by Docker. After completing the corresponding operations, the kernel-mode container management device can also return the operation results of the state change to the user-mode container management application via JSON. Optionally, returning the operation results to the user-mode container management application includes returning the operation results synchronously or asynchronously, meaning the user-mode container management application can obtain the container state change results synchronously or asynchronously.
[0041] The aforementioned container engine can serve as the underlying management device for a container management platform in mission-critical domains. This platform typically enables container orchestration, redundancy and fault tolerance, and fault migration. The container management platform can manage containers in real-time systems in two ways: firstly, it can communicate with user-space container management applications, which can be extended to support RESTful and other methods; secondly, it can implement an additional container management agent to call the kernel-space container management device to achieve container management functionality.
[0042] Optionally, the user-space container management application can provide the following container management commands for user operation: `ecs pull` (pull container image from Registry Server), `ecs unpack` (unpack container image into container bundles to a specified path), `ecs create` (create container bundles at a specified path and register containers with a specified ID), `ecs delete` (delete container bundles at a specified path), `ecs reg` (register containers with a specified ID to the system), `ecs unreg` (unregister containers with a specified ID from the system), `ecs list` (list all registered containers), `ecs list load` (load container registration information saved in a local file), `ecs list save` (save registered container information to a local file), `ecs start` (start container with a specified ID), `ecs kill` (send a signal to container with a specified ID; this command can be used to stop container operation), `ecs inspect` (view configuration information of container with a specified ID), `ecs events` (view resource usage of container with a specified ID), `ecs state` (view running status of container with a specified ID), and `ecs ps` (view process information within container with a specified ID). The following commands are available for container management: `pause` (pauses the operation of the container with the specified ID), `ecs resume` (resumes the operation of the container with the specified ID), `ecs unpause` (same as `ecs resume`), `ecs attach` (attaches the current shell terminal to the container with the specified ID), `ecs exec` (executes a command in the container with the specified ID), `ecs save` (saves the container bundle as a container image), `ecs load` (loads the container image as a container bundle), `ecs cp` (copys files between the container and the host file system), `ecs port` (views the container's port mappings), `ecs version` (prints the version information of the ECS management commands), and so on. These container management commands are highly compatible with Docker user habits, allowing users to quickly get started.
[0043] Optionally, the kernel-mode container management device encapsulates a container management API interface containing real-time operating system content, used to provide the ioctl commands, change the state of the target container, and return the operation results. Specifically, the kernel-mode container management device can provide a set of ioctl commands to the user-mode container management application through the container management API interface. For asynchronous execution of the container management API interface, asynchronous access mechanisms such as select can also be provided. The kernel-mode container management device can also control the target container through the container management API interface, such as changing the state of the target container, and after completing the control, it can return the operation result of the state change to the application.
[0044] Optionally, the ioctl commands include: INSTALL (install container), LIST (get list of containers in the system), START (start container), KILL (stop container), INSPECT (query container configuration), and STATE (query container status); the ioctl commands conform to the OCI Runtime standard requirements. Specifically, they can support: a created container in a newly created state; a stopped container where the service has finished executing or has been manually stopped; a running container where the service is running; and a paused container where the service is paused.
[0045] Optionally, the user-space container management application supports the management of OCI standard container images, including pull, unpack, load, and save operations. Pull refers to the ability to directly pull images from the container repository into the operating system's file system via commands in the real-time operating system's shell terminal; the pulled images conform to the OCI standard. Unpacking refers to unpacking the pulled image into a container bundle directory format supported by the real-time operating system. Loading refers to loading the container image package as a container instance. Saving refers to saving a container instance as a container image package. In other words, the container engine provided in this embodiment is compatible with the OCI open container standard, enabling it to interface seamlessly with existing internet container management platforms (such as Docker Registry).
[0046] Based on the above technical solution, optionally, before receiving the container management commands provided by the user on the user-mode container management application, the method further includes: loading the module file of the kernel-mode container management device; starting the user-mode container management application to enable the kernel-mode container management device to start working; requesting relevant system resources; correspondingly, after controlling the target container through the kernel-mode container management device according to the ioctl command and returning the operation result to the user-mode container management application, the method further includes: releasing the system resources. Specifically, when no operation is required, the kernel-mode container management device is not opened, and the overhead on the system is limited to the mounted driver operation set. When operation is required, the module file (.ko file) of the kernel-mode container management device can be loaded. For example, the command: [root@sylixos: / root]#insmod / lib / modules / xcondev.ko can be used to load the specified kernel module xcondev.ko. After loading, the devs command can be used to check whether the kernel-mode container management device has been successfully registered. After loading, the user-space container management application can be started, and the kernel-space container management device can be opened after the user performs operations using the user-space container management application. At this point, the kernel-space container management device can begin working. Then, it can request the necessary system resources, meaning system resources are only occupied during use, and container management operations can be performed based on these resources. This is the process described above where the user-space container management application calls the kernel-space container management device via ioctl to perform container management operations. Correspondingly, the system resources occupied by the user-space container management application can be released immediately after use. The user-space container management application does not reside in the system and has no background resource occupation. Resources can be dynamically requested during use, and the used system resources are released immediately after use. Meanwhile, the kernel-space container management device is implemented as a system I / O device, provided as a kernel module (.ko), and also supports dynamic loading and unloading. This approach greatly reduces system resource consumption, allowing for loading when needed and releasing after use, making it very suitable for mission-critical application scenarios. Furthermore, unloading prevents external attacks on the interfaces exposed by the user-space container management application, thus enhancing security.
[0047] Based on the above technical solution, optionally, the user-space container management application and the kernel-space container management device are developed using C / C++. Specifically, existing container engines such as Docker are implemented on non-real-time operating systems such as Linux and all use the Go language. Go is more suitable for server applications because it consumes more resources and has relatively low code execution efficiency. In mission-critical domains, there may not be enough system resources to support Go, making it difficult to implement cloud-native technologies in this domain. The container engine provided in this embodiment can be developed using C / C++ and other languages, departing from the Go language approach used by existing containers, thus achieving extremely high execution efficiency.
[0048] The technical solution provided by this invention first receives a container management command provided by a user on a user-space container management application. Then, based on the container management command, it calls a kernel-space container management device and converts the container management command into an ioctl command. The kernel-space container management device then controls the target container according to the ioctl command and returns the operation result to the user-space container management application. A framework suitable for container engine implementation under a real-time operating system is proposed. It adopts an "application + device" approach to implement the container management engine, resulting in lower hardware costs. It can also implement cloud-native and DevOps solutions on low-computing-power, small-memory devices commonly used in embedded systems (such as ARM9@300MHz+16MBRAM). Furthermore, it has a simple structure, lower maintenance costs, and higher execution efficiency.
[0049] Example 2
[0050] Figure 2 This is a schematic diagram of the container management device provided in Embodiment 2 of the present invention. This device can be implemented in hardware and / or software, and is generally integrated into a computer device to execute the container management method provided in any embodiment of the present invention. Figure 2 As shown, the device includes:
[0051] Command receiving module 21 is used to receive container management commands provided by users on user-mode container management applications;
[0052] Command translation module 22 is used to invoke the kernel-mode container management device based on the container management command, and to translate the container management command into an ioctl command;
[0053] Command execution module 23 is used to control the target container through the kernel-mode container management device according to the ioctl command, and return the operation result to the user-mode container management application.
[0054] The technical solution provided by this invention first receives a container management command provided by a user on a user-space container management application. Then, based on the container management command, it calls a kernel-space container management device and converts the container management command into an ioctl command. The kernel-space container management device then controls the target container according to the ioctl command and returns the operation result to the user-space container management application. A framework suitable for container engine implementation under a real-time operating system is proposed. It adopts an "application + device" approach to implement the container management engine, resulting in lower hardware costs. It can also implement cloud-native and DevOps-oriented solutions on low-computing-power, small-memory devices commonly used in embedded systems (such as ARM9@300MHz+16MBRAM). Furthermore, it has a simple structure, lower maintenance costs, and higher execution efficiency.
[0055] Based on the above technical solution, optionally, the container management device further includes:
[0056] A module file loading module is used to load the module file of the kernel-mode container management device before receiving container management commands provided by the user on the user-mode container management application;
[0057] The application startup module is used to start the user-mode container management application so that the kernel-mode container management device can start working;
[0058] The system resource application module is used to apply for relevant system resources;
[0059] Accordingly, the container management device also includes:
[0060] The system resource release module is used to release the system resources after the target container is controlled by the kernel-mode container management device according to the ioctl command and the operation result is returned to the user-mode container management application.
[0061] Based on the above technical solution, optionally, the user-mode container management application and the kernel-mode container management device are developed using C / C++ language.
[0062] Based on the above technical solution, optionally, the kernel-mode container management device encapsulates a container management API interface containing real-time operating system content, used to provide the ioctl command, change the state of the target container, and return the operation result.
[0063] Based on the above technical solution, optionally, the ioctl command includes: a command to install a container, a command to obtain a list of containers in the system, a command to start a container, a command to stop a container, a command to query container configuration, and a command to query container status; the ioctl command conforms to the OCI Runtime standard requirements.
[0064] Based on the above technical solution, optionally, the user-space container management application supports the management of container images of the OCI image standard, including pull operations, unpacking operations, loading operations, and saving operations.
[0065] Based on the above technical solution, optionally, the command execution module 23 is specifically used for:
[0066] The operation result is returned to the user-mode container management application in a synchronous or asynchronous manner.
[0067] The container management device provided in the embodiments of the present invention can execute the container management method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0068] It is worth noting that in the above embodiments of the container management device, the various units and modules are divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0069] Example 3
[0070] Figure 3 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention, showing a block diagram of an exemplary computer device suitable for implementing the embodiments of the present invention. Figure 3 The computer device shown is merely an example and should not be construed as limiting the functionality or scope of the embodiments of the present invention. Figure 3 As shown, the computer device includes a processor 31, a memory 32, an input device 33, and an output device 34; the number of processors 31 in the computer device can be one or more. Figure 3 Taking a processor 31 as an example, the processor 31, memory 32, input device 33, and output device 34 in a computer device can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.
[0071] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the container management method in this embodiment of the invention (e.g., the command receiving module 21, command translation module 22, and command execution module 23 in the container management device). The processor 31 executes various functional applications and data processing of the computer device by running the software programs, instructions, and modules stored in the memory 32, thereby implementing the container management method described above.
[0072] The memory 32 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 32 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory 32 may further include memory remotely located relative to the processor 31, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0073] Input device 33 can be used to receive container management commands provided by the user, and to generate key signal inputs related to user settings and function control of the computer device. Output device 34 may include a display screen, which can be used to show the user the returned operation results, etc.
[0074] Example 4
[0075] Embodiment 4 of the present invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a container management method, the method comprising:
[0076] Receive container management commands provided by the user in the user-space container management application;
[0077] The container management command is used to invoke the kernel-mode container management device, and the container management command is converted into an ioctl command;
[0078] The kernel-mode container management device controls the target container using the ioctl command and returns the operation result to the user-mode container management application.
[0079] Storage media can be any type of memory device or storage device. The term "storage media" is intended to include: mounting media, such as CD-ROMs, floppy disks, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disks or optical storage); registers or other similar types of memory elements. Storage media may also include other types of memory or combinations thereof. Furthermore, storage media may reside in a computer system in which the program is executed, or may reside in a different second computer system connected to the computer system via a network (such as the Internet). The second computer system can provide program instructions to the computer for execution. The term "storage media" can include two or more storage media that may reside in different locations (e.g., in different computer systems connected via a network). Storage media may store program instructions (e.g., specifically implemented as a computer program) that can be executed by one or more processors.
[0080] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method operations described above, but can also perform related operations in the container management method provided in any embodiment of the present invention.
[0081] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0082] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0083] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0084] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A container management method, characterized in that, include: Receive container management commands provided by the user in the user-space container management application; The container management command is used to invoke the kernel-mode container management device and is then converted into an ioctl command. The kernel-mode container management device controls the target container according to the ioctl command and returns the operation result to the user-mode container management application. Before receiving container management commands provided by the user on the user-space container management application, the method further includes: Load the module file for the kernel-mode container management device; Start the user-space container management application to enable the kernel-space container management device to function. Request relevant system resources; Accordingly, after controlling the target container via the kernel-mode container management device according to the ioctl command and returning the operation result to the user-mode container management application, the method further includes: Release the system resources; The user-mode container management application does not reside in the system and does not occupy background resources within the system. It dynamically requests resources when in use and releases the system resources used after use. The kernel-mode container management device is implemented as a system I / O device and supports dynamic loading and unloading. The kernel-mode container management device encapsulates a container management API interface containing real-time operating system content, used to provide the ioctl command, change the state of the target container, and return the operation result; the kernel-mode container management device provides the ioctl command to the user-mode container management application through the container management API interface, and controls the target container.
2. The container management method according to claim 1, characterized in that, The user-mode container management application and the kernel-mode container management device are developed using the C / C++ language.
3. The container management method according to claim 1, characterized in that, The ioctl commands include: commands to install containers, commands to get a list of containers in the system, commands to start containers, commands to stop containers, commands to query container configuration, and commands to query container status; the ioctl commands conform to the OCI Runtime standard requirements.
4. The container management method according to claim 1, characterized in that, The user-space container management application supports the management of container images according to the OCI image standard, including pull, unpack, load, and save operations.
5. The container management method according to claim 1, characterized in that, The step of returning the operation result to the user-space container management application includes: The operation result is returned to the user-mode container management application in a synchronous or asynchronous manner.
6. A container management device, characterized in that, include: The command receiving module is used to receive container management commands provided by users on user-space container management applications; The command translation module is used to invoke the kernel-mode container management device based on the container management command, and to translate the container management command into an ioctl command; The command execution module is used to control the target container through the kernel-mode container management device according to the ioctl command, and return the operation result to the user-mode container management application; The device further includes: A module file loading module is used to load the module files of the kernel-mode container management device. The application startup module is used to start the user-mode container management application so that the kernel-mode container management device can start working; The system resource application module is used to apply for relevant system resources; Accordingly, the device also includes: The system resource release module is used to release the system resources after the target container is controlled by the kernel-mode container management device according to the ioctl command and the operation result is returned to the user-mode container management application. The user-mode container management application does not reside in the system and does not occupy background resources within the system. It dynamically requests resources when in use and releases the system resources used after use. The kernel-mode container management device is implemented as a system I / O device and supports dynamic loading and unloading. The kernel-mode container management device encapsulates a container management API interface containing real-time operating system content, used to provide the ioctl command, change the state of the target container, and return the operation result; the kernel-mode container management device provides the ioctl command to the user-mode container management application through the container management API interface, and controls the target container.
7. A computer device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the container management method as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the container management method as described in any one of claims 1-5.
Citation Information
Patent Citations
Communication system and method between containers based on core and memory sharing
CN108322307A