Process processing method and device, equipment, medium and vehicle

By detecting the blocking state of user space processes in the microkernel operating system and establishing target processes in the kernel space, the system stuck problem caused by process blockage in the microkernel operating system is solved, improving the user experience.

CN119065867APending Publication Date: 2024-12-03BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310629001.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In microkernel operating systems, process blocking in user space will cause functions to be unfulfilled, affecting user experience, and the existing technology will be difficult to effectively solve the system stuck problem caused by process blockage.

Method used

By detecting the process status in the user space, when the preset blocking conditions are met, the target process is established in the kernel space, replacing the blocking process to realize data processing, and avoiding the impact of process blocking on the user space.

Benefits of technology

It effectively avoids system jamming caused by process blockage, improves user experience, and ensures the normal implementation of process functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065867A_ABST
    Figure CN119065867A_ABST
Patent Text Reader

Abstract

The invention relates to a process processing method and device, equipment, a medium and a vehicle. The method is applied to a microkernel and comprises the following steps: detecting the state of a first process in a user space of the microkernel; when it is detected that the state of the first process meets a preset blocking condition, establishing a target process corresponding to the first process in the kernel space of the microkernel; related data processing of the first process is executed through the target process. According to the embodiment of the invention, under the condition that the process in the user space of the microkernel meets the blocking condition, the new process is established in the kernel space of the microkernel, and the blocked process is replaced by the new process, so that the condition that the new process is blocked again due to factors causing process blocking in the user space is avoided, and the user experience is improved. And subsequently, the data processing of the call of the blocked process in the user space is converted into the data processing of the call of the new process in the kernel space, so that the function of the original process can be normally realized, and the use experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of vehicle technology, and in particular to a process processing method, device, equipment, medium and vehicle. Background Art

[0002] Compared with macrokernel operating systems such as Linux, the kernel of a microkernel operating system is small and simple. In this microkernel operating system, one or more of the process management process, device driver process, shell process, and file system process run in user space.

[0003] In the related art, in a microkernel operating system, if a process in the user space is blocked, it is necessary to wait for the blocking state of the process to end before the corresponding function can be normally implemented through the process. However, if the process remains in the blocked state, the process cannot be called and the corresponding function of the process cannot be implemented, which affects the user experience. Summary of the invention

[0004] In order to solve the above technical problems, the present disclosure provides a process processing method, device, equipment, medium and vehicle.

[0005] In a first aspect, the present disclosure provides a process processing method, which is applied to a microkernel, and the method includes:

[0006] Detecting a state of a first process in a user space of the microkernel;

[0007] When it is detected that the state of the first process meets the preset blocking condition, establishing a target process corresponding to the first process in the kernel space of the microkernel;

[0008] The target process is used to execute the data processing related to the first process.

[0009] In a second aspect, the present disclosure provides a process processing device, applied to a microkernel, the device comprising:

[0010] A detection module, used for detecting the state of a first process in a user space of the microkernel;

[0011] An establishing module, configured to establish a target process corresponding to the first process in the kernel space of the microkernel when it is detected that the state of the first process meets a preset blocking condition;

[0012] An execution module is used to execute the relevant data processing of the first process through the target process.

[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, including:

[0014] processor;

[0015] A memory for storing executable instructions;

[0016] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the process processing method of the first aspect.

[0017] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program. When the computer program is executed by a processor, the processor implements the process processing method of the first aspect.

[0018] In a fifth aspect, an embodiment of the present disclosure further provides a vehicle, comprising at least one of the following: the above-mentioned process processing device; the above-mentioned electronic device; and the above-mentioned computer-readable storage medium.

[0019] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art: a process processing method, device, equipment and storage medium of the embodiments of the present disclosure, the method is applied to a microkernel, including: detecting the state of a first process in the user space of the microkernel; when it is detected that the state of the first process meets the preset blocking condition, establishing a target process corresponding to the first process in the kernel space of the microkernel; and executing the relevant data processing of the first process through the target process. By adopting the above technical solution, when the process in the user space of the microkernel meets the blocking condition, a new process is established in the kernel space of the microkernel, and the blocked process is replaced by the new process, so as to avoid the factors that cause the process blocking in the user space to cause the new process to be blocked again, and subsequently converting the call to the blocked process in the user space for data processing into the call to the new process in the kernel space for data processing, so that the function of the original process can be normally realized, and the user experience is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0022] Figure 1 A flowchart of a process processing method provided by an embodiment of the present disclosure;

[0023] Figure 2A flowchart of another process processing method provided by an embodiment of the present disclosure;

[0024] Figure 3 A schematic diagram of a process being blocked in a user space of a microkernel provided in an embodiment of the present disclosure;

[0025] Figure 4 A flowchart of another process processing method provided by an embodiment of the present disclosure;

[0026] Figure 5 A schematic diagram of the structure of a process processing device provided by an embodiment of the present disclosure;

[0027] Figure 6 A schematic diagram of the hardware circuit structure of a process processing device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0029] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0030] Compared with macro kernel operating systems such as Linux, the kernel of a micro kernel operating system is small and simple. In the micro kernel operating system, the processes running in the kernel space usually include one or more of the basic processes such as the process scheduling management process, the memory address space management process, and the inter-process communication process. The processes running in the user space usually include one or more of the process management process, the device driver process, the shell process, and the file system process.

[0031] In macro kernel operating systems such as Linux, the above basic processes such as process scheduling management process, memory address space management process, and inter-process communication process all run in the kernel space.

[0032] Moreover, in the operating system, the communication between processes is implemented through the inter-process communication (IPC) technology. In the process of communication between two processes in the user space, the information sending process sends IPC information to the information receiving process. The actual processing process is that the information sending process sends IPC information to the information receiving process through the kernel, and waits in the kernel for the information receiving process to confirm the receipt of the IPC information. If the information receiving process has not confirmed the receipt of the IPC information, the information sending process remains blocked. In some application scenarios, if there is a defect (bug) in the information receiving process, the information receiving process will not be able to confirm the receipt of the IPC information, so that the information sending process always remains blocked.

[0033] If a process in the user space is blocked, you need to wait for the process to end the blocking state before you can implement the corresponding function through the process. However, if the process remains in a blocked state, the process cannot be called, and the corresponding function of the process cannot be implemented, which affects the user experience. Taking the shell process as an example, if the shell process remains in a blocked state, since the interaction between the user and the system needs to be realized through the shell process, when the shell process is blocked, the system cannot respond to the user's keyboard input. At this time, the system often appears to be stuck, and it is impossible to query the process status to solve the current system stuck problem, thus affecting the user experience.

[0034] In order to solve the above problems, the embodiments of the present disclosure provide a process processing method, device, equipment, medium and vehicle.

[0035] Figure 1 The process flow diagram of a process processing method provided by the embodiment of the present disclosure can be executed by a process processing device, a microkernel, etc., wherein the process processing device can be implemented by software and / or hardware, and can generally be integrated in an electronic device. The process processing device and / or the electronic device can be configured in a vehicle. Figure 1 As shown, the method is applied to a microkernel, and the method includes:

[0036] Step 101, detecting the state of a first process in the user space of the microkernel.

[0037] Step 102: When it is detected that the state of the first process meets the preset blocking condition, a target process corresponding to the first process is established in the kernel space of the microkernel.

[0038] Among them, the microkernel can be a simplified version of the kernel that provides the core functions of the operating system. This embodiment does not limit the specific type and version of the microkernel to be processed. A process is also called a task. It can be understood that a function implementation unit with a smaller granularity, such as a thread, is also within the protection scope of this disclosure. User space and kernel space can be different storage spaces of a microkernel operating system. User space is also called user space. If a process runs in user space, the process is in user state. Kernel space is also called kernel space. If a process runs in kernel space, the process is in kernel state. The state of a process can represent changes in the execution process of a process. There are many states of the process, which are not limited in this embodiment. For example, the state of the process can include: one or more of a new state, a terminated state, a running state, a ready state, and a blocked state. Optionally, the state of the process can also be a subdivided state under a state such as a blocked state, for example, timeout blocking, blocking caused by communication with an abnormal process, etc. The state of the first process can be a change in the execution process of the first process.

[0039] The first process may be one or more processes that already exist in the user space. This embodiment does not limit the process type of the first process. For example, the process type of the first process may be one or more of a process management type, a device driver type, a shell type, and a file system type. Among them, a shell-type process may be a process for executing a user's input command on a terminal. The shell process may interpret the input command and send the input command to the operating system of the microkernel system for execution. The shell process may perform human-computer interaction between the user and the operating system.

[0040] The preset blocking condition may be a preset condition indicating that a process is blocked and the blockage is difficult to resolve. There are multiple preset blocking conditions, which may be set according to user needs, etc., and are not limited in this embodiment. For example, the preset blocking condition may include one or more of a timeout blocking condition and an abnormal process blocking condition. The timeout blocking condition indicates that the blocking duration exceeds a preset duration threshold, and the abnormal process blocking condition indicates that the second process that causes the blockage by communicating with the first process is a preset abnormal process, and the preset abnormal process may be a process that causes the blockage frequency greater than a preset frequency.

[0041] The target process may be a process in the kernel space established based on the first process in the user space, through which the basic functions or all functions of the first process can be realized, wherein the basic functions may be understood as the core functions or simplified functions of the first process.

[0042] In an optional implementation, the first process has a corresponding first process type; in a microkernel, processes belonging to the first process type run in a user space; in a macrokernel, processes belonging to the first process type run in a kernel space. The first process type may represent the process type to which the first process belongs. A macrokernel is also called a monolithic kernel.

[0043] In this embodiment, the process belonging to the first process type may be a process that runs in the kernel space of the macro kernel but runs in the user space of the micro kernel. For example, the first process type includes but is not limited to: one or more of a process management type, a device driver type, a shell type, and a file system type.

[0044] In the embodiment of the present disclosure, the process processing device can perform real-time detection on the state of one or more first processes running in the user space of the microkernel to be processed. If the state of the first process is a blocking state and the state of the first process meets the preset blocking condition, it means that the first process has a defect, or other processes communicating with the first process are more likely to have defects, and the blocking of the first process is less likely to end. Then, in the kernel space where the possibility of defective processes is less, a target process with the basic functions or all functions of the first process is established.

[0045] Thus, when an exception occurs in the user space, causing the first process to be blocked for too long, a target process corresponding to the first process is established in the kernel space where the exception has not yet occurred, creating basic conditions for the subsequent target process in the kernel space to run normally.

[0046] In some embodiments of the present disclosure, when it is detected that the state of the first process meets the preset blocking condition, it includes: determining a second process with which the first process communicates when the first process is in a blocking state; if the second process is a preset abnormal process, determining that the state of the first process meets the preset blocking state.

[0047] In some embodiments of the present disclosure, when it is detected that the state of the first process meets the preset blocking condition, it includes: determining the blocking time length for which the state of the first process continues to remain in the blocked state; if the blocking time length is greater than the preset time length threshold, determining that the state of the first process meets the preset blocking condition.

[0048] The blocking duration may be the length of time that the first process is in a blocking state due to inter-process communication. The preset duration threshold may be a preset maximum value of the blocking duration, which may be set according to user needs, etc., and is not limited in this embodiment. For example, the preset duration threshold may be 5 seconds.

[0049] In the disclosed embodiment, the process processing device may periodically detect the first process to determine whether the first process is in a blocked state in the current cycle, and if the first process is in a blocked state, determine the blocking time for which the first process remains in the blocked state. Compare the blocking time of the current cycle with a preset time threshold, and if the blocking time is greater than the preset time threshold, it means that the first process has been blocked for too long in the current cycle, and it is determined that the first process meets the preset blocking condition; if the blocking time is not greater than the preset time threshold, it means that the first process has not been blocked for too long in the current cycle, and the first process is continuously detected in the next cycle of the current cycle.

[0050] In some embodiments of the present disclosure, determining the blocking duration for which the state of the first process continues to remain in a blocked state includes: periodically scheduling the first process at preset cycle intervals; if the scheduling of the first process fails in the current cycle, adding the blocking duration of the previous cycle to the preset cycle interval to obtain the blocking duration of the current cycle; if the scheduling of the first process is successful in the current cycle, setting the blocking duration of the current cycle to the initial duration.

[0051] Among them, the preset cycle interval can be the duration between the preset cycles for scheduling the first process. The preset cycle interval can be set according to user needs, etc., and is not limited in this embodiment. For example, the preset cycle interval can be 0.01 seconds, that is, the first process is scheduled once every 0.01 seconds. The blocking duration can be a value used to record the duration of continuous scheduling failures. The initial duration can be an initial value for recording the duration of continuous scheduling failures. The initial duration can be set according to user needs, etc., and is not limited in this embodiment. For example, the initial duration can be 0. The previous cycle can be the previous cycle adjacent to the current cycle. The next cycle can be the next cycle adjacent to the current cycle.

[0052] In this embodiment, the process processing device can schedule the first process according to the preset cycle. Taking the current cycle as an example, if the first process cannot be scheduled in the current cycle, the blocking duration of the previous cycle of the current cycle is obtained, and the blocking duration of the previous cycle is added to the preset cycle interval to obtain the blocking duration of the current cycle, and the blocking duration of the current cycle is used as the blocking duration of the new previous cycle. When scheduling the first process of the next cycle, if the first process still cannot be scheduled, the preset cycle interval is accumulated based on the blocking duration of the new previous cycle. Until the first process can be scheduled and the blocking duration is set to the initial duration, or the blocking duration of the current cycle is greater than the preset duration threshold.

[0053] If the first process can be scheduled in the current cycle, the initial duration (for example, 0) will be used as the blocking duration of the current cycle and the new blocking duration of the previous cycle. When scheduling the first process of the next cycle, if the first process cannot be scheduled, the preset cycle interval will be accumulated based on the new blocking duration of the previous cycle which is the initial duration.

[0054] In some embodiments of the present disclosure, a target process corresponding to the first process is established in the kernel space of the microkernel, including: determining a candidate program that successfully matches the process type identifier of the first process among multiple candidate programs in the kernel space as the target program; and running the target program in the kernel space to obtain the target process.

[0055] The process type identifier may be an identifier for marking a process type, and the process type identifier may correspond one-to-one to the process type to which the process belongs. For example, shell processes belonging to the same shell type correspond to the same process type identifier. The candidate program may be an application program pre-set in the kernel space, and the candidate program may be run in the kernel space to obtain a corresponding candidate process, and the candidate program may correspond one-to-one to the process type. The target program may be a program in the candidate program that corresponds to the process identifier. The target process may be a process obtained by running the target program.

[0056] In this embodiment, a plurality of candidate programs can be pre-set in the kernel space of the microkernel. After determining that the state of the first process in the user space satisfies the preset blocking condition, the process type of the first process is determined, and a process type identifier corresponding to the process type is determined. The candidate type identifier and the process type identifier corresponding to each candidate program are matched, and the candidate program with successful matching is determined as the target program. The candidate type identifier is used to characterize the process type to which the process generated by the running of the candidate program belongs. Further, the target program is run in the kernel space of the microkernel to be processed to obtain a target process corresponding to the target program.

[0057] Step 103: Execute relevant data processing of the first process through the target process.

[0058] The relevant data processing may be data processing originally performed through the first process.

[0059] In an embodiment of the present disclosure, after determining a first process that meets preset blocking conditions and a target process that has the basic functions or all functions of the first process, the target process in the kernel space is used to replace the blocked first process in the user space, and the data that was originally processed by the first process and has not yet been processed is processed by the target process.

[0060] Figure 2 A flowchart of another process processing method provided by an embodiment of the present disclosure is shown as follows: Figure 2 As shown, in some embodiments of the present disclosure, the relevant data processing of the first process is performed by the target process, including:

[0061] Step 201, determining a data input channel and a data output channel of a first process; wherein a channel outlet of the data input channel is connected to the first process, and a channel inlet of the data output channel is connected to the first process.

[0062] The data input channel may be a channel for inputting data into a process, and the data output channel may be a channel for outputting data generated by a process. The channel inlet may be a data input end of the data channel, and the channel outlet may be a data output end of the data channel.

[0063] In this embodiment, the process processing device can determine the data input channel for the first process data input according to the input port setting of the first process, and determine the data output channel for the first process data output according to the output port setting of the first process. In addition, if the first process is used to interact with the user for data, the channel inlet of the data input channel can be connected to the data input device, the channel outlet of the data input channel is connected to the first process, and the channel inlet of the data output channel can be connected to the first process, and the channel outlet of the data output channel can be connected to the data display device.

[0064] Step 202, connecting the channel outlet of the data input channel to the target process, and connecting the channel inlet of the data output channel to the target process.

[0065] Step 203, sending input data to the target process through the channel exit of the data input channel, processing the input data through the target process to obtain output data, and receiving the output data through the channel entry of the data output channel.

[0066] In this embodiment, the process processing device may disconnect the first process from the channel outlet of its data input channel, and connect the channel outlet of the data input channel to the target process, so that the data previously input to the first process is input to the target process. In addition, the process processing device may disconnect the first process from the channel inlet of its data output channel, and connect the channel inlet of the data output channel to the target process, so that the channel that previously received the output data of the first process receives the output data of the target process.

[0067] Further, after completing the data channel connection related to the target process, the data input device inputs the input data into the target process through the channel entrance of the data input channel, and the target process processes the input data to generate corresponding output data, or the target process can forward the input data to the kernel, and the kernel processes the input data to generate corresponding output data, and sends the output data to the target process. Further, the target process inputs the output data into the data output channel through the channel entrance of the data output channel, and transmits the output data through the data output channel. In an optional implementation, if the first process is a first shell process and the target process is a target shell process, the output data can be output to the data display device through the data output channel, and the output data is displayed by the data display device.

[0068] The process processing method provided by the embodiment of the present disclosure is applied to a microkernel, and includes: detecting the state of a first process in the user space of the microkernel; when it is detected that the state of the first process meets a preset blocking condition, establishing a target process corresponding to the first process in the kernel space of the microkernel; and executing relevant data processing of the first process through the target process. In the embodiment of the present disclosure, when a process in the user space of the microkernel meets the blocking condition, a new process is established in the kernel space of the microkernel, and the blocked process is replaced by the new process, thereby avoiding the factors that cause process blocking in the user space from causing the new process to be blocked again, and subsequently converting the call to the blocked process in the user space for data processing into the call to the new process in the kernel space for data processing, so that the function of the original process can be implemented normally, improving the user experience.

[0069] In some embodiments of the present disclosure, the first process is a first shell process, and the target process is a target shell process. The process processing method also includes: receiving a process status query instruction input by a user through the target shell process; running the process status query instruction to obtain a query result, and displaying the query result through the target shell process; wherein the query result includes a status query result of the first shell process.

[0070] The shell process is also called a shell process, through which input data generated by a serial port keyboard or the like can be received, and through which the generated data can be displayed to the user. The process status query instruction can be a microkernel debugging instruction, and this embodiment does not limit the process status query instruction. For example, the process status query instruction can be a process status view (Process Status, PS) instruction.

[0071] In this embodiment, if the state of the first shell process in the user space of the microkernel to be processed meets the preset blocking condition, the first shell process cannot process the input data generated by the keyboard and other devices, and then the operating system cannot obtain the data generated by the keyboard and other devices, and cannot respond to the data, and the operating system appears to be stuck. The first shell process is replaced by the target shell process, and the data receiving, data forwarding, data output and other functions of the first shell process can be realized through the target shell process. Specifically, the process status query instruction input by the user through the keyboard, screen touch and other methods is received through the target shell process, and the process status query instruction is forwarded to the kernel, and the process status query instruction is run through the kernel to obtain the corresponding query result. The query result is sent to the data display device through the target shell process, and the query result is displayed to the user through the screen display function, voice broadcast function and other functions of the data display device, so that the user can determine the reason why the first shell process in the current user space is blocked based on the query result.

[0072] In the above scheme, when the shell process in the user space is continuously blocked, causing the operating system to be unable to respond to user interaction, a new shell process is established in the kernel space, and the process status is queried through the shell process, thereby laying the foundation for determining the cause of the process blocking.

[0073] Next, the process processing method in the embodiment of the present disclosure is further explained through a specific example. In the related art, in an operating system based on a microkernel architecture, a large number of service processes run in the user space. The shell process (based on the shell process, the user can enter commands through the keyboard to interact with the operating system) is also a process running in the user space. The processes communicate with each other through IPC technology. Since the shell process is in the user space, and the shell process communicates with other processes in the user space through IPC technology, the shell process may be blocked due to interference from other processes.

[0074] Figure 3 A schematic diagram of a process being blocked in a user space of a microkernel provided in an embodiment of the present disclosure, such as Figure 3As shown, the first shell process in the user space is performing IPC communication with other processes. Through the IPC communication, the first shell process can send data to other processes. In a microkernel operating system, the specific method of IPC communication is to enter the kernel space, execute the real data sending (send) by the kernel, and then wait for other processes to receive (recv) the data. If in the process of waiting for other processes to receive data, the other processes have defects (bugs) and cannot receive the data, then the first shell process will remain blocked and cannot be called by other processes. If the first shell process is blocked all the time and cannot work normally, even if the rest of the processes in the operating system are in a normal state, since the first shell process controls the interaction between the user and the operating system, the operating system still cannot respond to keyboard input. At this time, the operating system often appears to be stuck, thereby affecting the user experience.

[0075] In this embodiment, since the first shell process in the user space has the risk of being blocked, the kernel monitors the first shell process. If it is found that the first shell process has been in a blocked state for a period of time, the kernel takes over the serial port input of the operating system (the serial port input includes keyboard input, etc.) and reconstructs a simple target shell process in the kernel space, that is, another shell process is implemented by the kernel, and the user's keyboard input is responded to through the target shell process. The user can monitor the operating system through the target shell process, and then the cause of the operating system freezing problem is located.

[0076] Figure 4 A flowchart of another process processing method provided by the embodiment of the present disclosure is shown as follows: Figure 4 As shown, the method includes:

[0077] Step 401, scheduling the first shell process in the user space.

[0078] Specifically, the process processing device in the kernel can detect whether the first shell program is blocked by scheduling the first shell program in the user space.

[0079] Step 402, detect whether the first shell process is blocked. If so, execute step 404, otherwise, execute step 403.

[0080] Specifically, in the process of the kernel scheduling the shell process, the blocking duration of the shell process is determined by the number of scheduling failures of the shell process. If the kernel schedules the shell process successfully, it means that the shell process is not in a blocked state; if the kernel fails to schedule the shell process, it means that the shell process is in a blocked state.

[0081] Step 403: The blocking duration is set to 0. Specifically, if the first shell process is not blocked, the blocking duration is determined to be 0.

[0082] Step 404, determine whether the blocking duration is greater than a preset duration threshold. If yes, execute step 405, otherwise, execute step 402.

[0083] Specifically, the timing starts when the first shell process enters the blocking state. If the first shell process exits the blocking state, the timing ends and the blocking time is cleared. If the blocking time of the blocking state has not been cleared within the preset time threshold (for example, 5 seconds), it means that an unknown situation has occurred in the first shell process, causing the first shell process to be in the blocking state. At this time, the operating system also appears to be stuck and cannot respond to the user's keyboard input. If the blocking time is not greater than the preset time threshold, it returns to continue to detect whether the first shell process is blocked.

[0084] Step 405, create a target shell process in the kernel space.

[0085] Specifically, when it is detected that the first shell process meets the preset blocking condition, the kernel takes over the serial port and creates a new target shell process in the kernel space, and replaces the first shell process with the target shell process.

[0086] Step 406: interact with the user through the target shell process.

[0087] Step 407, determining the query result according to the process status query instruction.

[0088] Specifically, the user can input a process status query instruction through the keyboard, and the target shell process processes the process status query instruction to generate the status of each process in the operating system, which lays a foundation for the user to locate the reason why the first shell process in the operating system is blocked based on the status of each process.

[0089] In the above scheme, it is proposed that in an operating system based on a microkernel architecture, when it is detected that the first shell process running in the user space is blocked, a new target shell process is established in the kernel space, which provides a method for the microkernel operating system to prevent the system from freezing and locate the cause of the freezing through the new target shell process, and has high practical value.

[0090] Figure 5 A schematic diagram of the structure of a process processing device provided by an embodiment of the present disclosure is shown.

[0091] In some embodiments of the present disclosure, Figure 5 The process processing device shown can be executed by an electronic device or a server. The electronic device may include but is not limited to mobile terminals such as smart phones, laptops, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), wearable devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. The server may be a server cluster or a cloud server.

[0092] like Figure 5 As shown, the process processing device 500 may include: a detection module 501 , a creation module 502 , and an execution module 503 .

[0093] A detection module 501, used for detecting the state of a first process in a user space of the microkernel;

[0094] An establishing module 502, configured to establish a target process corresponding to the first process in the kernel space of the microkernel when it is detected that the state of the first process meets a preset blocking condition;

[0095] The execution module 503 is used to execute the relevant data processing of the first process through the target process.

[0096] Optionally, the establishing module 502 includes:

[0097] A first determining unit, configured to determine a blocking time duration during which the state of the first process continues to remain in a blocked state;

[0098] The second determining unit is configured to determine that the state of the first process meets the preset blocking condition if the blocking duration is greater than a preset duration threshold.

[0099] Optionally, the first determining unit is configured to:

[0100] Periodically scheduling the first process at preset periodic intervals;

[0101] If the first process fails to be scheduled in the current cycle, the blocking duration of the previous cycle is added to the preset cycle interval to obtain the blocking duration of the current cycle;

[0102] If the first process is successfully scheduled within the current cycle, the blocking duration of the current cycle is set to the initial duration.

[0103] Optionally, the establishing module 502 includes:

[0104] A third determining unit is used to determine, among the multiple candidate programs in the kernel space, a candidate program that successfully matches the process type identifier of the first process as a target program;

[0105] The running unit is used to run the target program in the kernel space to obtain the target process.

[0106] Optionally, the execution module 503 is used to:

[0107] Determine a data input channel and a data output channel of the first process; wherein a channel outlet of the data input channel is connected to the first process, and a channel inlet of the data output channel is connected to the first process;

[0108] Connecting the channel outlet of the data input channel to the target process, and connecting the channel inlet of the data output channel to the target process;

[0109] Input data is sent to the target process through the channel exit of the data input channel, the input data is processed by the target process to obtain output data, and the output data is received through the channel entrance of the data output channel.

[0110] Optionally, the first process is a first shell process, the target process is a target shell process, and the device further includes:

[0111] A receiving module, used for receiving a process status query instruction input by a user through the target shell process;

[0112] A running module is used to run the process status query instruction to obtain a query result, and display the query result through the target shell process; wherein the query result includes a status query result of the first shell process.

[0113] The process processing device provided in the embodiments of the present disclosure can execute the process processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0114] Figure 6 A schematic diagram of the hardware circuit structure of a process processing device provided by an embodiment of the present disclosure is shown.

[0115] like Figure 6 As shown, the process processing device 600 may include a controller 601 and a memory 602 storing computer program instructions.

[0116] Specifically, the controller 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0117] The memory 602 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 602 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 602 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 602 is a non-volatile solid-state memory. In a particular embodiment, the memory 602 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.

[0118] The controller 601 reads and executes the computer program instructions stored in the memory 602 to perform the steps of the process processing method provided in the embodiment of the present disclosure.

[0119] In one example, the process processing device 600 may further include a transceiver 603 and a bus 604. Figure 6 As shown, the controller 601, the memory 602 and the transceiver 603 are connected via a bus 604 and communicate with each other.

[0120] The bus 604 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 604 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0121] The following is an embodiment of a computer-readable storage medium provided in an embodiment of the present disclosure. The computer-readable storage medium and the process processing method of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the computer-readable storage medium, reference can be made to the embodiment of the above-mentioned lane keeping method.

[0122] This embodiment provides a storage medium containing computer executable instructions, which are used to execute a process processing method when executed by a computer processor.

[0123] Of course, the storage medium containing computer executable instructions provided by the embodiment of the present disclosure is not limited to the above method operations, and the computer executable instructions can also execute related operations in the process processing method provided by any embodiment of the present disclosure.

[0124] Through the above description of the implementation methods, the technical personnel in the relevant field can clearly understand that the present disclosure can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the 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 (FLASH), hard disk or optical disk, etc., including a number of instructions to enable a computer cloud platform (which can be a personal computer, a server, or a network cloud platform, etc.) to execute the process processing method provided by each embodiment of the present disclosure.

[0125] The embodiments of the present disclosure also provide a vehicle, comprising at least one of the following: the process processing device mentioned above; the electronic device mentioned above; and the computer-readable storage medium mentioned above.

[0126] Note that the above are only preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art will understand that the present disclosure is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present disclosure. Therefore, although the present disclosure is described in more detail through the above embodiments, the present disclosure is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present disclosure, and the scope of the present disclosure is determined by the scope of the appended claims.

Claims

1. A process processing method, characterized in that: Applied to microkernel, including: Detecting a state of a first process in a user space of the microkernel; When it is detected that the state of the first process meets the preset blocking condition, establishing a target process corresponding to the first process in the kernel space of the microkernel; The target process is used to execute the data processing related to the first process.

2. The method according to claim 1, characterized in that: When the state of the first process is detected to meet a preset blocking condition, the method includes: Determine a blocking time duration during which the state of the first process remains in a blocked state; If the blocking duration is greater than a preset duration threshold, it is determined that the state of the first process meets the preset blocking condition.

3. The method according to claim 2, characterized in that The determining the blocking time duration during which the state of the first process continues to remain in the blocking state includes: Periodically scheduling the first process at preset periodic intervals; If the first process fails to be scheduled in the current cycle, the blocking duration of the previous cycle is added to the preset cycle interval to obtain the blocking duration of the current cycle; If the first process is successfully scheduled within the current cycle, the blocking duration of the current cycle is set to the initial duration.

4. The method according to claim 1, characterized in that The step of establishing a target process corresponding to the first process in the kernel space of the microkernel includes: Determine, among the multiple candidate programs in the kernel space, a candidate program that successfully matches the process type identifier of the first process as a target program; The target program is run in the kernel space to obtain the target process.

5. The method according to claim 1, characterized in that The performing of the related data processing of the first process by the target process includes: Determine a data input channel and a data output channel of the first process; wherein a channel outlet of the data input channel is connected to the first process, and a channel inlet of the data output channel is connected to the first process; Connecting the channel outlet of the data input channel to the target process, and connecting the channel inlet of the data output channel to the target process; Input data is sent to the target process through the channel exit of the data input channel, the input data is processed by the target process to obtain output data, and the output data is received through the channel entrance of the data output channel.

6. The method according to claim 1, characterized in that The first process is a first shell process, the target process is a target shell process, and the method further includes: Receiving a process status query instruction input by a user through the target shell process; Run the process status query instruction to obtain a query result, and display the query result through the target shell process; wherein the query result includes a status query result of the first shell process.

7. A process processing device, characterized in that: Applied to microkernel, including: A detection module, used for detecting the state of a first process in a user space of the microkernel; An establishing module, configured to establish a target process corresponding to the first process in the kernel space of the microkernel when it is detected that the state of the first process meets a preset blocking condition; An execution module is used to execute the relevant data processing of the first process through the target process.

8. An electronic device, characterized in that: The electronic device comprises: Processor and memory; The processor is used to execute the steps of the method according to any one of claims 1 to 6 by calling the program or instruction stored in the memory.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the steps of the method according to any one of claims 1 to 6.

10. A vehicle, characterized in that: Include at least one of the following: The process processing device as claimed in claim 8; The electronic device as claimed in claim 9; The computer readable storage medium of claim 10.