Information processing system and information processing program
The information processing system manages resource information across processors to automatically recover from exceptions, ensuring seamless operation by securing and regenerating tasks, thus avoiding reboot and reprocessing.
Patent Information
- Application Number
- JP2023047323
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-23
- Publication Date
- 2024-10-04
AI Technical Summary
When multiple processors communicate and an exception occurs during resource usage, the secured resources remain locked, leading to processing failures and requiring a reboot and reprocessing.
An information processing system with a resource information management unit that updates and manages resource information across processors, allowing automatic recovery by releasing and regenerating tasks to secure resources and handle exceptions.
Enables automatic recovery and prevents inconsistencies, allowing processes to resume without user intervention by securing resources and regenerating tasks.
Smart Images

Figure 2024136260000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an information processing system and an information processing program. [Background technology]
[0002] Patent document 1 proposes a computer system in which a process that has acquired an exclusive control module representing exclusive use of a resource shared by multiple processes acquires exclusive use of the resource corresponding to that semaphore, and in which a process loses exclusive use of the corresponding resource when it releases the semaphore, the computer system defines an exception handler for each semaphore that describes the processing procedure to be performed in the event of an abnormal termination of the resource that it exclusively controls, and in the event that a task terminates abnormally while still acquiring the semaphore, the computer system invokes the exception handler defined for that semaphore.
[0003] Patent Document 2 proposes a system management method having an AP section consisting of a plurality of application programs, and an OS section which executes a program to give instructions to the application programs and manages the execution status of the programs, and in a system state storage section which stores the execution status of the programs, the OS section is provided with a resource management section which manages a plurality of resources and an OS processing section which executes the processing of the operating system, and the method manages abnormal states of the system by monitoring the usage time of resources acquired by application programs using a timer in the resource management section and measuring the time that the resources are owned (the time from acquisition to release). [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Publication No. 11-24947 [Patent Document 2] Japanese Patent Application Publication No. 5-342023 Summary of the Invention [Problem to be solved by the invention]
[0005] In the case of a system having multiple processors that communicate with each other, the processor that receives a processing command among the multiple processors secures resources to be used in the processing corresponding to the processing command. If an exception occurs during the processing, the resources at the time of the exception occurrence remain secured, so when the processing command is received again, the resources cannot be secured and the processing ends in an error, requiring the user to restart the system and execute the processing again.
[0006] Therefore, an object of the present disclosure is to provide an information processing system and an information processing program that are capable of automatic recovery even when using resources other than resources that are exclusively controlled by multiple processors that communicate with each other. [Means for solving the problem]
[0007] In order to achieve the above-mentioned object, an information processing system according to a first aspect includes a plurality of processors which communicate with each other, and a first processor among the plurality of processors which receives a processing command stores information regarding resources to be secured in response to processing of the received processing command in a predetermined resource information management unit, and when an exception occurs in the processing corresponding to the processing command, updates the information regarding the resources corresponding to the processing stored in the resource information management unit, and performs processing to transmit a notification of the exception occurrence in the processing corresponding to the processing command to the processor which sent the processing command.
[0008] In a second aspect of the information processing system, in the information processing system of the first aspect, when the resource is an exclusively controlled resource, the first processor uses an operating system function to release the resource based on information about the resource stored in the resource information management unit, and updates the information about the resource stored in the resource information management unit to a state where no resource has been acquired.
[0009] An information processing system according to a third aspect is an information processing system according to the first aspect, in which, when the resource is acquired from a process other than the process in which the exception occurred, the first processor retains the resource without releasing it based on information about the resource retained in the resource information management unit.
[0010] An information processing system according to a fourth aspect is the information processing system according to the first aspect, wherein the first processor deletes the task that performs the processing where the exception occurred using an operating system function, and regenerates a task having the processing function of the deleted task.
[0011] An information processing system according to a fifth aspect is an information processing system according to the fourth aspect, in which when the first processor receives the processing command again, the first processor acquires the resource through the regenerated task, stores information relating to the acquired resource in the resource information management unit, and performs processing corresponding to the processing command.
[0012] An information processing program according to a sixth aspect causes a computer to receive a processing command, store information regarding resources to be secured in response to processing of the received processing command in a predetermined resource information management unit, and, when an exception occurs in the processing corresponding to the processing command, update the information regarding the resources corresponding to the processing stored in the resource information management unit, and send a notification of the exception occurrence in the processing corresponding to the processing command to a processor that sent the processing command. Effect of the Invention
[0013] According to the first aspect, it is possible to provide an information processing system that is equipped with a plurality of processors that communicate with each other and that is capable of automatic recovery even when using resources other than resources that are exclusively controlled.
[0014] According to the second aspect, it is possible to secure resources that are exclusively controlled when recovering, and recover from the occurrence of an exception.
[0015] According to the third aspect, it is possible to prevent inconsistencies from occurring other than in the process in which the exception occurred.
[0016] According to the fourth aspect, it is possible to re-execute the process in which the exception has occurred.
[0017] According to the fifth aspect, the process in which the exception occurred can be executed by re-receiving the process command.
[0018] According to the sixth aspect, it is possible to provide an information processing program that is capable of automatic recovery even when using a resource other than a resource that is exclusively controlled by a plurality of processors that communicate with each other. [Brief description of the drawings]
[0019] [Figure 1] FIG. 1 is a block diagram showing a basic configuration of an information processing device according to an embodiment of the present invention. [Diagram 2] 1 is a diagram for explaining a conventional process when an exception occurs, which requires the user to restart the device and re-execute the process. FIG. [Diagram 3] 1 is a block diagram showing a specific configuration of an information processing device according to an embodiment of the present invention. [Figure 4] 11 is a diagram for explaining a processing procedure when an exception occurs in the information processing device according to the present embodiment. FIG. [Diagram 5] 5 is a flowchart showing an example of a flow of processing performed by a main processor in the information processing device according to the present embodiment. [Figure 6] 10 is a flowchart showing an example of a flow of processing performed by a sub-processor in the information processing device according to the present embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0020] An example of an embodiment of the present disclosure will be described in detail below with reference to the drawings. Fig. 1 is a block diagram showing the basic configuration of an information processing device according to the present embodiment.
[0021] 1, an information processing device 10 according to the present embodiment includes a plurality of processors, and performs data communication between the two processors via a shared memory 16. In the present embodiment, as an example, an information processing device 10 provided in an image forming device, an image processing device, or the like will be described. Also, as an example of the plurality of processors, two processors, a main processor 12 and a sub-processor 14 as an example of a first processor, will be described as an example in which the sub-processor 14 is specialized for image processing.
[0022] The flow of data communication in the information processing device 10 according to this embodiment is roughly as follows: Note that 1 to 4 in FIG.
[0023] Step 1. The main processor 12 transmits an inter-OS communication command from the inter-OS communication module 18 of the main processor 12 and stores it in the inter-OS communication command storage area 22 of the shared memory 16. The inter-OS communication command transmits, for example, a processing command such as information required for image processing to the shared memory 16.
[0024] Step 2: The inter-OS communication module 20 on the sub-processor 14 receives an interrupt notification from the inter-OS communication module 18 on the main processor 12 that the inter-OS communication command has been stored, and receives the inter-OS communication command from the shared memory 16 .
[0025] Step 3: The sub-processor 14 executes the process (eg, image processing) corresponding to the received inter-OS communication command, and transmits an inter-OS communication command indicating the execution result from the inter-OS communication module 20 on the sub-processor 14 side to the shared memory 16.
[0026] Step 4: The inter-OS communication module 18 on the main processor 12 side receives an interrupt notification from the inter-OS communication module 20 on the sub-processor 14 side indicating that the inter-OS communication command has been stored successfully upon successful completion of image processing, and receives the inter-OS communication command from the shared memory 16.
[0027] However, if a resource such as a semaphore, which is a resource that performs exclusive control, is reserved when a software exception occurs, simply restarting the device and re-executing the process will not allow the software to continue re-executing normally, and the user will need to restart the device and re-execute the process. Note that in this embodiment, the resource refers to a memory area that the main processor 12 or the sub-processor 14 uses to execute various processes such as image processing.
[0028] Here, we will explain semaphores as an example of resources. By "acquiring" a semaphore, for example, two tasks can mutually exclude or wait for processing.
[0029] In a multitasking environment such as this embodiment, task A and task B exist, and task A and task B access the same memory, with task A writing to the memory and task B reading from the memory.
[0030] The expected value is assumed to be that task A writes "0x1" to memory, and task B reads "0x1" from memory. In a multitasking environment, task A and task B access memory at the same time, so task B may not be able to read "0x1" correctly. In such a case, a semaphore is used to exclude processing so that task B cannot access memory while task A is accessing memory. The procedure for exclusion is as follows:
[0031] 1. Before task A accesses memory, it acquires a semaphore for exclusive processing (number of semaphores: 1 -> 0). In the following, it is assumed that task A is accessing memory. 2. Before Task B accesses memory, it attempts to acquire a semaphore for exclusive processing, but since there is no semaphore to acquire, the processing will wait until a semaphore can be acquired. 3. After task A completes the process of writing to memory, it releases the semaphore (number of semaphores changes from 0 to 1). 4. Task B can acquire the semaphore (number of semaphores 1 → 0) and can read it to memory.
[0032] Semaphores use system calls from the OS (Operating System) to obtain resources from the OS's management area.
[0033] Next, a simple explanation will be given of conventional processing when an exception occurs, which requires the user to restart the device and re-execute the process, with reference to Fig. 2. Fig. 2 is a diagram for explaining conventional processing when an exception occurs, which requires the user to restart the device and re-execute the process. Note that 1. to 13. in Fig. 2 indicate the procedure of the processing.
[0034] Step 1: Information required for image processing is sent from the inter-OS communication module 18 of the main processor 12 to the shared memory 16 as an inter-OS communication command, and stored in the inter-OS communication command storage area 22 of the shared memory 16 .
[0035] Step 2: The inter-OS communication module 20 on the sub-processor 14 receives an interrupt notification from the inter-OS communication module 18 on the main processor 12 that the inter-OS communication command has been stored, and receives the inter-OS communication command from the shared memory 16 .
[0036] Step 3: The inter-OS communication module 20 (task 24 in FIG. 2) on the sub-processor 14 side acquires a semaphore resource to exclude or synchronize image processing according to the inter-OS communication command received from the shared memory 16. Note that although semaphores are given as an example of resources here, resources are not limited to semaphores.
[0037] Step 4: During image processing after acquiring the semaphore resource, the sub-processor encounters an abnormal software calculation process due to a hardware malfunction or the like, causing a software exception.
[0038] Step 5: The OS on the sub-processor 14 side detects the occurrence of a software exception, and the exception handler based on the exception-occurring task recovery routine 26 is activated.
[0039] Step 6: The exception handler activated on the sub-processor 14 side deletes the task in which the exception occurred using the OS functions, and regenerates a task 28 having the same processing functions as the deleted task 24.
[0040] Step 7: Information indicating that an exception has occurred is stored from the inter-OS communication module 20 on the sub-processor 14 side to the shared memory 16. The information to be stored may be, for example, a defined value similar to that used to identify a command.
[0041] Step 8: The inter-OS communication module 18 on the main processor 12 side receives an interrupt notification from the inter-OS communication module 20 on the sub-processor 14 side notifying the completion of storage of the exception occurrence information, and receives the exception occurrence information stored in the shared memory 16 .
[0042] Step 9: The inter-OS communication module 18 on the main processor 12 side receives the exception occurrence information from the shared memory 16 and re-transmits to the shared memory 16 the inter-OS communication command that was transmitted immediately before the exception occurred.
[0043] Step 10: The inter-OS communication module 20 on the sub-processor 14 side receives an interrupt notification from the inter-OS communication module 18 on the main processor 12 side that storage of the inter-OS communication command has been completed, and receives the inter-OS communication command from the shared memory 16. Note that the image processing task 24 that processes the inter-OS communication command received in step 2 and the image processing task 28 that processes the inter-OS communication command re-received in step 10 have the same role and perform the same processing. However, since the task was regenerated in step 6, the task ID that identifies the task may be different.
[0044] Step 11: The image processing task 28 on the sub-processor 14 side attempts to acquire semaphore resources to exclude or synchronize image processing corresponding to the received inter-OS communication command. However, since resources such as semaphores remain in the reserved state when the software exception occurs, the image processing task 28 fails to acquire resources when the command is resent, and the processing ends with an error.
[0045] Step 12: The inter-OS communication module 20 on the sub-processor 14 side transmits to the shared memory 16 information indicating that the image processing has ended in error.
[0046] Step 13: The inter-OS communication module 18 on the main processor 12 side receives an interrupt notification from the inter-OS communication module 20 on the sub-processor 14 side that the storage of the inter-OS communication command has been completed, indicating that the image processing has ended in an error, and receives the inter-OS communication command from the shared memory 16. The main processor 12 returns a response to the resent inter-OS communication command, but the processing result is an error, requiring the user to restart the device and re-execute the process.
[0047] Therefore, in the information processing device 10 according to the present embodiment, the sub-processor 14 that receives an inter-OS communication command as a processing command from the main processor 12 holds information on resources to be secured in response to the processing of the received inter-OS communication command in a predetermined resource information management section, and when an exception occurs in the processing corresponding to the inter-OS communication command, updates the information on the resources corresponding to the processing held in the resource information management section, and transmits the occurrence of the exception in the processing corresponding to the inter-OS communication command to the main processor 12 that transmitted the inter-OS communication command. Note that the number of processors may be three or more. That is, in the information processing device 10 according to the present embodiment, the first processor that receives a processing command among the multiple processors holds information on resources to be secured in response to the processing of the received processing command in a predetermined resource information management section, and when an exception occurs in the processing corresponding to the processing command, updates the information on the resources corresponding to the processing held in the resource information management section, and transmits the occurrence of the exception in the processing corresponding to the processing command to the processor that transmitted the processing command.
[0048] Specifically, as shown in FIG. 3, a resource information management unit 34 is provided in a system 32 specialized for image processing that includes a sub-processor 14. When the sub-processor 14 receives an inter-OS communication command and secures resources, the resource information is stored in the resource information management unit 34. When an exception occurs, the sub-processor 14 updates the resource information stored in the resource information management unit 34 corresponding to the process, and transmits the occurrence of an exception in the process corresponding to the inter-OS communication command to the main processor 12. As a result, when the main processor 12 retransmits the inter-OS communication command and executes the process corresponding to the inter-OS communication command, the resource information has been updated, so that the resource is secured and the process in which the exception occurred is executed. Therefore, the system is automatically restored without the user having to reboot and re-execute the device. FIG. 3 is a block diagram showing a specific configuration of the information processing device 10 according to this embodiment.
[0049] Here, the processing procedure when an exception occurs in the information processing device 10 according to this embodiment configured as described above will be described in detail with reference to Fig. 4. Fig. 4 is a diagram for explaining the processing procedure when an exception occurs in the information processing device 10 according to this embodiment. Note that 1. to 13. in Fig. 4 indicate the processing procedure.
[0050] Step 1: After the power supply (not shown) of the information processing device 10 is turned on, the pre-image processing task 36 on the sub-processor 14 side generates a semaphore for exclusive use in image processing, and acquires a memory pool to be used for image processing.
[0051] Step 2: The pre-image processing task 36 on the sub-processor 14 side stores acquisition information such as the address of the acquired memory in the memory pool in the resource information management unit 34.
[0052] Step 3: After being created, the image processing task 40 waits for an image processing request and transitions to the idle task 38.
[0053] Step 4: Information required for image processing is sent from the inter-OS communication module 18 on the main processor 12 side to the shared memory 16 as an inter-OS communication command.
[0054] Step 5: The inter-OS communication module 20 on the sub-processor 14 receives an interrupt notification from the inter-OS communication module 18 on the main processor 12 that the inter-OS communication command has been stored, and receives the inter-OS communication command from the shared memory 16 .
[0055] Step 6: The inter-OS communication module 20 on the sub-processor 14 side receives the inter-OS communication command for requesting image processing, and therefore transitions from the idle task 38 to the image processing task 40.
[0056] Step 7: The image processing task 40 on the sub-processor 14 side acquires a semaphore resource to exclude or synchronize image processing in response to the inter-OS communication command received from the shared memory 16. Note that, for the sake of explanation, a semaphore is given here as an example of a resource, but resources are not limited to semaphores.
[0057] Step 8: The image processing task 40 on the sub-processor 14 side stores semaphore acquisition information, such as a semaphore ID for identifying the semaphore, in the resource information management unit 34. Note that, through steps 2 and 8, information such as memory pool: resource acquisition in progress (memory address is held), resource acquisition source: task other than the exception occurrence task, semaphore: resource acquisition in progress (resource identification ID is held), resource acquisition source: same task as the exception occurrence task, etc. is stored in the resource information management unit 34 as information about the image processing task 40.
[0058] Step 9: In the image processing task 40 on the sub-processor 14 side, during image processing after acquiring the semaphore resource, an abnormal calculation process in the software occurs due to a hardware malfunction or the like, and a software exception occurs.
[0059] Step 10: The OS on the sub-processor 14 side detects the occurrence of a software exception, and the exception-occurring task recovery routine 26 activates an exception handler.
[0060] Step 11: The exception handler activated on the sub-processor 14 side accesses the resource information management unit 34 accessed in steps 2 and 8, and obtains resource acquisition information for the image processing task 40 in which the exception occurred.
[0061] Step 12: The exception handler activated on the sub-processor 14 side uses the OS functions to release the resource if the acquired resource was acquired by the image processing task 40 in which the exception occurred. Note that if the resource was acquired from outside the image processing task 40 in which the exception occurred, other tasks hold the resource information (for example, the semaphore ID or memory pool address, etc.) and will not release the resource on their own, as this would cause inconsistencies in later processing.
[0062] Step 13: The exception handler operated on the sub-processor 14 side re-accesses the resource information management unit 34 accessed in steps 2 and 8, and updates the status of the semaphore, which is the acquired resource information in the image processing task 40 where the exception occurred, to a state where no resource has been acquired. For example, the resource information management unit 34 updates the information saved in the image processing task 40 to memory pool: resource being acquired (memory address held), resource acquisition source: task other than the task where the exception occurred, semaphore: resource not acquired, etc.
[0063] Step 14: The exception handler activated on the sub-processor 14 side deletes the image processing task 40 in which the exception occurred using OS functions, and regenerates an image processing task 42 with the same processing functions as the deleted task. Note that the generated task is assigned a new task ID because it is regenerated using OS functions.
[0064] Step 15: The regenerated image processing task 40 waits for an image processing request after regeneration, and transitions to the idle task 38.
[0065] Step 16: Information indicating that an exception has occurred is stored from the inter-OS communication module 20 on the sub-processor 14 side to the shared memory 16. As the information indicating that an exception has occurred, for example, information such as a defined value similar to that used to identify an inter-OS communication command is stored.
[0066] Step 17: The inter-OS communication module 18 on the main processor 12 side receives an interrupt notification of the completion of storage of the exception occurrence information from the inter-OS communication module 20 on the sub-processor 14 side, and receives the exception occurrence information stored in the shared memory 16. Note that the exception occurrence information is an ID (e.g., 0xff) that identifies when an exception occurs, in the same way that an ID (e.g., 0x1, 0x2, ..., etc.) that identifies an inter-OS communication command for each image processing, etc. is defined.
[0067] Step 18: The inter-OS communication module 18 on the main processor 12 side receives the exception occurrence information from the shared memory 16 and transmits again to the shared memory 16 the inter-OS communication command that was transmitted immediately before the exception occurred.
[0068] Step 19: The inter-OS communication module 20 on the sub-processor 14 side receives an interrupt notification from the inter-OS communication module 18 on the main processor 12 side that the storage of the inter-OS communication command has been completed, and receives the inter-OS communication command from the shared memory 16. Note that the image processing task 40 that processes the inter-OS communication command received in step 5 and the image processing task 42 that processes the inter-OS communication command received again in step 18 have the same role and are tasks that perform the same processing. However, since the image processing task 40 is deleted and the image processing task 42 is regenerated in step 14, the task IDs may be different.
[0069] Step 20: The idle task 38 receives the inter-OS communication command for requesting image processing, and therefore transitions to the image processing task 42.
[0070] Step 21: The image processing task 42 on the sub-processor 14 side acquires semaphore resources to exclusive control or synchronize processing for image processing in response to the received inter-OS communication command, executes image processing, and ends the processing normally.
[0071] Step 22: The inter-OS communication module 20 on the sub-processor 14 side transmits to the shared memory 16 information accompanying the normal end of the image processing.
[0072] Step 23. The inter-OS communication module 18 on the main processor 12 side receives an interrupt notification from the inter-OS communication module 20 on the sub-processor 14 side indicating that the inter-OS communication command has been stored successfully upon successful completion of image processing, and receives the inter-OS communication command from the shared memory 16.
[0073] Next, specific processing performed by each processor in the information processing device 10 according to this embodiment configured as described above will be described.
[0074] First, a description will be given of the processing performed by the main processor 12. Fig. 5 is a flowchart showing an example of the flow of processing performed by the main processor 12 in the information processing device 10 according to this embodiment. Note that the processing in Fig. 5 starts, for example, when the main processor 12 receives a request to execute image processing from a user.
[0075] In step 100, the main processor 12 transmits information necessary for image processing to the shared memory 16, and the process proceeds to step 102. That is, in accordance with the above-mentioned procedure 4, the information necessary for image processing is transmitted from the inter-OS communication module 18 on the main processor 12 side to the shared memory 16 as an inter-OS communication command. In step 102, the main processor 12 judges whether or not an exception has been received. This judgement is made by judging whether or not the exception occurrence information stored in the shared memory 16 in the above-mentioned step 17 has been received. If the judgement is affirmative, the process proceeds to step 104, and if the judgement is negative, the process proceeds to step 106.
[0076] In step 104, the main processor 12 retransmits the inter-OS communication command that was sent immediately before the exception occurred, and the process proceeds to step 106. That is, in accordance with the above-mentioned procedure 18, the inter-OS communication module 18 on the main processor 12 side receives the exception occurrence information from the shared memory 16, and retransmits to the shared memory 16 the inter-OS communication command that was sent immediately before the exception occurred. In step 106, the main processor 12 judges whether or not a normal end has been received. This judgement is made by judging whether or not an inter-OS communication command indicating information associated with the normal end of image processing has been received. For example, if an exception has occurred, the above-mentioned procedure 23 is followed to judge whether or not an inter-OS communication command has been received from the shared memory 16. If the judgement is negative, the process returns to step 102 and the above-mentioned processing is repeated, and the series of processing is terminated when the judgement is positive.
[0077] Next, there will be described the processing performed by the sub-processor 14. Fig. 6 is a flowchart showing an example of the flow of processing performed by the sub-processor 14 in the information processing device 10 according to this embodiment.
[0078] In step 200, the sub-processor 14 generates a semaphore for exclusive use in image processing by the pre-image processing task 36, acquires a memory pool, and proceeds to step 202. That is, by the above-mentioned procedure 1, the pre-image processing task 36 on the sub-processor 14 side generates a semaphore for exclusive use in image processing, and acquires a memory pool to be used for image processing.
[0079] In step 202, the sub-processor 14 stores the acquisition information of the memory pool in the resource information management unit 34, and proceeds to step 204. That is, according to the above-mentioned procedure 2, the sub-processor 14 stores the acquisition information such as the memory address of the acquired memory pool in the resource information management unit 34.
[0080] In step 204, the sub processor 14 transitions to the idle task 38 and then transitions to step 206. That is, in accordance with the above-mentioned procedure 3, after the image processing task 40 is generated, it waits for an image processing request and transitions to the idle task 38.
[0081] In step 206, the sub-processor 14 judges whether or not an interrupt notification has been received. This judgement is made by judging whether or not the inter-OS communications module 20 on the sub-processor 14 side has received an interrupt notification of the completion of storage of the inter-OS communications command from the inter-OS communications module 18 on the main processor 12 side in the above-mentioned procedure 5. The process waits until the judgement is affirmative, and proceeds to step 208.
[0082] In step 208, the sub-processor 14 receives the inter-OS communication command from the shared memory 16 and proceeds to step 210. That is, in accordance with the above-mentioned procedure 5, the inter-OS communication module 20 on the sub-processor 14 side receives an interrupt notification from the inter-OS communication module 18 on the main processor 12 side that the storage of the inter-OS communication command has been completed, and receives the inter-OS communication command from the shared memory 16.
[0083] In step 210, the sub-processor 14 transitions to the image processing task 40 and proceeds to step 212. That is, in accordance with the above-mentioned procedure 6, the inter-OS communication module 20 on the sub-processor 14 side has received an inter-OS communication command requesting image processing, and therefore transitions from the idle task 38 to the image processing task 40.
[0084] In step 212, the sub-processor 14 acquires resources corresponding to the inter-OS communication command, and proceeds to step 214. That is, according to the above-mentioned procedure 7, the image processing task 40 on the sub-processor 14 side acquires semaphore resources to exclude or synchronize image processing corresponding to the inter-OS communication command received from the shared memory 16.
[0085] In step 214, the sub-processor 14 stores the resource acquisition information in the resource information management unit 34, and proceeds to step 216. That is, in accordance with the above-mentioned procedure 8, the image processing task 40 on the sub-processor 14 side stores the semaphore acquisition information, such as a semaphore ID for identifying the semaphore, in the resource information management unit 34.
[0086] In step 216, the sub-processor 14 judges whether the process has ended normally without the occurrence of an exception. If the occurrence of a software exception is detected and the judgment is negative, the process proceeds to step 218, and if the judgment is positive, the process proceeds to step 230.
[0087] In step 218, the sub-processor 14 activates the exception handler and proceeds to step 220. That is, the sub-processor 14 activates the exception handler by the exception-occurring task recovery routine 26 according to the above-mentioned procedure 10.
[0088] In step 220, the sub-processor 14 accesses the resource information management unit 34 from the exception handler, acquires the resource information, and proceeds to step 222. That is, in accordance with the above-mentioned procedure 11, the exception handler activated on the sub-processor 14 side accesses the resource information management unit 34 to acquire resource acquisition information for the image processing task 40 in which the exception has occurred.
[0089] In step 222, the sub-processor 14 performs resource information update processing and proceeds to step 224. The resource information update processing, for example, releases a semaphore, secures or releases address information of memory in a memory pool, and so on. For example, in the above-mentioned procedure 12, if the acquired resource is acquired by the image processing task 40 in which the exception occurred, the exception handler operated on the sub-processor 14 side releases the resource using the OS function. On the other hand, in the case of a resource acquired from outside the image processing task 40 in which the exception occurred, other tasks hold the resource information (for example, a semaphore ID or a memory pool address, etc.), and since this would cause inconsistencies in later processing, the resource is not released automatically but is saved and held. Then, in the above-mentioned procedure 13, the exception handler operated on the sub-processor 14 side re-accesses the resource information management unit 34 and updates the status of the semaphore, which is the acquired resource information in the image processing task 40 in which the exception occurred, to a state in which no resource is acquired.
[0090] In step 224, the sub-processor 14 deletes the task in which the exception occurred using an OS function, regenerates the task, and proceeds to step 226. That is, the exception handler operated on the sub-processor 14 side by the above-mentioned procedure 14 deletes the image processing task 40 in which the exception occurred using an OS function, and regenerates an image processing task 42 having the same processing function as the deleted task.
[0091] In step 226, the sub-processor 14 transitions to the idle task 38 and proceeds to step 228. That is, the image processing task 42 regenerated by the above-mentioned procedure 15 waits for an image processing request after regeneration, and transitions to the idle task 38.
[0092] In step 228, the sub-processor 14 transmits information indicating that an exception has occurred to the shared memory 16, and proceeds to step 230. That is, in accordance with the above-mentioned procedure 16, information indicating that an exception has occurred is stored in the shared memory 16 from the inter-OS communication module 20 on the sub-processor 14 side.
[0093] On the other hand, in step 230, the sub-processor 14 transmits information associated with the normal end to the shared memory 16 and ends the series of processes. For example, if an exception occurs, the inter-OS communication module 20 on the sub-processor 14 side transmits information associated with the normal end of image processing to the shared memory 16 according to the above-mentioned procedure 22.
[0094] By carrying out the processing in this manner, when an exception occurs, the resource-related information held in the resource information management unit 34 is updated. As a result, when the processing corresponding to the inter-OS communication command is re-executed, the resource information has been updated, so the resource is secured and the processing in which the exception occurred is executed. Therefore, recovery is performed automatically without the user having to reboot the device and re-execute the processing.
[0095] In the above embodiment, an example has been described in which the sub-processor 14 performs processing specialized for image processing, but the processing performed by the sub-processor 14 is not limited to this, and other processing may be performed.
[0096] In the above embodiment, the information processing device 10 including the main processor 12 and the sub-processor 14 has been described as an example of an information processing system, but the present invention is not limited to this. For example, the main processor 12 and the sub-processor 14 may be mounted on separate devices.
[0097] In addition, in the above embodiments, the term "processor" refers to a processor in a broad sense, and includes general-purpose processors (e.g., CPUs, etc.) and dedicated processors (e.g., GPU: Graphics Processing Unit, ASIC: Application Specific Integrated Circuit, FPGA: Field Programmable Gate Array, programmable logic devices, etc.).
[0098] In addition, the operations of the processor in the above embodiments may be performed not only by one processor, but also by multiple processors located at physically separate locations working together. The order of the operations of the processor is not limited to the order described in the above embodiments, and may be changed as appropriate.
[0099] In addition, the processes performed by each processor of the information processing device 10 according to the above embodiment have been described as processes performed by software, but they may be processes performed by hardware or a combination of both. In addition, the processes performed by each processor of the information processing device 10 may be stored as a program in a storage medium and distributed.
[0100] Furthermore, the present disclosure is not limited to the above, and it goes without saying that various modifications can be made without departing from the spirit and scope of the present disclosure.
[0101] The following supplementary notes are further disclosed regarding the above embodiment. (((1))) A plurality of processors each of which communicates with each other; A first processor that receives the processing command among the plurality of processors, storing information about resources to be secured in response to the processing of the received processing command in a predetermined resource information management unit; When an exception occurs in a process corresponding to the processing command, information on the resource corresponding to the process and held in the resource information management unit is updated; The information processing system performs processing for transmitting an exception occurrence in the processing corresponding to the processing command to a processor that transmitted the processing command.
[0102] (((2))) The information processing system described in (((1))) wherein, when the resource is an exclusively controlled resource, the first processor releases the corresponding resource using an operating system function based on information about the resource stored in the resource information management unit, and updates the information about the resource stored in the resource information management unit to a state where no resource has been acquired.
[0103] (((3))) The information processing system according to claim 1, wherein the first processor holds the resource without releasing it based on information about the resource held in the resource information management unit if the resource was acquired from a process other than the process in which the exception occurred.
[0104] (((4))) The first processor deletes a task that performs the processing in which the exception occurred using an operating system function, and regenerates a task having the processing function of the deleted task.
[0105] (((5))) When the first processor receives the processing command again, the first processor acquires the resource through the regenerated task, stores information about the acquired resource in the resource information management unit, and performs processing corresponding to the processing command.
[0106] (((6))) On the computer, Receives a processing command, storing information about resources to be secured in response to the processing of the received processing command in a predetermined resource information management unit; When an exception occurs in a process corresponding to the processing command, information on the resource corresponding to the process and held in the resource information management unit is updated; an information processing program for executing a process of transmitting an exception occurrence of a process corresponding to the processing command to a processor that transmitted the processing command;
[0107] According to (((1))), it is possible to provide an information processing device that is capable of automatic recovery even when it has a plurality of processors that communicate with each other and uses resources other than resources that are exclusively controlled.
[0108] According to (((2))), it is possible to recover from an exception by securing resources that are exclusively controlled when recovering.
[0109] According to (((3))), it is possible to prevent inconsistencies from occurring other than in the processing in which the exception occurred.
[0110] According to (((4))), it is possible to re-execute the process in which the exception occurred.
[0111] According to (((5))), the process in which the exception occurred can be executed by re-receiving the process command.
[0112] According to (((6))), it is possible to provide an information processing program that is capable of automatic recovery even when using resources other than resources that are exclusively controlled by a plurality of processors that communicate with each other. [Explanation of symbols]
[0113] 10. Information processing device 12 Main Processor 14 Sub-processors 16 Shared Memory 18, 20 Inter-OS communication module 22 Inter-OS communication command storage area 34 Resource Information Management Department
Claims
1. A plurality of processors each of which communicates with each other; A first processor that receives the processing command among the plurality of processors, storing information about resources to be secured in response to the processing of the received processing command in a predetermined resource information management unit; When an exception occurs in a process corresponding to the processing command, information on the resource corresponding to the process and held in the resource information management unit is updated; The information processing system performs processing for transmitting an exception occurrence in the processing corresponding to the processing command to a processor that transmitted the processing command.
2. 2. An information processing system as described in claim 1, wherein, when the resource is an exclusively controlled resource, the first processor releases the corresponding resource using an operating system function based on information about the resource stored in the resource information management unit, and updates the information about the resource stored in the resource information management unit to a state where no resource has been acquired.
3. 2. The information processing system according to claim 1, wherein, when the resource is a resource acquired from a process other than the process in which the exception occurred, the first processor retains the resource without releasing it based on information about the resource retained in the resource information management unit.
4. 2. The information processing system according to claim 1, wherein the first processor deletes a task that performs the processing in which the exception occurred by using a function of an operating system, and regenerates a task having a processing function for the deleted task.
5. An information processing system as described in claim 4, wherein when the first processor receives the processing command again, the first processor acquires the resource through the regenerated task, stores information regarding the acquired resource in the resource information management unit, and performs processing corresponding to the processing command.
6. On the computer, Receives a processing command, storing information about resources to be secured in response to the processing of the received processing command in a predetermined resource information management unit; When an exception occurs in a process corresponding to the processing command, information on the resource corresponding to the process and held in the resource information management unit is updated; an information processing program for executing a process of transmitting an exception occurrence of a process corresponding to the processing command to a processor that transmitted the processing command;
Citation Information
Patent Citations
System managing method using resource acquisition time
JP1993342023A
Exclusive control method for computer system and computer system
JP1999024947A
