Data processing apparatus, distributed processing system, data processing method and data processing program

A terminal includes a task information acquiring unit which acquires information on a task of data processing, and a communication task generator which generates a send task to allow a source apparatus of data required by the task to transmit the data required by the task to an apparatus executing the task and which transmits the send task to the source apparatus, when the source apparatus is another apparatus, which is different from the apparatus executing the task and which is connected to the apparatus executing the task via a network.

TECHNICAL FIELD

The present invention relates to a distributed processing technology and, more particularly, a data processing apparatus, a distributed processing system, a data processing method, and a data processing program, with which tasks are processed in a distributed manner by a plurality of data processing apparatus interconnected by a network.

BACKGROUND ART

A distributed processing system is known for its capacity to process a large-scale computation requiring a large number of resources by distributing it to a plurality of processors.

DISCLOSURE OF INVENTION

Problems to be Solved by the Invention

Nevertheless, it is generally not easy to divide an application designed primarily to be processed by a single processor into a plurality of modules and have them processed by a plurality of processors in a distributed manner. Also, when designing an application by assuming a distributed processing by a plurality of processors, there are problems of sending and receiving data and the like to be addressed and it is necessary to design a system by even considering which modules are to be processed by which processors. As a result, such a system tends to be lacking in flexibility and versatility.

The present invention has been made in view of the foregoing circumstances, and a general purpose thereof is to provide a distributed processing technology featuring greater convenience.

Means for Solving the Problem

One embodiment of the present invention relates to a data processing apparatus. This data processing apparatus comprises: a task information acquiring unit which acquires information on a task of data processing; and a communication task generator which generates a send task to allow a source apparatus of data required by the task to transmit the data required by the task to an apparatus executing the task and which transmits the send task to the source apparatus, when the source apparatus is another apparatus, which is different from the apparatus executing the task, connected to the apparatus executing the task via a network.

Optional combinations of the aforementioned constituting elements described above, and implementations of the invention in the form of methods, apparatuses, systems and so forth may also be effective as additional modes of the present invention.

Advantageous Effects

The present invention provides a distributed processing technology featuring greater convenience.

EXPLANATION OF REFERENCE NUMERALS

BEST MODE FOR CARRYING OUT THE INVENTION

FIG. 1shows a constitution of a distributed processing system10according to a first embodiment. The distributed processing system10includes a distributed processing management apparatus80and a plurality of terminals20. These apparatuses, which are examples of data processing apparatuses, are interconnected by a network12such as the Internet or LAN. In a distributed processing of an application by a plurality of terminals20, the distributed processing management apparatus80manages the execution of processings distributed among the plurality of terminals20.

FIG. 2shows a constitution of a distributed processing management apparatus80. The distributed processing management apparatus80includes a communication unit82, a control unit90, and a resource database84. The control unit90includes a processing capacity information acquiring unit91, an application information acquiring unit92, a task distributing unit93, a task transmitting unit95, and an execution status managing unit96. In terms of hardware components, these constitutions may be realized by a CPU and memory of an arbitrary computer and memory-loaded programs and the like. Depicted herein are functional blocks realized by cooperation of those. Therefore, it will be understood by those skilled in the art that the functional blocks may be achieved by a variety of manners including hardware only, software only or a combination of both.

The processing capacity information acquiring unit91acquires information on the respective processing capacities of a plurality of terminals20from the plurality of terminals20via the network12. The processing capacity information acquiring unit91acquires processor types, operation clock frequencies, memory capacities, and the like used by the terminals20respectively. Also, the processing capacity information acquiring unit91acquires information on the current operating ratio of processors, usage of memories and the like from each of the terminals20at predetermined timing. If the terminals20are all of the same structure, the processing capacity information acquiring unit91may acquire the number of processors32which are not performing tasks, that is, available for use, as the availability ratio of processors. The processing capacity information acquiring unit91registers the acquired information in the resource database84.

FIG. 3shows an example of internal data of the resource database84. Provided within the resource database84are a terminal ID column102, a processor frequency column104, a processor count column106, a memory column108, a processor operating ratio column110, a memory usage column112, a distribution date and time column114, a distributed task ID column116, a distributed task amount column118, and a performed task amount column120. The terminal ID column102stores the IDs of terminals20. The processor frequency column104stores the operating frequencies of processors carried by the terminals20. The processor count column106stores the numbers of processors carried by the terminals20. The memory column108stores the memory capacities of the terminals20. The processor operating ratio column110stores the operating ratios of processors of the terminals20. The memory usage column112stores the usages of memories of the terminals20. The distribution date and time column114stores the dates and times of distribution of tasks to the terminals20. The distributed task ID column116stores the IDs of tasks distributed to the terminals20. The distributed task amount column118stores the amounts of tasks distributed to the terminals20. The performed task amount column120stores the amounts of tasks already performed by the terminals20.

The application information acquiring unit92acquires information on an application which includes a plurality of tasks to be processed by the terminals20. In the present embodiment, the application information acquiring unit92acquires information on an application by obtaining an XML document describing the execution sequence of a plurality of tasks contained therein and the information on the transfer of data between the tasks thereof and parsing the XML document.

The task distributing unit93determines which of the plurality of tasks contained in the application described in the XML document as acquired by the application information acquiring unit92are to be processed by which of the terminals20, based on the information on the respective processing capacities of the terminals20acquired by the processing capacity information acquiring unit91. For example, when a first task requires two processors and a second task requires three processors and if there is one of the terminals20whose five processors are available for use at the time, then all the tasks may be distributed to the same terminal20. However, if there is none of the terminals20which can execute all the tasks, the task distributing unit93distributes the tasks to a plurality of terminals20. In such a case, the application information acquiring unit92and the task distributing unit93take charge of the function of a task information acquiring unit that acquires information on the tasks.

When a plurality of tasks are distributed to a plurality of terminals20and transfer of data for executing the tasks is required therebetween, a communication task generator94generates communication tasks for the transfer of data therebetween via the network12and adds them to the tasks to be transmitted to the terminals20. Added to a task to be transmitted to a data-sender terminal20is a send task which sends the output data outputted from the task to an apparatus executing a subsequent task. Added to a task to be transmitted to a data-receiver terminal20is a receive task which generates input data by converting the data received from a source apparatus of data required by the task into a data format compatible with the input interface of the task. Communication parameters are set in advance for these communication tasks according to the processing capacity of the source of data required by the task, namely, a sender terminal20, and that of the apparatus executing a subsequent task, namely, a receiver terminal20. The communication parameters may also be set according to the transmission speed of the terminals20, the buffer capacity, or the type of network connecting the terminals20, for instance. Also, the communication parameters may be set according to the contents of data required by the tasks. The communication parameters may, for instance, include information for selecting data to be sent by a sender terminal20, information for generating input data by selecting, converting or merging data from among the data received by a receiver terminal20, and the like. Also, the communication parameters may include information concerning the timing with which input data are to be inputted. Information concerning data required by the tasks may be described in an XML document to be acquired by the application information acquiring unit92.

The task transmitting unit95transmits tasks distributed by the task distributing unit93to terminals20via the network12. The execution status managing unit96manages the execution status of tasks at the terminals20by acquiring the execution status of tasks from each of the terminals20to which tasks have been distributed and recording it in the resource database84. If necessary, the task transmitting unit95instructs the task distributing unit93to redistribute the tasks.

FIG. 4shows an example of an XML document describing information on an application. In the example shown inFIG. 4, there is a description of information on two tasks contained in the application, namely, “senderInstance_A” and “receiverInstance_A”. In the part where information on the second task “receiverInstance_A” is described, data to be inputted to the second task is declared in the <stream> element130. Here, it is declared in the <channelIn1> element that data described in the <channelOut1> element be inputted to the second task. In the <channelOut1> element, the source of data is described as the data outputted from the first task “senderInstance_A”. That is, it is shown that data outputted from the first task must be inputted to the second task.

FIG. 5shows a relationship between the tasks as described in an XML document shown inFIG. 4. Hereinbelow, a task constituting an application is referred to as “core task” so that it can be distinguished from a communication task which is generated by the communication task generator94. Firstly, as a first core task142is executed, the data outputted from the first core task142is inputted to a second core task154and the second core task154is executed. In this example, the data outputted from the first core task142must be inputted to the second core task154, and therefore in the case where the task distributing unit93distributes the first core task142and the second core task154to different terminals20, the communication task generator94adds a send task144to the first core task142to enable the transmission of the data outputted from the first core task142to the terminal20to which the second core task154is distributed. It also adds a receive task152to the second core task154to enable the generation of input data of the second core task154by receiving data transmitted from the terminal20to which the first core task142is distributed. The task transmitting unit95transmits the first task140and the second task added with the respective communication tasks to the terminals20to which they are distributed respectively.

FIG. 6shows a constitution of a terminal20. The terminal20includes a communication unit21and a control unit50. The control unit50includes a task acquiring unit51, a task executing unit52, a receive task executing unit53, and a send task executing unit54. And it is evident to those skilled in the art that these function blocks can be realized in a variety of forms such as by hardware only, software only or the combination thereof.

The task acquiring unit51acquires a task or tasks from the distributed processing management apparatus80via the network12. The task executing unit52executes the task or tasks thus acquired. The task executing unit52, as will be described later, accomplishes its function by a plurality of processors equipped in the terminal20and local memories provided in those processors. The receive task executing unit53executes a receive task when the task acquired has the receive task added thereto, and transfers input data, which is generated from the data received from a source apparatus of data required by the task, to the task executing unit52. The receive task executing unit53, as will be described later, transfers the input data to the input buffers of local memories. The send task executing unit54executes a send task when the task acquired has the send task added thereto, and transmits necessary data selected from output data stored in the output buffers of local memories to an apparatus which will execute a subsequent task.

FIG. 7shows a hardware structure of a terminal20. The terminal20includes a microprocessor unit (MPU)22, a graphics processing unit (GPU)40, a main memory42, an auxiliary storage device (HDD)44, and a network control unit46, which are connected to one another via a main bus38. The network control unit46exchanges data with the other terminals20, the distributed processing management apparatus80and the like via a network12.

The MPU22, which is an asymmetrical multiprocessor unit, has an input/output unit24and a plurality of processing units30, which represent an example of a task executing unit52. The input/output unit24, which performs inputs and outputs of data to and from the other constituent units, includes a processor26and a local memory28. The local memory28is, for instance, a cache memory. Each of the processing units30is a unit for independently executing a task contained in an application and includes a processor32and a local memory34. A program, data, operation parameters and the like read out from the main memory42are written to the local memory34and executed by the processor32.

The input/output unit24transmits and receives data to and from the other constituent units within the terminal20, such as the GPU40, the main memory42, the HDD44and the network control unit46, via the main bus38. Also, it transmits and receives data to and from the other apparatuses via the network control unit46. According to the present embodiment, the processing unit30can perform the transmission and reception of data to and from the other processing units30, the input/output unit24, the GPU40and the main memory42, but cannot perform the direct transmission and reception of data to and from the other apparatuses via the network control unit46. The processing unit30transmits and receives data to and from the other apparatuses via the input/output unit24.

In another embodiment, the arrangement may be such that the processing unit30can also perform the direct transmission and reception of data to and from the other apparatuses. Also, the MPU22may be a symmetrical multiprocessor unit, and in such a case, any one of the processing units30may perform the function of the input/output unit24, and all the processing units30may perform the direct transmission and reception of data to and from the other apparatuses.

The tasks distributed to the terminal20are executed by at least some of the plurality of processing units30under the management of the process management function executed by the input/output unit24. The input/output unit24selects the processing units30available for use from among the plurality of processing units30and has them execute the tasks.

FIG. 8shows a functional constitution of an input/output unit24. The input/output unit24includes an interface unit67, a control unit60, and a task queue68. The control unit60includes a file input/output interface61, a communication interface62, a database interface63, a memory input/output interface64, a process managing unit65, and an execution status managing unit66.

The interface unit67transmits and receives data via the main bus38. The file input/output interface61inputs and outputs a file stored in the HDD44for instance. The communication interface62inputs and outputs data to and from the other apparatus via the network control unit46for instance. The database interface63inputs and outputs data to and from a database stored in the HDD44or loaded in the main memory42for instance. The memory input/output interface64inputs and outputs data on the main memory42for instance.

The process managing unit65manages processes executed by the processing units30. Tasks to be executed by the processing units30are successively stored in the task queue68. As a processor32in the processing unit30becomes ready for executing a next task, the next task is obtained by referencing the task queue68and executed. The process managing unit65manages whether the respective processor32of the processing unit30is executing the task or not and reports it to the distributed processing management apparatus80.

The execution status managing unit66manages the execution status when the processors32of the processing units30execute the tasks of an application distributed among the terminals20. When, for instance, tasks to be executed by the processing units30are excessively loaded into the task queue68and thus the distributed tasks of an application cannot be executed immediately, the execution status managing unit66reports the situation to the distributed processing management apparatus80, requesting it to redistribute the tasks to the other terminals20.

The process management function may be executed by each of the processing units30. In such a case, the process management function of each processing units30obtains a task to be executed from the task queue and executes it when the processing unit30becomes ready to execute another task. In this manner, tasks are executed by the processing units30, and hence it is preferable that the tasks to be distributed to the terminals20are designed as programs to be executed by the processing units30. Also, it is preferable that tasks are so designed as to be executable within the processing capacity of a single terminal20.

In the first embodiment, communication tasks are generated automatically as needed when the distributed processing management apparatus80distributes tasks constituting an application to a plurality of terminals20. In a second embodiment, however, the communication tasks are generated by each terminal20to which the tasks are distributed.

FIG. 9shows a constitution of a distributed processing management apparatus80according to the second embodiment of the invention. The distributed processing management apparatus80according to the second embodiment differs from the distributed processing management apparatus80according to the first embodiment as shown inFIG. 2in that it includes a task information conveying unit97instead of the communication task generator94. Otherwise, the constitution and operation thereof are the same as those of the first embodiment.

The task information conveying unit97conveys information concerning source apparatus of data required by tasks to terminals20to which the tasks have been distributed. Thereupon, the terminal20itself can generate a send task to obtain data from a source apparatus and transmit it to the source apparatus. The task information conveying unit97may also convey additional information concerning the content of data required by the task. For example, it may convey conditions, such as data type, data length and input timing, of input data of the task.

FIG. 10shows a constitution of a terminal20according to the second embodiment. The terminal20according to the second embodiment differs from the terminal20according to the first embodiment as shown inFIG. 6in that it further includes a task information acquiring unit55and a communication task generator56. Otherwise, the constitution and operation thereof are the same as those of the first embodiment.

The task information acquiring unit55acquires information on a task of data processing. The task information acquiring unit55acquires information on a source of data required by the task which has been acquired by the task acquiring unit51. When the source of data required by the acquired task is another terminal connected to its own terminal via a network, the communication task generator56generates a send task to allow the source terminal to transmit data required by the task to its own terminal and transmits it to the source terminal. Also, the communication task generator56generates a receive task to generate input data of the task by receiving data from the source terminal and transmits it to the receive task executing unit53.

FIG. 11shows an example of an application. An application200, which is an application for authenticating a person by detecting his/her face from moving images, includes a core task162which decodes moving images, core tasks174and184which detect a person's face from within the decoded moving images, a core task194which recognizes an image of the detected face, and a core task196which authenticates the person by checking the recognized face against a database. Note that the task for detecting a face is divided into the core task174for detecting a face from the upper half of a moving image and the core task184for detecting a face from the lower half of the moving image.

In the example ofFIG. 11, the tasks contained in the application200are distributed to a plurality of different terminals. To be more specific, the core task162is distributed to a terminal160, the core task174to a terminal170, the core task184to a terminal180, and the core tasks194and196to a terminal190.

The task information conveying unit97in the distributed processing management apparatus80conveys a message to the terminal170to which the core task174has been distributed that moving image data necessary for the detection of a face will be outputted from the terminal160. Also, since the core task174is required to process the upper half only of the moving image, it conveys a message that it is required to acquire the upper half only of the moving image out of the data outputted from the core task162. The communication task generator56of the terminal170generates a send task164for sending data, outputted by the core task162to be executed by the terminal160, to the terminal170and transmits it to the terminal160. To be set beforehand in this send task164are communication parameters indicating that data of the upper half of a moving image are to be selected from among the data outputted from the core task162based on the information conveyed from the task information conveying unit97. Also, the communication task generator56generates a receive task172for generating input data to be inputted to the core task174by receiving data from the terminal160. Similarly, the communication task generator56of the terminal180generates a send task166and transmits it to the terminal160and at the same time generates a receive task182. The send task164selects data on the upper half of a moving image from the output buffer of the core task162based on the set communication parameters and transmits it to the receive task172. Similarly, the send task166selects data on the lower half of the moving image and transmits it to the receive task182.

The core task194requires both of the data from the terminal170which executes the core task174and the data from the terminal180which executes the core task184, and therefore a send task176and a send task186to enable data transmission from the respective terminals are generated and transmitted to the respective terminals. Also, a receive task191and a receive task192are generated to generate input data by merging the data received from the send task176and send task186. The receive task191and receive task192may generate input data for the core task194by selecting necessary data from among the data received from the terminals170and180. Also, the receive task191and receive task192may adjust the timing for inputting input data generated from the data received from the terminals170and180to the core task194. For example, since the core task194requires both results of the core task174and the core task184, the receive task191and the receive task192may be put on standby until both of the output data are received when only one of the output data has been received. It is also to be noted that the receive task191and the receive task192may be combined into one receive task.

The core task194and the core task196are distributed to the same terminal190, so that data transfer between these tasks does not require communication over a network. Accordingly, there is no generation of a send task and a receive task. In this case, the communication task generator56generates a DMA command for selecting data required by the core task196from among the data outputted by the core task194and, if necessary, converting it into an appropriate data type, rearranging the order of the data or merging it with the data outputted by another core task, and transferring the data to the input buffer35of a processing unit30executing the core task196, based on the information conveyed from the task information conveying unit97. As the core task194is executed and the output data are stored in the output buffer36, the DMA command generated by the communication task generator56is executed by a DMA controller37of the processing unit30by which the core task194has been executed or the processing unit30by which the core task196will be executed, and the input data for the core task196is set in the input buffer35.

FIG. 12is an illustration for explaining how the input data for the core task194are generated when tasks have been distributed as shown inFIG. 11. As the core task174is executed in the terminal170, the output data are stored in the output buffer36of the processing unit30by which the core task174has been executed. Since communication parameters containing information for the selection of data required by the core task194from among the output data stored in the output buffer36are set beforehand in the send task176, the send task176generates a send data178by selecting necessary data and transmits it to the terminal190to which the core task194is distributed. Similarly, the send task186generates a send data188by selecting data required by the core task194from among the output data stored in the output buffer36and transmits it to the terminal190. The output data outputted from the core task174or184may be transferred from the output buffer36to the main memory42. In such a case, the send task176or186may generate send data178or188by selecting necessary data from among the data stored in the main memory42.

Upon receiving the send data178and188from the terminals170and180respectively, the receive tasks191and192to be executed at the terminal190convert them into a data type compatible with the input interface of the core task194, merge those data, and store the input data198in the input buffer35of the processing unit30which will execute the core task194. At this time, if necessary, the timing is adjusted with which the input data for the core task194are transferred to the input buffer35. For instance, when the input buffer35does not have a capacity to store all the input data, the subsequent input data are transferred to the input buffer35in such a manner as to overwrite the data no longer necessary according to the progress of the core task194. In such a case, the receive tasks191and192may store the received send data178and188temporarily in the main memory42or the like.

FIG. 13shows another example of distribution of tasks contained in an application as shown inFIG. 11. In the example ofFIG. 13, core tasks174,184,194and196are distributed to the same terminal190. In this case, transfer of data between the core tasks174and184and the core task194does not require any inter-terminal communication, so that there is no generation of the send tasks176and186and the receive tasks191and192.

FIG. 14is an illustration for explaining how the input data for the core task194is generated when tasks have been distributed as shown inFIG. 13. A processing unit30aby which the core task174is executed, a processing unit30bby which the core task184is executed, and a processing unit30cby which the core task194is executed are all located within the same terminal190. Accordingly, the processing unit30ccan acquire data by directly accessing an output buffer36aof the processing unit30awhere the output data of the core task184are stored and an output buffer36bof the processing unit30bwhere the output data of the core task194are stored. In such a case, therefore, there is no generation of any send task or receive task. Instead, the communication task generator56generates a list of DMA commands to select data required by the core task194from among the data stored in the output buffer36aand36band transfer them to the input buffer35c. The DMA controller37cexecutes the generated DMA command and thereby stores the input data198for the core task194in the input buffer35c.

As described above, whether a plurality of tasks contained in an application are distributed to the same terminal20or to a plurality of different terminals20, communication tasks or DMA commands necessary for the input and output of data are generated automatically, which assures proper transfer of data. Therefore, the designer of an application can design it without giving consideration to how tasks will be distributed among terminals20. As a result, the present embodiment can offer an environment in which a large-scale application can be developed easily. Moreover, once an environment for execution is ready with the acquisition of input data, each task can perform its execution irrespective of and asynchronously with the other tasks, which enhances the efficiency of processing. Also, since tasks are distributed properly according to the state of usage of the processors32of terminals20, the designer of an application can design it without giving consideration to how tasks are to be distributed for processing.

The present invention has been described in conjunction with the exemplary embodiments. These exemplary embodiments are given solely by way of illustration. It will be understood by those skilled in the art that various modifications to the combination of each component and each process thereof are possible and that such modifications are also within the scope of the present invention.

In the foregoing embodiments, cases of distributing tasks to terminals20from the distributed processing management apparatus80have been described, but the embodiments are not limited to such cases only. For example, when a data processing apparatus is to execute an application containing a plurality of tasks, techniques described in the above embodiments are also applicable to cases where a task is distributed to another apparatus to utilize a resource available in the other apparatus or where a data processing apparatus to which a plurality of tasks have been distributed redistributes some of the distributed tasks to another apparatus. Even in such cases, tasks can be freely distributed to a plurality of apparatuses by automatically generating communication tasks and the apparatuses can execute the distributed tasks asynchronously when the environment is ready for the execution thereof, so that the efficiency of distributed processing can be far significantly enhanced.

INDUSTRIAL APPLICABILITY

The present invention is applicable to a distributed processing system in which tasks are processed in a distributed manner by a plurality of data processing apparatus interconnected by a network.