Computer system with non-perceptual loading and unloading functions

By designing a computer system with seamless loading and unloading capabilities, the real-time performance and security issues of traditional computer systems during user-level program loading and unloading under a real-time operating system are solved. Seamless dynamic loading and unloading are achieved, ensuring the system's real-time performance and security.

CN121187664APending Publication Date: 2025-12-23四川华鲲振宇智能科技有限责任公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511260616.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2025-12-23

AI Technical Summary

Technical Problem

In traditional computer systems operating in a real-time operating system environment, the loading and unloading of user-level programs requires pausing system operation, which affects real-time performance, increases system uncertainty and security risks, and has low resource management efficiency, especially in embedded systems, impacting system performance and security.

Method used

Design a computer system with seamless loading and unloading capabilities, including an RTOS kernel layer, a real-time user layer, and a user-defined program layer. The RTOS kernel layer performs system-level initialization and memory allocation, the real-time user layer identifies and verifies the hardware and seamlessly accesses the user-defined program image, and the user-defined program layer implements dynamic loading and unloading, using a unified program image format and security verification mechanism.

Benefits of technology

It enables seamless loading and unloading of user-level programs without interruption or manual intervention during real-time system operation, ensuring system real-time performance, security, and resource utilization efficiency, improving system flexibility and adaptability, preventing illegal operations, and avoiding resource leaks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121187664A_ABST
    Figure CN121187664A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of computer system design, and particularly relates to a computer system with a non-perceptual loading and unloading function, which is characterized in that an RTOS kernel layer, a real-time user layer and a user-defined program layer are arranged, system bottom layer initialization and system memory allocation are performed through the RTOS kernel layer, and a specified user area is reserved; a real-time user layer supports a bottom layer of a user layer program, so that the user layer program supports a real-time function, including identifying and verifying inserted or connected hardware, reading a user layer program mirror image stored on the hardware, and accessing and running the identified program mirror image in the existing mirror image in a non-perceptual manner; the program is dynamically called in and removed through a user-defined program layer and a non-perceptual loading and unloading mechanism, and a unified program mirror image format is defined. A novel computer system design that user layer programs can be loaded and unloaded without perception without interruption or manual intervention in the real-time operation process of the system is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of computer system design, and particularly relates to a computer system with non-perception loading and unloading functions. BACKGROUND

[0002] In the current computer system design, especially in the real-time operating system (RTOS) environment, the traditional user layer program loading and unloading method has a series of problems. The typical loading and unloading process usually needs to pause the real-time running of the system or perform complex manual operations. This not only increases the uncertainty of the system, but also may have a negative impact on the real-time performance of the system. In embedded systems, industrial control systems and other scenes with strict requirements for real-time performance, such problems are particularly prominent.

[0003] The traditional user layer program loading and unloading process needs to pause the real-time running of the system, which brings challenges to the stability and reliability of the real-time system. Especially in time-sensitive application scenarios such as autonomous driving, industrial robots, etc., any pause or delay may lead to serious consequences. Loading and unloading user layer programs usually require complex manual operations, including manual allocation and release of memory, initialization and destruction of programs, etc. This puts high technical requirements on system administrators and increases the risk of human operation errors. Under the traditional method, the allocation and recovery efficiency of memory and computing resources is low, which easily causes resource waste or resource leakage problems. Especially in resource-constrained embedded systems, inefficient resource management may directly affect system performance. The safety problem in the loading and unloading process is more prominent, for example, unverified program images may be loaded into the system, resulting in compromised system security.

[0004] Therefore, there is an urgent need for a new computer system that can realize non-perception loading and unloading of user layer programs without interruption or manual intervention during the real-time running of the system. SUMMARY

[0005] The purpose of the present application is to provide a computer system with non-perception loading and unloading functions, which can realize non-perception loading and unloading of user layer programs without interruption or manual intervention during the real-time running of the system.

[0006] To solve the above technical problems, the technical solution adopted by the present application is as follows:

[0007] A computer system with non-perception loading and unloading functions, comprising an RTOS kernel layer, a real-time user layer and a user-defined program layer, wherein the RTOS kernel layer is connected with the real-time user layer, and the real-time user layer is connected with the user-defined program layer.

[0008] The RTOS kernel layer is used for system bottom layer initialization and system memory allocation, and reserves a specified user area;

[0009] The real-time user layer is used for bottom layer support of the user layer program, and supports real-time functions, including identification verification of inserted or connected hardware, reading of a user layer program image stored on the hardware, and in-situ access and running of the identified program image in the existing image;

[0010] The user self-defined program layer contains an application program written by a user, and is dynamically called in and removed through a non-aware loading and unloading mechanism, and defines a unified program image format.

[0011] Preferably, the RTOS kernel layer includes an initialization module, a memory pre-allocation module, and a task scheduling module, the initialization module is connected with the memory pre-allocation module, and the memory pre-allocation module is connected with the task scheduling module.

[0012] The initialization module is used to complete initialization of each hardware component and an operating system kernel at system startup, the initialization of each hardware component enables all hardware components to be in an available state, and the initialization of the operating system kernel includes core modules of task management, memory management, and interrupt management.

[0013] The memory pre-allocation module is used for memory pre-allocation and user area pre-allocation, the memory pre-allocation is pre-reserving a specific memory area for dynamic loading of a user layer program image in a memory allocation stage.

[0014] The task scheduling module is used to realize real-time scheduling of tasks, priority classification of system tasks, EDF real-time scheduling of emergency tasks, ordinary tasks, and loading and unloading tasks according to the importance of the tasks, and addition of all tasks to a list and addition of a running deadline attribute of the tasks.

[0015] Preferably, the task scheduling module performs real-time task scheduling as follows:

[0016] For the emergency tasks, the priority is the same as that of the ordinary tasks, that is, when the emergency tasks are activated in the task list, the emergency tasks are executed immediately;

[0017] For the ordinary tasks, the tasks are sequentially called according to the task deadlines, that is, the earliest deadline task is preferentially called at a certain node of a system clock, to ensure efficient calling of the ordinary tasks between the nodes of the system clock;

[0018] For loading and unloading tasks, its calling condition is that whether the system resource is sufficient, on the system clock node, when the resource is sufficient, the loading and unloading task is called for processing;

[0019] After the execution of the loading and unloading task ends, the system task contained in the loaded image needs to be loaded into the task list of the system real-time management according to its priority, to ensure that the system controls the loaded hardware after completing the loading and unloading task.

[0020] Preferably, the real-time user layer includes a bottom support module, a hardware identification and image verification module, a non-aware access module and a real-time running module.

[0021] The bottom support module includes a hardware interface and a driver program, the hardware interface is used for connecting with the hardware device, and the driver program is used for external device development.

[0022] The hardware identification and image verification module is used for identifying the hardware device through a specified protocol when the external hardware is inserted or connected, reading the device identification information, identifying the device type and function, and reading the user layer program image stored in the hardware device for legality and integrity verification, including digital signature and checksum, to ensure that the loaded program image is not tampered.

[0023] The non-aware access module is used for loading the user layer program image into the reserved user area after the image verification passes, and initializing the setting to make it access the current system running state.

[0024] The real-time running module is used for enabling the newly loaded program to realize real-time execution through the task scheduling module of the RTOS kernel layer, and simultaneously working with the existing system task.

[0025] Preferably, the user self-defined program layer includes an automatic loading module and an automatic unloading module.

[0026] The automatic loading module is used for uploading the completed application program to the specified hardware device, and when the hardware device is inserted or connected, the system automatically identifies and loads the program image, initializes and starts.

[0027] The automatic unloading module is used for automatically unloading the corresponding user layer program and releasing the occupied memory and other system resources when the external device is removed.

[0028] Preferably, the user self-defined program layer is also provided with a resource recycling module, which is used for recycling the system resources occupied by the user layer program when the user layer program is unloaded, to realize timely recycling and reuse of resources, and to monitor the use of resources in real time during the program running process, to ensure efficient use and reasonable allocation of resources.

[0029] Preferably, the digital signature is a security verification mechanism added before loading the user-level program image, which checks the digital signature or verification code of the image to ensure that it has not been tampered with and to protect system security.

[0030] The checksum is used to verify the integrity and legitimacy of the program image, ensuring that the loaded program has not been tampered with or damaged.

[0031] The beneficial effects of this invention include:

[0032] This invention provides a computer system with seamless loading and unloading capabilities. By establishing an RTOS kernel layer, a real-time user layer, and a user-defined program layer, the system performs low-level initialization and memory allocation through the RTOS kernel layer, reserving designated user areas. The real-time user layer provides low-level support for user-level programs, enabling real-time functionality, including identifying and verifying inserted or connected hardware, reading user-level program images stored on the hardware, and seamlessly accessing and running identified program images within existing images. The user-defined program layer dynamically loads and removes programs through a seamless loading and unloading mechanism, defining a unified program image format. This novel computer system design achieves seamless loading and unloading of user-level programs during real-time system operation without interruption or manual intervention. Attached Figure Description

[0033] Figure 1 This is a schematic diagram of the architecture of a computer system with seamless loading and unloading functions according to the present invention.

[0034] Figure 2 This is a schematic diagram of the architecture of the RTOS kernel layer of the present invention.

[0035] Figure 3 This is a schematic diagram of the architecture of the real-time user layer of the present invention.

[0036] Figure 4 This is a schematic diagram of the architecture of the user-defined program layer of the present invention. Detailed Implementation

[0037] The following is in conjunction with the appendix Figures 1-4 The present invention will be further described in detail below:

[0038] Example 1

[0039] See appendix Figure 1As shown, a computer system with seamless loading and unloading capabilities includes an RTOS kernel layer, a real-time user layer, and a user-defined program layer. The RTOS kernel layer is connected to the real-time user layer, and the real-time user layer is connected to the user-defined program layer. The RTOS kernel layer is used for low-level system initialization and system memory allocation, and reserves designated user areas. The real-time user layer provides low-level support for user-level programs, enabling them to support real-time functions, including identifying and verifying inserted or connected hardware, reading user-level program images stored on the hardware, and seamlessly accessing and running the identified program images within existing images. The user-defined program layer contains user-written applications, which are dynamically loaded and removed through a seamless loading and unloading mechanism, and a unified program image format is defined.

[0040] Traditional user-level program loading and unloading processes require pausing the system's real-time operation, posing challenges to the stability and reliability of real-time systems, especially in time-sensitive applications where any pause or delay can lead to serious consequences. Loading and unloading user-level programs typically involves complex manual operations, placing high technical demands on system administrators and increasing the risk of human error. Traditional methods also suffer from inefficient memory and computing resource allocation and reclamation, easily leading to resource waste or leaks. Particularly in resource-constrained embedded systems, inefficient resource management can directly impact system performance. Security issues during loading and unloading are also significant.

[0041] Therefore, this invention establishes a connection between the RTOS kernel layer and the real-time user layer, thereby connecting the real-time user layer and the user-defined program layer. The RTOS kernel layer handles system-level initialization and memory allocation, reserving a designated user area. The real-time user layer provides low-level support for user-level programs, enabling real-time functionality, including identifying and verifying inserted or connected hardware, reading user-level program images stored on the hardware, and seamlessly integrating and running identified program images within existing images. The user-defined program layer, containing user-written applications, is dynamically loaded and removed through a seamless loading and unloading mechanism. A unified program image format is defined, allowing the computer system of this invention to dynamically load and unload user-level programs during its real-time operation, ensuring system real-time performance, security, and resource utilization efficiency. This achieves seamless loading and unloading of user-level programs during real-time system operation, guaranteeing real-time system performance. Through an efficient task scheduling and management mechanism, it ensures the timely execution of critical tasks.

[0042] This allows users to dynamically load and uninstall different applications as needed, improving system flexibility and adaptability. Efficient memory management and resource allocation mechanisms ensure efficient utilization of system resources. Image verification and permission management mechanisms ensure system security. In another embodiment, a sandbox mechanism isolates user programs from core system modules to prevent illegal operations and abnormal behavior. Efficient memory management and task scheduling mechanisms guarantee efficient utilization of system resources and real-time execution of critical tasks. Dynamic loading and unloading mechanisms ensure the system can still operate normally under high load. Efficient hardware interface and driver design ensure rapid response and stable operation to external devices. Efficient resource monitoring and reclamation mechanisms prevent resource leakage and waste.

[0043] Example 2

[0044] Based on Example 1, see Figure 2 The RTOS kernel layer includes an initialization module, a memory pre-allocation module, and a task scheduling module. The initialization module is connected to the memory pre-allocation module, which in turn is connected to the task scheduling module. The initialization module initializes all hardware components and the operating system kernel during system startup, ensuring all hardware components are ready for use. The operating system kernel initialization includes core modules for task management, memory management, and interrupt management. The memory pre-allocation module performs memory pre-allocation and user area pre-allocation. Memory pre-allocation reserves specific memory areas during the memory allocation phase for the dynamic loading of user-level program images. The task scheduling module implements real-time task scheduling, prioritizing system tasks into urgent tasks, normal tasks, and load / unload tasks based on their importance, from highest to lowest priority. Real-time EDF scheduling is performed for urgent, normal, and load / unload tasks. Finally, a task list is added, including all tasks and a task deadline attribute.

[0045] When performing real-time task scheduling, the task scheduling module prioritizes urgent tasks over ordinary tasks; that is, when an urgent task is activated in the task list, it is executed immediately. For ordinary tasks, they are called sequentially according to their deadlines; that is, at a certain node of the system clock, the task with the earliest deadline is called first, ensuring efficient calling of ordinary tasks between system clock nodes. For loading / unloading tasks, their calling depends on the availability of system resources; at a system clock node, if resources are sufficient, the loading / unloading task is called for processing. After the loading / unloading task is completed, the system tasks contained in the loaded image need to be loaded into the system's real-time managed task list according to their priorities, ensuring that the system can control the loaded hardware after the loading / unloading task is completed.

[0046] In this embodiment, task priority management ensures the real-time performance of critical tasks through a task priority management mechanism. The system can dynamically adjust task priorities to ensure that important tasks can still be executed in a timely manner under high load. To meet the requirement of seamless image loading, the system's task priorities are divided into three categories: urgent tasks, normal tasks, and loading / unloading tasks. Urgent tasks have the highest priority. Even when system resources are scarce, these tasks will not be affected by the blocking of normal tasks or the real-time loading of loading / unloading tasks. Urgent tasks mainly include tasks related to system resource allocation and a small number of important business tasks. Normal tasks consist of most business tasks and some system call tasks. These tasks have a clear deadline during execution, and the system's loading / unloading tasks cannot interrupt them before the task ends, ensuring that the business processes in the system are unaware of component loading / unloading actions. A preset real-time scheduling algorithm optimizes system scheduling performance and reduces task switching overhead. Real-time task scheduling is performed using EDF (Earliest Deadline First) or RM (Rate Monotonic) real-time scheduling algorithms.

[0047] Emergency tasks can preempt the priority of regular tasks; that is, when an emergency task is activated in the task list, it is executed immediately. For regular tasks, they are called sequentially according to their deadlines; that is, at a certain node of the system clock, the task with the earliest deadline is called first, ensuring efficient execution of regular tasks between system clock nodes. For load / unload tasks, their calling depends on the availability of system resources. At a system clock node, if resources are sufficient, the task is called for processing; otherwise, if resources are scarce, the task is blocked to ensure the real-time execution of other tasks. After the load / unload tasks are completed, the system tasks contained in the loaded image must be loaded into the system's real-time managed task list according to their priority. This ensures that the system can smoothly control the loaded hardware after the load / unload tasks are completed.

[0048] Example 3

[0049] Based on Example 1 or Example 2, see Figure 3The real-time user layer includes a low-level support module, a hardware identification and image verification module, a seamless access module, and a real-time execution module. The low-level support module includes a hardware interface and a driver. The hardware interface is used to connect to hardware devices, and the driver is used for external device development. The hardware identification and image verification module is used to identify hardware devices through a specified protocol when external hardware is inserted or connected, read device identification information, identify device type and function, and read the user-layer program image stored on the hardware device for legality and integrity verification, including digital signature and checksum, to ensure that the loaded program image has not been tampered with. The seamless access module is used to load the user-layer program image into a reserved user area after image verification and perform initialization settings to connect it to the current system running state. The real-time execution module is used to enable the newly loaded program to execute in real time through the task scheduling module of the RTOS kernel layer, while simultaneously working in conjunction with existing system tasks.

[0050] In this embodiment, see Figure 4 The user-defined program layer includes an auto-loading module and an auto-unloading module. The auto-loading module uploads the completed application to a designated hardware device. When the hardware device is plugged in or connected, the system automatically identifies and loads the program image, initializes it, and starts the application. The auto-unloading module automatically uninstalls the corresponding user-defined program when the external device is removed, releasing the occupied memory and other system resources. The user-defined program layer also includes a resource recycling module. This module reclaims the system resources occupied by the user-defined program during uninstallation, ensuring timely resource recovery and reuse. Furthermore, it monitors resource usage in real time during program execution to ensure efficient resource utilization and reasonable allocation.

[0051] The digital signature is a security verification mechanism added before loading the user-level program image. It checks the digital signature or checksum of the image to ensure it has not been tampered with, thus ensuring system security. The checksum verifies the integrity and legitimacy of the program image, ensuring that the loaded program has not been tampered with or damaged.

[0052] The computer system of this invention performs dynamic permission allocation. Through a permission management mechanism, different permissions are assigned to different user-level programs, ensuring that user programs do not pose a threat to the RTOS kernel layer and other critical modules during system operation. The permission management process must be efficient and flexible, ensuring the rationality and security of permission allocation. A sandbox mechanism is also implemented, monitoring the behavior of user-level programs during their execution to prevent illegal operations and abnormal behaviors, thus isolating user programs from core system modules and ensuring system security and stability. The sandbox mechanism must also be efficient and stable, ensuring the security and reliability of user programs.

[0053] In summary, the computer system with seamless loading and unloading capabilities provided by this invention establishes an RTOS kernel layer, a real-time user layer, and a user-defined program layer. The RTOS kernel layer performs low-level system initialization and memory allocation, reserving designated user areas. The real-time user layer provides low-level support for user-level programs, enabling real-time functionality, including identifying and verifying inserted or connected hardware, reading user-level program images stored on the hardware, and seamlessly accessing and running identified program images within existing images. The user-defined program layer dynamically loads and removes programs through a seamless loading and unloading mechanism, defining a unified program image format. This achieves a novel computer system design that enables seamless loading and unloading of user-level programs during real-time system operation without interruption or manual intervention.

Claims

1. A computer system with seamless loading and unloading capabilities, characterized in that, It includes an RTOS kernel layer, a real-time user layer, and a user-defined program layer, wherein the RTOS kernel layer is connected to the real-time user layer, and the real-time user layer is connected to the user-defined program layer. The RTOS kernel layer is used for system-level initialization and system memory allocation, and reserves a designated user area; The real-time user layer is used to provide underlying support for user layer programs, enabling them to support real-time functions, including identifying and verifying inserted or connected hardware, reading user layer program images stored on the hardware, and seamlessly accessing and running the identified program images within the existing images. The user-defined program layer contains user-written applications that are dynamically loaded and removed through a seamless loading and unloading mechanism, and defines a unified program image format.

2. A computer system with seamless loading and unloading functions according to claim 1, characterized in that, The RTOS kernel layer includes an initialization module, a memory pre-allocation module, and a task scheduling module. The initialization module is connected to the memory pre-allocation module, and the memory pre-allocation module is connected to the task scheduling module. The initialization module is used to initialize various hardware components and the operating system kernel when the system starts up. The initialization of various hardware components makes all hardware components available. The initialization of the operating system kernel includes core modules for task management, memory management, and interrupt management. The memory pre-allocation module is used to perform memory pre-allocation and user area pre-allocation. The memory pre-allocation is to reserve a specific memory area during the memory allocation stage for the dynamic loading of the user-level program image. The task scheduling module is used to realize real-time task scheduling, classify system tasks by priority, and divide them into urgent tasks, normal tasks and loading / unloading tasks according to their importance, with their priorities from high to low. Real-time EDF scheduling is performed on urgent tasks, normal tasks and loading / unloading tasks. Then, a task list is added to add all tasks to the list, and the task execution deadline attribute is added.

3. A computer system with seamless loading and unloading functions according to claim 2, characterized in that, When the task scheduling module performs real-time task scheduling: For urgent tasks, their priority is the same as that of ordinary tasks; that is, when an urgent task is activated in the task list, it is executed immediately. For regular tasks, they are called sequentially according to their deadlines. That is, at a certain node of the system clock, the task with the earliest deadline is called first, ensuring efficient calling of regular tasks between system clock nodes. The invocation of loading and unloading tasks depends on whether system resources are sufficient. At the system clock node, when resources are sufficient, the loading and unloading tasks are invoked for processing. After the loading and unloading tasks are completed, the system tasks contained in the loaded image need to be loaded into the system's real-time management task list according to their priority, so as to ensure that the system can control the loaded hardware after the loading and unloading tasks are completed.

4. A computer system with seamless loading and unloading functions according to claim 1, characterized in that, The real-time user layer includes an underlying support module, a hardware identification and image verification module, a seamless access module, and a real-time operation module. The underlying support module includes a hardware interface and a driver. The hardware interface is used to connect to hardware devices, and the driver is used for external device development. The hardware identification and image verification module is used to identify hardware devices through a specified protocol, read device identification information, identify device type and function, and read the user-layer program image stored on the hardware device for legality and integrity verification, including digital signature and checksum, to ensure that the loaded program image has not been tampered with when external hardware is inserted or connected. The seamless access module is used to load the user-layer program image into the reserved user area after the image verification is passed, and to perform initialization settings to enable it to access the current system running state. The real-time execution module is used to enable newly loaded programs to be executed in real time through the task scheduling module of the RTOS kernel layer, while working in coordination with existing system tasks.

5. A computer system with seamless loading and unloading functions according to claim 1, characterized in that, The user-defined program layer includes an auto-loading module and an auto-unloading module; The automatic loading module is used to upload the completed application to the specified hardware device. When the hardware device is inserted or connected, the system automatically recognizes and loads the program image, initializes and starts the application. The automatic uninstallation module is used to automatically uninstall the corresponding user-level program and release the occupied memory and other system resources when the external device is removed.

6. A computer system with seamless loading and unloading functions according to claim 5, characterized in that, The user-defined program layer also includes a resource recycling module, which is used to reclaim the system resources occupied by the user-defined program when it is uninstalled, to reclaim and reuse the resources in a timely manner, and to monitor the resource usage in real time during program operation to ensure efficient use and reasonable allocation of resources.

7. A computer system with seamless loading and unloading functions according to claim 4, characterized in that, The digital signature is a security verification mechanism added before loading the user-level program image. It checks the digital signature or verification code of the image to ensure that it has not been tampered with and to protect system security. The checksum is used to verify the integrity and legitimacy of the program image, ensuring that the loaded program has not been tampered with or damaged.