WO2012160655A1 - データ処理方法及びデータ処理システム - Google Patents

データ処理方法及びデータ処理システム Download PDF

Info

Publication number
WO2012160655A1
WO2012160655A1 PCT/JP2011/061896 JP2011061896W WO2012160655A1 WO 2012160655 A1 WO2012160655 A1 WO 2012160655A1 JP 2011061896 W JP2011061896 W JP 2011061896W WO 2012160655 A1 WO2012160655 A1 WO 2012160655A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing
information
terminal
executed
data processing
Prior art date
Application number
PCT/JP2011/061896
Other languages
English (en)
French (fr)
Inventor
鈴木 貴久
浩一郎 山下
宏真 山内
康志 栗原
俊也 大友
尚記 大舘
Original Assignee
富士通株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士通株式会社 filed Critical 富士通株式会社
Priority to JP2013516111A priority Critical patent/JP5825346B2/ja
Priority to PCT/JP2011/061896 priority patent/WO2012160655A1/ja
Publication of WO2012160655A1 publication Critical patent/WO2012160655A1/ja
Priority to US14/085,141 priority patent/US9189301B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • G06F9/528Mutual exclusion algorithms by using speculative mechanisms

Definitions

  • the present invention relates to a data processing method and a data processing system.
  • the client node inquires about the processing capability and intention to participate in other node groups, determines the nodes that can accept job processing based on the response contents from the other node groups, and distributes job execution.
  • a distributed processing processor unit having a large number of subscribers, a processor unit, and an exchange for communicating with the large number of subscribers and the processor unit, and capable of accessing each processor in the processor unit is provided.
  • the object of the data processing method and data processing system is to provide a data processing method and data processing system that can execute parallel processing quickly using a plurality of terminals.
  • the first data processing device acquires the processing information of the first processing in response to the processing request of the first processing, and the processing of the first processing True is set in the first processing flag included in the information.
  • the first data processing apparatus sets true to the first end flag of the processing information of the first process after executing the first process.
  • the first data processing apparatus acquires processing information of the second process that needs to be completed before the execution of the third process executed following the first process is started, and processes the second process The process to be executed is determined based on the second process flag and the second end flag included in the information.
  • FIG. 1 is a flowchart of the data processing method according to the first embodiment.
  • FIG. 2 is a schematic diagram illustrating loop parallel processing using barrier synchronization.
  • FIG. 3 is a schematic diagram illustrating a data processing method according to the second embodiment.
  • FIG. 4 is a block diagram of the base station according to the second embodiment.
  • FIG. 5 is a schematic diagram illustrating an example of parallel processing information according to the second embodiment.
  • FIG. 6 is a schematic diagram illustrating an example of processing information according to the second embodiment.
  • FIG. 7 is a block diagram of the terminal according to the second embodiment.
  • FIG. 8 is a schematic diagram illustrating an example of a processing result according to the second embodiment.
  • FIG. 9 is a flowchart of the operation at the start of parallel processing in the base station according to the second embodiment.
  • FIG. 9 is a flowchart of the operation at the start of parallel processing in the base station according to the second embodiment.
  • FIG. 10 is a flowchart of an operation when receiving a processing result in the base station according to the second embodiment.
  • FIG. 11 is a flowchart of the operation when receiving the parallel processing request in the terminal according to the second embodiment.
  • FIG. 12 is a flowchart of the operation when receiving the processing result in the terminal according to the second embodiment.
  • FIG. 13 is a flowchart showing a continuation of FIG.
  • FIG. 14 is a flowchart showing a continuation of FIG.
  • FIG. 15 is a flowchart of the operation during the barrier process performed by the terminal according to the second embodiment.
  • FIG. 16 is a flowchart showing a continuation of FIG.
  • FIG. 17 is a flowchart showing a continuation of FIGS. 15 and 16.
  • FIG. 18 is a flowchart showing a continuation of FIGS.
  • FIG. 19 is a schematic diagram illustrating parallel processing when setting priority of speculative processing.
  • FIG. 20 is a schematic diagram illustrating an example of processing information according to the third embodiment.
  • FIG. 21 is a flowchart of the operation at the time of receiving the processing result in the terminal according to the third embodiment as a continuation of FIG.
  • FIG. 22 is a flowchart illustrating the operation during the barrier process in the terminal according to the third embodiment as a continuation of FIG. 15.
  • FIG. 23 is a flowchart of an operation at the time of priority setting processing in the terminal according to the third embodiment.
  • FIG. 24 is a flowchart showing a continuation of FIG.
  • FIG. 25 is a flowchart of operations performed when the high priority processing name list is received in the terminal according to the third embodiment.
  • the data processing device acquires processing information of the second processing executed before the third processing executed following the first processing, and is included in the processing information of the second processing.
  • the third process is executed based on the second process flag. Note that the present invention is not limited to the embodiments.
  • FIG. 1 is a flowchart of the data processing method according to the first embodiment.
  • the data processing device first data processing device acquires processing information of the first processing in response to the processing request of the first processing (step S1).
  • the data processing device sets true to the first processing flag (step S2).
  • the first process flag is included in the process information of the first process.
  • the data processing device executes a first process.
  • the data processing apparatus sets true to the first end flag (step S3).
  • the first end flag is included in the processing information of the first process.
  • the data processing device acquires processing information for the second processing (step S4).
  • the third process is originally executed following the first process.
  • the second process is executed before the third process.
  • the data processing device executes a third process based on the second process flag (step S5).
  • the second process flag is included in the process information of the second process. Then, the data processing device ends a series of data processing.
  • a data processing device with a high processing speed is executed by a data processing device with a low processing speed during a waiting time until the execution of the third processing is started after the execution of the first processing is completed.
  • the second process can be speculatively executed. Accordingly, parallel processing can be executed quickly using a plurality of data processing devices.
  • the terminal with good communication quality starts executing the third process for the second process assigned to the terminal with poor communication quality. Can be speculatively executed while waiting. Therefore, parallel processing can be executed quickly using a plurality of terminals.
  • the data processing method according to the first embodiment is applied to loop parallel processing using barrier synchronization in a mobile phone system using a terminal such as a mobile phone as the first data processing device.
  • terminals include portable information terminals such as portable game machines and PDAs (Personal Digital Assistants) capable of wireless communication, in addition to mobile phones.
  • FIG. 2 is a schematic diagram illustrating loop parallel processing using barrier synchronization.
  • FIG. 2 shows an example in which the loop processing at the front stage and the loop processing at the rear stage are each divided into, for example, 10 partial loop processes having no dependency between iterations, and are processed in parallel by, for example, 10 terminals. Has been.
  • Process mn represents the m-th partial loop process processed by the n-th terminal. Therefore, processing 1-1, processing 1-2,..., And processing 1-10 are processed by different terminals. Process 1-1, process 2-1 and process 3-1 are processed by the same terminal. Note that the number of divisions of the preceding loop processing and the number of divisions of the subsequent loop processing are not limited to 10 and are arbitrary.
  • the subsequent loop processing uses all the data in the array A output in the previous loop processing. Accordingly, a function (barrier ()) for performing the barrier processing is inserted at the end of the program code of the partial loop processing (1-1 to 1-10) 1, 2, and 3 in the preceding stage. As a result, after all of the partial loop processes (1-1 to 1-10) 1, 2, and 3 in the previous stage are completed, the partial loop processes (2-1 to 2-10) 4, 5, and 6 in the subsequent stages are completed. Is started.
  • Each process (3-1 to 3-10) 7, 8, and 9 in the final stage indicates a process anchor at each terminal.
  • a function (barrier ()) for performing a barrier process is inserted at the end of the program code of each partial loop process 4, 5, 6 (2-1 to 2-10) in each subsequent stage. Therefore, the processes (3-1 to 3-10) 7, 8, and 9 in the final stage are performed after all the partial loop processes (2-1 to 2-10) 4, 5, and 6 in the subsequent stage are completed. Be started.
  • FIG. 3 is a schematic diagram illustrating a data processing method according to the second embodiment.
  • the terminal # 1 executes the preceding partial loop processing # 1-1 assigned to itself.
  • Terminal # 1 after the execution of partial loop processing # 1-1 in the previous stage is completed, partial loop processing # 1-2 in the previous stage assigned to other terminal # 2, terminal # 3,.
  • Loop processing # 1-3,... Is executed speculatively by executing time slice as an independent thread.
  • terminal # 1 When the terminal # 1 receives the processing result from the other terminals # 2, # 3,..., The terminal # 1 cancels the execution of the thread corresponding to the received processing result. Terminal # 1 finally receives the processing result from other terminal # 2, terminal # 3,..., Or the partial loop processing # 1-2 or partial loop processing in the preceding stage with a thread speculatively executed by itself When the results of # 1-3,... Are completed and all the results of the partial loop processing of the preceding stage are obtained, the execution of the partial loop processing # 2-1 of the subsequent stage assigned to itself is started.
  • FIG. 4 is a block diagram of the base station according to the second embodiment.
  • the base station 11 includes, for example, a CPU (Central Processing Unit) 12, a recording device 13, a memory unit 14 as an example of a storage unit, and a communication unit 15.
  • the CPU 12, the recording device 13, the memory 14, and the communication unit 15 are connected to the bus 16.
  • the CPU 12 executes an OS (Operating System, operating system) and a library 17.
  • OS Operating System, operating system
  • a processing request distribution unit 18 is realized as an example of a processing request transmission unit
  • a processing result reception unit 19 is realized as an example of a processing result reception unit.
  • the CPU 12 executes various application programs.
  • the processing request distribution unit 18 controls the entire parallel processing.
  • the processing request distribution unit 18 performs processing for distributing processing requests for requesting execution of processing to a plurality of terminals.
  • the operation of the processing request distribution unit 18 will be described later as an operation at the start of parallel processing in the base station.
  • the process result receiving unit 19 performs a process when receiving a process execution result from each terminal.
  • the operation of the processing result receiving unit 19 will be described later as the operation at the time of receiving the processing result in the base station.
  • the recording device 13 records parallel processing information 20 created in advance by a program creator.
  • the parallel processing information 20 will be described later.
  • a non-volatile storage device such as a ROM (Read Only Memory), an HD (Hard Disk, hard disk), or a magnetic tape can be cited.
  • the memory 14 is used as a work area of the CPU 12, for example.
  • a parallel processing request 21 and a collected data storage area 22 are expanded in the memory 14.
  • the parallel processing request 21 is a development of a parallel processing request included in parallel processing information 20 described later.
  • the storage area of the array B is expanded as the collection data storage area 22.
  • An example of the memory 14 is a RAM (Random Access Memory, random access memory).
  • the communication unit 15 is connected to the mobile phone network by wireless communication and transmits and receives packets with the terminal, for example.
  • FIG. 5 is a schematic diagram illustrating an example of parallel processing information according to the second embodiment.
  • the parallel processing information 20 includes a parallel processing request 31 and base station side usage information 32.
  • the parallel processing request 31 includes processing information 33 and usage data information 34.
  • the process information 33 is set for each partial loop process divided into a plurality of stages and a plurality of terminals.
  • the usage data information 34 includes information related to a data area such as a data size necessary for performing parallel processing on a plurality of terminals.
  • the base station side usage information 32 includes information used by the base station.
  • the base station side usage information 32 includes, for example, the number of terminals that perform parallel processing (the number of necessary terminals), processing that is a target for starting parallel processing (starting target processing), and processing that is a target that is subsequent in parallel processing (waiting) Target information) and data to be collected as a result of parallel processing (collected data).
  • the processing information 33 includes, for example, the partial loop processes 1, 2, and 3 in the preceding stages of the processes 1-1 to 1-10, the partial loop processes 4, 5, 6 and the processes 3 in the subsequent stages of the processes 2-1 to 2-10. It is set for each of the processes 7, 8, and 9 in the final stage of -1 to 3-10.
  • the usage data information 34 includes, for example, information of A as the array name, 100,000 as the data size of the array of A, B as the array name, and 100,000 as the data size of the array of B.
  • the parallel processing request 31 may include the initial value of the data.
  • the start target processing is processing 1-1 to 1-10
  • the waiting target processing is processing 2-1 to 2-10
  • Information that the data is array B with a data size of 100,000 is included.
  • FIG. 6 is a schematic diagram illustrating an example of the processing information according to the second embodiment.
  • the processing information 33 relating to each partial loop process includes program code 41 corresponding to the corresponding partial loop process, and accompanying information 42 used in parallel processing.
  • the program code 41 is set in advance by a program creator.
  • fields of processing name, end flag, processing flag, processing terminal, subsequent processing, preceding processing, data output area, and processing thread are set.
  • data is set in advance by the program creator in each field of the process name, subsequent process, preceding process, and data output area.
  • Initial values are set in advance in the fields of the end flag and the processing flag. The initial value of each flag may be false, for example.
  • the terminal can start executing the program code 41 described in the processing information 33 when the execution of all the preceding processes described in the processing information 33 is completed.
  • the terminal can start execution of the subsequent process described in the processing information 33, or can enter a state of waiting for the start of execution.
  • a range of data output as a processing result from the corresponding partial loop processing is set.
  • processing information 33 corresponding to the example shown in FIG. 2 will be described.
  • Processing 1-1, processing 1-2, and the like are set in the processing name field. Since none of the processes 1-1 to 1-10 has a preceding process, a null is set in the field for the preceding process.
  • the subsequent process is the process 2-1, so that the process 2-1 is set in the field of the subsequent process.
  • the range of elements from 0 to 9999 of array A is set in the field of the data output area. The same applies to processing 1-2 to processing 1-10.
  • the processes 1-1 to 1-10 are set in the field of the preceding process.
  • the subsequent process is the process 3-1, the field of the subsequent process is set to the process 3-1. The same applies to processing 2-2 to processing 2-10.
  • the processes 2-1 to 2-10 are set in the field of the preceding process. The same applies to processing 3-2 to processing 3-10. Since none of the processes 3-1 to 3-10 has a subsequent process, null is set in the field of the subsequent process.
  • the program code 41 is not described in the process information 33. That is, processes 3-1 to 3-10 are substantially not executed. By setting the processes 3-1 to 3-10, each terminal can speculatively execute the processes 2-1 to 2-10.
  • FIG. 7 is a block diagram of a terminal according to the second embodiment.
  • the terminal 51 includes, for example, a CPU 52, a communication unit 53, and a memory 54.
  • the CPU 52, the communication unit 53, and the memory 54 are connected to the bus 55.
  • the CPU 52 executes OS and library 56.
  • a barrier processing unit 57 and a receiving unit 58 are realized as an example of the receiving unit and the processing unit.
  • the receiving unit 58 acquires processing information corresponding to the processing request in response to the processing request.
  • the reception unit 58 sets true to the processing flag included in the acquired processing information. The operation of the receiving unit 58 will be described later as each operation when receiving a parallel processing request and receiving a processing result in the terminal.
  • the barrier processing unit 57 sets true to the end flag of the processing information corresponding to the processing after the processing is executed.
  • the barrier processing unit 57 acquires processing information of a process that is a target of speculative processing, and determines whether or not to perform speculative processing based on a processing flag included in the processing information.
  • the barrier processing unit 57 generates a processing result after the processing is completed and transmits the processing result to the base station.
  • the operation of the barrier processing unit 57 will be described later as an operation at the time of barrier processing in the terminal. The processing result will be described later.
  • the scheduler unit 59 and the thread management unit 60 are realized by the execution of the OS and the library 56.
  • the scheduler unit 59 controls thread switching when a plurality of threads are switched and executed by one processor by executing time slice. By executing the time slice, even if there is only one processor, it is possible to make it appear that a plurality of processes are operating simultaneously in a pseudo manner.
  • the thread management unit 60 manages the activated thread.
  • the CPU 52 executes various application programs.
  • the memory 54 is used as a work area of the CPU 52, for example.
  • processing information 61 and usage data areas 62 and 63 relating to each partial loop processing are expanded.
  • the storage area of the array A is expanded as the usage data area 62.
  • the storage area of the array B is expanded as the usage data area 63.
  • An example of the memory 54 is a RAM.
  • the communication unit 53 is connected to a mobile phone network by wireless communication and transmits and receives packets with the base station, for example.
  • FIG. 8 is a schematic diagram illustrating an example of a processing result according to the second embodiment.
  • the processing result 71 includes data 72 and accompanying information 73.
  • the data 72 stores data output as a result of the partial loop process.
  • the accompanying information 73 fields of a processing name, a processing terminal, and a data area are set.
  • FIG. 9 is a flowchart of an operation at the start of parallel processing in the base station according to the second embodiment.
  • the processing request distribution unit 18 starts operation when instructed to start parallel processing.
  • the processing request distribution unit 18 starts the operation, first, the parallel processing information 20 is read from the recording device 13 and the parallel processing request 31 recorded in the parallel processing information 20 is stored in the memory 14. Expansion (the expansion is the parallel processing request 21 in FIG. 4). Further, the processing request distribution unit 18 prepares the collection data storage area 22 in the memory 14 based on the collection data information specified in the base station side usage information 32 (step S11).
  • the processing request distribution unit 18 selects terminals to be processed in parallel, that is, terminals to be processed based on the information on the number of required terminals specified in the base station side usage information 32 (step S12). Further, the process request distribution unit 18 acquires a process request corresponding to the start target process based on the information of the start target process specified in the base station side usage information 32 (step S13). Note that either step S12 or step S13 may be first.
  • the processing request distribution unit 18 sets the terminals selected in step S12 so as not to overlap each processing request acquired in step S13 (step S14). Then, the processing request distribution unit 18 writes, for example, identification information of the set terminal in the processing terminal field of the processing information 33 corresponding to the parallel processing request 21 developed in the memory 14. When a terminal is first set as a processing request, one processing request may be assigned to one terminal.
  • the processing request distribution unit 18 transmits a processing request to all terminals selected in step S12 (step S15).
  • the processing request distribution unit 18 checks the end flags of all the processing information 33 corresponding to the processing specified as the waiting target processing in the base station side usage information 32 (step S16).
  • step S17: No When all the corresponding end flags become true (step S17: Yes), all the parallel processing ends, and the processing result is stored in the collected data storage area 22 of the memory 14. Then, the processing request distribution unit 18 ends the operation at the start of a series of parallel processing.
  • FIG. 10 is a flowchart of an operation when the processing result is received in the base station according to the second embodiment.
  • the processing result receiving unit 19 waits for the processing request distribution unit 18 to wait until the end flag of all the waiting target processes becomes true (step S16, step S17).
  • the communication unit 15 receives the processing result 71, the operation is started by an interrupt.
  • the base station validates any one processing result and invalidates the other processing results. For example, the base station may validate the processing result received earlier and invalidate the processing result received later.
  • Step S21 a processing name is acquired from the processing name field of the received processing result 71 (step S21).
  • the processing result receiving unit 19 acquires the value of the end flag of the processing information 33 corresponding to the processing name acquired in Step S21 from the memory 14 (Step S22).
  • step S23 No
  • the base station has already received the processing result corresponding to the processing name acquired in step S21. Accordingly, the processing result receiving unit 19 ends the operation at the time of receiving a series of processing results, and returns the processing to the operation at the start of parallel processing by the processing request distributing unit 18.
  • step S22 If the end flag acquired in step S22 is false (step S23: Yes), the processing result receiving unit 19 broadcasts the received processing result 71 to all the terminals performing parallel processing (step S24). . As a result, all terminals performing parallel processing can know that the partial loop processing being executed in other terminals has ended.
  • step S25 the processing result receiving unit 19 sets the end flag of the processing information 33 corresponding to the processing name acquired in step S21 to true (step S25). Note that either step S24 or step S25 may be first.
  • step S26: No the process result receiving unit 19 The operation at the time of receiving the processing result is terminated. Then, the processing returns to the operation at the start of parallel processing by the processing request distribution unit 18.
  • step S26 When the process corresponding to the process name acquired in step S21 is designated as the waiting process (step S26: Yes), the process result receiving unit 19 stores the process result 71 in the collected data storage area 22 prepared in the memory 14. The data 72 is expanded (step S27). Then, the processing result receiving unit 19 ends the operation at the time of receiving a series of processing results, and returns the processing to the operation at the start of parallel processing by the processing request distributing unit 18.
  • FIG. 11 is a flowchart of the operation when the terminal according to the second embodiment receives the parallel processing request.
  • the receiving unit 58 starts operation.
  • the receiving unit 58 calculates the size of an area necessary for expanding the processing information 61 and the usage data areas 62 and 63 in the memory 54 (step S31).
  • the receiving unit 58 secures a memory area for the size calculated in step S31 in the memory 54 (step S32).
  • step S33 the receiving unit 58 expands the processing information 61 included in the received parallel processing request in the memory 54. Further, the receiving unit 58 expands the usage data areas 62 and 63 in the memory 54 (step S34). Note that either step S33 or step S34 may be first.
  • the receiving unit 58 copies the information of the initial value of the data to the usage data areas 62 and 63 developed in the memory 54 (step S35).
  • the receiving unit 58 acquires the processing information 61 in which the own terminal is designated as the processing terminal from the processing information 61 developed in the memory 54 (step S36). If the identification information of the own terminal is set in the processing terminal field in the processing information 61 developed in the memory 54, the own terminal is designated as the processing terminal.
  • the receiving unit 58 sets the processing flag of the processing information 61 acquired in step S36 to true (step S37).
  • the receiving unit 58 starts up a new thread and causes the program code of the acquired processing information 61 to be executed (step S38).
  • the receiving unit 58 records the ID (identification information) of the thread started up in step S38 in the processing thread field of the processing information 61 acquired in step S36 (step S39). The order of processing in steps S37 to S39 does not matter. Then, the receiving unit 58 ends the operation when receiving a series of parallel processing requests.
  • FIG. 12 is a flowchart of the operation when the processing result is received by the terminal according to the second embodiment.
  • 13 is a flowchart showing the continuation of FIG. 12
  • FIG. 14 is a flowchart showing the continuation of FIG.
  • the receiving unit 58 starts operation when receiving a processing result from another terminal from the base station.
  • the reception unit 58 when the reception unit 58 starts the operation, the reception unit 58 first acquires a process name from the process name field of the received process result 71, and stores process information 61 corresponding to the acquired process name from the memory 54. Obtain (step S41). Next, the receiving unit 58 checks the value of the end flag and the value of the processing flag in the processing information 61 acquired in step S41 (step S42).
  • step S43 No
  • the process corresponding to the process name acquired in step S41 has been completed in the own terminal.
  • the base station receives processing results for the same processing from a plurality of terminals, any one processing result is valid. Therefore, the processing result 71 distributed from the base station is more effective than the processing is completed at the terminal itself.
  • the receiving unit 58 writes the processing terminal information set in the received processing result 71 into the processing terminal field of the processing information 61 acquired in step S41 (step S44). Then, the receiving unit 58 ends the operation when receiving a series of processing results.
  • step S43 Yes
  • the process corresponding to the process name acquired in step S41 is not ended in the own terminal. Therefore, based on the value of the process flag confirmed in step S42, it is checked whether or not the process corresponding to the process name acquired in step S41 is speculatively executed in the own terminal.
  • step S42 If the process flag confirmed in step S42 is false (step S45: No), the process corresponding to the process name acquired in step S41 is not speculatively executed in the own terminal. Therefore, the receiving unit 58 sets the processing flag and end flag of the processing information 61 acquired in step S41 to true (steps S46 and S47). Note that either step S46 or step S47 may be first.
  • step S45 Yes
  • step S48 the processing thread field of the processing information 61 acquired in step S41
  • step S49 cancels speculative execution of the thread corresponding to the acquired ID
  • step S47 the completion
  • the receiving unit 58 writes the processing terminal information set in the received processing result 71 in the processing terminal field of the processing information 61 acquired in step S41 (step S50). Then, the receiving unit 58 copies the data 72 included in the received processing result 71 to the usage data areas 62 and 63 of the memory 54 (step S51). For example, in the case of the example shown in FIG. 2, the data 72 is copied to the usage data area 62 when the data is array A, and is copied to the usage data area 63 when the data is array B. Note that either step S50 or step S51 may be first.
  • the receiving unit 58 checks whether there is a thread waiting for barrier processing. If there is no thread waiting for the barrier processing (step S52: No), the receiving unit 58 ends the operation when receiving a series of processing results.
  • the receiving unit 58 acquires the processing information 61 corresponding to the ID (identification information) of the thread waiting for the barrier process from the memory 54 (step S53). Then, the reception unit 58 acquires the processing information 61 of the subsequent process of the processing information 61 acquired in step S53 from the memory 54 (step S54). For example, in the case of the example shown in FIG. 2, when the thread performing the process 1-1 is in the barrier process waiting state, the receiving unit 58 performs processing information 61 of the process 2-1 that is a process subsequent to the process 1-1. Is obtained from the memory 54.
  • the receiving unit 58 acquires the processing information 61 of the preceding process of the processing information 61 acquired in step S54 from the memory 54 (step S55). For example, in the case of the example shown in FIG. 2, when the process information 61 of process 2-1 is acquired in step S54, the receiving unit 58 performs processes 1-1 to 1-10, which are the preceding processes of process 2-1. Information 61 is acquired from the memory 54.
  • the receiving unit 58 confirms the value of the end flag of the processing information 61 for all the preceding processes acquired in step S55. If all the preceding process end flags are true (step S56: Yes), the receiving unit 58 cancels the barrier process waiting state of the thread waiting for the barrier process (step S57). Then, the receiving unit 58 ends the operation when receiving a series of processing results. On the other hand, if at least one preceding process end flag is not true (step S56: No), the receiving unit 58 does nothing and ends the operation when receiving a series of processing results.
  • step S54 the reception unit 58 confirms the subsequent process 2-1 of the process waiting for the barrier process.
  • step S55 and step S56 the receiving unit 58 checks whether or not all the processes 1-1 to 1-10 preceding the subsequent process 2-1 have been completed. If the processing 1-1 to 1-10 is completed, the receiving unit 58 can cancel the barrier processing waiting state of the processing 1-1 and start the subsequent processing 2-1.
  • Barrier processing is called when thread processing proceeds at the terminal.
  • the process 2-1 is completed and the barrier process is called in the terminal to which the process 1-1, the process 2-1 and the process 3-1 are assigned.
  • the barrier process in this case, the following three cases can be considered.
  • the process 2-2 which is a process subsequent to the process 1-2 after the completion of the process 2-1. Is preferentially executed (first case).
  • the terminal executes speculatively the process that does not end with processes 2-2 to 2-10, and waits for a barrier process. There is a case that becomes a state (second case).
  • the barrier process is called, the processes 2-2 to 2-10 are all finished, and the terminal can execute the next process 3-1. Yes (third case).
  • each of the three cases will be described.
  • FIG. 15 is a flowchart of an operation during a barrier process performed by the terminal according to the second embodiment.
  • FIG. 16 is a flowchart showing a continuation of FIG.
  • FIG. 17 is a flowchart showing a continuation of FIGS. 15 and 16.
  • FIG. 18 is a flowchart showing a continuation of FIGS. 16 and 17.
  • the barrier processing unit 57 starts operation.
  • the barrier processing unit 57 starts operation, first, the processing information 61 corresponding to the ID (identification information) of the thread that called the barrier processing is acquired from the memory 54 ( Step S61). Next, the barrier processing unit 57 sets the end flag of the processing information 61 acquired in step S61 to true (step S62).
  • Step S63 the barrier processing unit 57 generates a processing result 71 as shown in FIG. 8 based on the information in the data output area field of the processing information 61 acquired in step S61 (step S63), and the processing result 71 is stored in the base station.
  • Step S64 the processing result 71 is stored in the base station.
  • Step S62 may be after step S63 or after step S64.
  • the barrier processing unit 57 precedes the processing that is performed by the thread that has designated the own terminal as the processing terminal and called the barrier synchronization processing from the processing information 61 expanded in the memory 54.
  • Process information 61 of all processes that are processes is acquired (step S65).
  • the barrier process part 57 acquires the process information 61 used as the subsequent process of all the process information 61 acquired by step S65 from the memory 54 (step S66).
  • the barrier processing unit 57 performs a process 1- From 1 to 1-10, processing information 61 in which the own terminal is designated as the processing terminal is acquired.
  • processing information 61 of processing 1-1, processing 1-2, and processing 1-3 when the own terminal is specified as the processing terminal, the own terminal is processing 1-1, processing before the current time. This means that 1-2 and processing 1-3 have been executed to the end.
  • the process 1-1 is originally a process executed by the own terminal
  • the process 1-2 and the process 1-3 are processes that have been executed speculatively by the own terminal in the past and could be executed to the end. is there. Therefore, the terminal itself executes not only the process 2-1 that is the process subsequent to the process 1-1 but also the process 2-2 and the process 2-3 that are the subsequent processes of the process 1-2 and the process 1-3, respectively.
  • the barrier processing unit 57 acquires the process information 61 of the process 2-1, the process 2-2, and the process 2-3, which are subsequent processes of the process 1-1, the process 1-2, and the process 1-3. .
  • the barrier processing unit 57 checks whether or not there is processing information 61 whose processing flag is false among all the processing information 61 acquired in step S66. If there is processing information 61 whose processing flag is false (step S67: Yes), the barrier processing unit 57 starts up a new thread and executes the program code of the processing information 61 whose processing flag is false (step S69). ). At this time, if there are a plurality of processing information 61 whose processing flag is false, the barrier processing unit 57 selects any one of the plurality of processing information 61 (step S68) and executes the program code. (Step S69).
  • the barrier processing unit 57 records the ID (identification information) of the thread started up in step S69 in the processing thread field of the processing information 61 in which the program code is executed in step S69 (step S70).
  • the barrier processing unit 57 records the information of the terminal itself in the processing terminal field of the processing information 61 for which the program code has been executed in step S69, and sets the processing flag of the processing information 61 to true (step S71).
  • the order of processing in steps S69 to S71 does not matter.
  • the barrier processing unit 57 confirms whether there is a thread waiting for the barrier processing. If there is no thread waiting for the barrier process (step S79: No), the barrier processing unit 57 shifts the thread started in step S69 to the state waiting for the barrier process (step S80). In this state, when the reception unit 58 of the terminal releases the barrier process waiting state of the thread waiting for the barrier process (step S57 in FIG. 14), the process proceeds to step S82 in the flowchart shown in FIG.
  • the barrier processing unit 57 sets the processing flag of the processing information 61 of the subsequent processing for the processing performed in the thread for which the barrier processing waiting state has been released to true (step S82).
  • the barrier processing unit 57 records the information of the terminal itself in the processing terminal field of the processing information 61 of the subsequent processing for the processing performed in the thread that has been released from the barrier processing waiting state (step S83). Note that either step S82 or step S83 may be first.
  • the barrier processing unit 57 confirms whether or not the program code is included in the processing information 61 of the subsequent processing for the processing performed in the thread that has been released from the barrier processing waiting state.
  • the barrier processing unit 57 ends the execution of the subsequent processing thread for the processing performed in the thread whose barrier processing wait state has been released (step S88). Then, the operation during the series of barrier processes is terminated.
  • step S84 when the subsequent process to the process performed in the thread whose barrier process wait state has been released is, for example, processes 3-1 to 3-10, the program code is included in step S84. If not.
  • step S84 When the program code is included in step S84 (step S84: Yes), the barrier processing unit 57 starts up a new thread and performs subsequent processing for the processing performed in the thread that has been released from the barrier processing wait state.
  • the program code of the processing information 61 is executed (step S85).
  • the barrier processing unit 57 records the ID (identification information) of the thread started up in step S85 in the processing thread field of the processing information 61 in which the program code is executed in step S85 (step S86). Then, the barrier processing unit 57 ends the execution of the thread of the subsequent process for the process performed in the thread for which the barrier process waiting state has been released (step S88), and ends the operation during the series of barrier processes.
  • step S79 Yes
  • the barrier processing unit 57 ends the execution of the thread started in step S69 (step S79). S88), the operation during the series of barrier processing is terminated.
  • step S67 if there are a plurality of pieces of processing information 61 whose processing flag is false, the processing of the first case is performed a plurality of times.
  • the first case of the first time For example, it is assumed that the process 2-2 is speculatively executed by the above process.
  • the barrier process is called by the end of the process 2-2, the terminal performs, for example, speculative execution of the process 2-3 by the second process of the first case. By repeating this, a plurality of processes can be speculatively executed.
  • step S67 of the flowchart shown in FIG. There is no processing information 61 in which the processing flag is false (step S67: No). Therefore, as illustrated in FIG. 16, the barrier processing unit 57 acquires processing information 61 corresponding to the subsequent processing of the processing information 61 acquired in step S61 from the memory 54 (step S72).
  • the barrier processing unit 57 acquires all processing requests corresponding to the preceding processing of the processing information 61 acquired in step S72 from the memory 54 (step S73).
  • the barrier processing unit 57 checks whether or not there is processing information 61 whose processing flag is false in the processing request acquired in step S73. If there is processing information 61 whose processing flag is false (step S74: Yes), there is a speculatively executable process. Therefore, the barrier processing unit 57 starts a new thread for each processing information 61 whose processing flag is false, and causes the program code of the processing information 61 to be executed (step S75).
  • the barrier processing unit 57 records the ID (identification information) of the thread started up in step S75 in the processing thread field of each processing information 61 in which the program code is executed in step S75 (step S76).
  • the barrier processing unit 57 records information of the terminal itself in the processing terminal field of each processing information 61 for which the program code has been executed in step S69, and sets the processing flag of the processing information 61 to true (step S77). . Note that the order of processing in steps S75 to S77 does not matter. And it progresses to step S79 of the flowchart shown in FIG.
  • the barrier processing unit 57 confirms whether there is a thread waiting for the barrier processing. If there is no thread waiting for the barrier process (step S79: No), the barrier processing unit 57 shifts the thread activated in step S75 to the state waiting for the barrier process (step S80). In this state, when the reception unit 58 of the terminal releases the barrier process waiting state of the thread waiting for the barrier process (step S57 in FIG. 14), the process proceeds to step S82 in the flowchart shown in FIG. After step S82 or in step S79, if there is already a thread waiting for the barrier process (step S79: Yes), all are the same as in the first case described above.
  • step S74 determines whether or not there is processing information 61 whose processing flag is false in step S74. If there is processing information 61 whose end flag is false (step S78: Yes), there is a speculatively executing process. In this case, the process proceeds to step S79 in the flowchart shown in FIG.
  • step S79: No when there is no thread waiting for the barrier processing (step S79: No), the barrier processing unit 57 performs processing of the processing information 61 whose end flag is false, that is, speculatively executing.
  • the thread that is performing the processing is transitioned to a state waiting for barrier processing (step S80). Thereafter, or in step S79, if there is already a thread waiting for the barrier process (step S79: Yes), all are the same as in the first case described above.
  • step S78 the end flag is set in step S78 of the flowchart shown in FIG. There is no processing information 61 that is false (step S78: No).
  • step S81: Yes when there is a thread waiting for the barrier processing (step S81: Yes), the barrier processing unit 57 releases the barrier processing waiting state of the thread (step S87). Then, the barrier processing unit 57 ends the execution of the thread that has released the barrier processing waiting state (step S88), and ends the operation during the series of barrier processing.
  • step S81 when there is no thread waiting for the barrier process (step S81: No), the current thread is the process executed first in this stage in the terminal, and the process is finished in the other terminals. There is no need to wait for barrier processing. Therefore, as in the case where the barrier processing waiting state is canceled by the receiving unit 58, the barrier processing unit 57 performs the processing after step S82.
  • each terminal executes speculatively by executing time slice as an independent thread, it is possible to prevent the inconvenience of not knowing which process should be speculatively executed.
  • priority is set to a thread that is speculatively executed by the terminal in the second embodiment, and more CPU time is allocated to a thread having a higher priority at the time slice execution time.
  • FIG. 19 is a schematic diagram for explaining the parallel processing at the time of setting the priority of the speculative process.
  • two types of high and low are set as priorities, and high priority threads are shown surrounded by lines.
  • an example in which the number of terminals is six is shown.
  • terminal # 1 speculatively executes each of the threads # 2 to # 6 with high priority after completing the execution of the thread # 1 that performs the process assigned to itself.
  • terminal # 1 is the terminal with the highest number of threads that are speculatively executed with high priority.
  • terminal # 2 finishes executing thread # 2 that performs processing assigned to itself, terminal # 2 has half or approximately half the number of threads that are speculatively executed with high priority in terminal # 1 (# 5 and # 6) are speculatively executed with high priority.
  • the priority of the threads (# 5 and # 6) set with high priority in the terminal # 2 is changed to low.
  • terminal # 2 is the terminal with the highest number of threads that are speculatively executed with high priority.
  • terminal # 3 completes execution of thread # 3 that performs processing assigned to itself, terminal # 3 has half or approximately half the number of threads that are speculatively executed with high priority in terminal # 2 (# 6) Execute speculatively with high priority.
  • the priority of the thread (# 6) set to high priority in terminal # 3 is changed to low. The same applies to other terminals. By doing so, the number of threads that are speculatively executed with high priority is averaged between terminals performing parallel processing.
  • the number of threads subject to speculative execution decreases, the number of terminals performing speculative execution becomes larger than the number of threads subject to speculative execution.
  • the same thread is speculatively executed with high priority in a plurality of terminals. Therefore, the thread with the smallest number of terminals that are executed with high priority is executed with high priority. By doing so, the number of threads executed with high priority among the threads to be speculatively executed is averaged. For example, in the example shown in FIG. 19, for example, in the terminals # 1 to # 4, the thread # 5 and the thread # 6 are set with high priority and are executed equally.
  • FIG. 20 is a schematic diagram illustrating an example of processing information according to the third embodiment.
  • each field of the high priority flag and the high priority processing terminal list Is set.
  • a thread that performs processing corresponding to the processing information 81 is set to high priority.
  • true may be set in the high priority flag field as an initial value.
  • the initial value of the high priority flag is true, each thread is activated to operate with high priority.
  • the high priority processing terminal list field a terminal that executes a thread that performs processing corresponding to the processing information 81 with high priority is recorded.
  • FIG. 21 is a flowchart of the operation of the terminal according to the third embodiment when the processing result is received as a continuation of FIG. That is, in the third embodiment, the receiving unit 58 replaces the flowchart shown in FIG. 14 with the flowchart shown in FIG. 21 in the operation when receiving the processing result described with reference to FIGS. 12 to 14 in the second embodiment. Behave. Only differences from the second embodiment will be described below. Therefore, the description of the flowcharts shown in FIGS. 12 and 13 is omitted.
  • Steps S41 to S57 are as described in the second embodiment.
  • the receiving unit 58 acquires in step S55.
  • the high priority flags of all preceding processes are acquired (step S91).
  • the receiving unit 58 checks the value of the high priority flag for all the preceding processes acquired in step S91.
  • step S92: No If there is even one end flag that is not false (step S92: No), the receiving unit 58 cancels the barrier processing waiting state of the thread waiting for the barrier processing (step S57), and receives a series of processing results. End the operation.
  • step S92: Yes When the high priority flag of all the preceding processes acquired in step S91 is false (step S92: Yes), the execution of threads set to high priority has been completed. Accordingly, the receiving unit 58 executes the priority setting process (step S93), and ends the operation when receiving a series of processing results.
  • the priority setting process will be described later.
  • FIG. 22 is a flowchart of the operation of the terminal according to the third embodiment during the barrier process as a continuation of FIG. That is, in the third embodiment, the barrier processing unit 57 replaces the flowchart shown in FIG. 16 with the flowchart shown in FIG. 22 in the operation during the barrier processing described with reference to FIGS. 15 to 18 in the second embodiment. Behave. Only differences from the second embodiment will be described below. Therefore, the description of the flowcharts shown in FIGS. 15, 17 and 18 is omitted.
  • Steps S61 to S67 and Steps S72 to S77 are as described in the second embodiment.
  • the barrier processing unit 57 executes the priority setting process (step S96), and the steps of FIG. Proceed to S79. Other operations during the barrier processing are as described in the second embodiment.
  • FIG. 23 is a flowchart of an operation during the priority setting process in the terminal according to the third embodiment.
  • FIG. 24 is a flowchart showing a continuation of FIG.
  • the terminal when the priority setting process is started, the terminal first determines from the process information 61 developed in the memory 54 that all the end flags are false and the process flags are true. Processing information 61 is acquired (step S101). Next, the terminal acquires the high priority processing terminal list of the processing information 61 acquired in step S101 (step S102).
  • the terminal checks whether or not the high priority processing terminal list acquired in step S102 is empty. When all the confirmed high priority processing terminal lists are empty (step S103: Yes), there is no terminal that performs processing with high priority other than the own terminal. Therefore, the terminal can recognize that it is the own terminal that first finished the assigned process.
  • the terminal When the terminal recognizes that it is the own terminal that first finished the assigned processing, it records the information of the own terminal in the high priority processing terminal list field of all the processing information 61 acquired in step S101 ( Step S104). As a result, in the terminal that first ends the assigned process, all the speculatively executed processes are executed with high priority.
  • the terminal transmits the processing name information of all the processing information 61 acquired in step S101 as a list to the base station (step S105).
  • the transmitted list of processing name information is distributed all at once by the base station with the terminal name of the sender of the list attached at the base station. Then, the process returns to the process upon reception of the process result or the barrier process.
  • step S103 when the high priority processing terminal list is not empty (step S103: No), as shown in FIG. 24, the terminal is executed with high priority for each terminal based on all the processing information 61 acquired in step S101. The number of processes to be collected is totaled (step S106). Next, the terminal confirms whether or not the maximum value of the number of processes executed with high priority counted in step S106 is 1.
  • step S107 When the maximum value of the number of processes executed with high priority is 1 (step S107: Yes), the terminal is recorded in the high priority process terminal list field from the process information 61 acquired in step S101. One piece of processing information 61 having the smallest number of terminals is selected (step S108). Next, the terminal adds its own terminal information to the high priority processing terminal list field of the processing information 61 selected in step S108 (step S109).
  • step S110 the terminal sets the high priority flag of the processing information 61 selected in step S108 to true (step S110). Further, the terminal sets the high priority flag of the processing information 61 other than the processing information 61 selected in step S108 among the processing information 61 acquired in step S101 to false (step S111). Note that either step S110 or step S111 may be first.
  • the priority is set so that the high priority process is equally executed. Is set.
  • the terminal transmits the process name of the process information 61 selected in step S108, that is, the process name information of the process decided to be processed with high priority to the base station (step S112).
  • the transmitted process name information is distributed simultaneously from the base station with the terminal name of the process name being transmitted at the base station.
  • the terminal changes the priority of the thread that performs the processing of the processing information 61 acquired in step S101 based on the value of the high priority flag set in steps S110 and S111 (step S113). And it returns to the process at the time of a process result reception, or a barrier process.
  • step S107 the terminal counts the terminal with the maximum number of processes to be executed with high priority counted for each terminal. One is selected (step S114). Next, the terminal selects any half or about half the number of processes that are assumed to be executed with high priority in the terminal selected in step S114 (step S115).
  • the terminal sets the high priority flag of the processing information 61 corresponding to the processing selected in step S115 to true. Also, the terminal changes the terminal information recorded in the high priority processing terminal list field to the information of the terminal itself (step S116). Further, the terminal sets the high priority flag of the processing information 61 corresponding to the processing other than the processing selected in step S115 among the processing information 61 acquired in step S101 to false (step S117). Note that either step S116 or step S117 may be first.
  • step S114 to step S117 an arbitrary half is selected from the terminal having the largest number of processes executed with high priority, such as the first half of the terminals # 1 to # 3 in the example shown in FIG.
  • the priority is set so that processing is performed with high priority at the terminal itself.
  • the terminal transmits a list of process names of the processes selected in step S115 to the base station (step S118).
  • the transmitted list of processing names is distributed simultaneously from the base station with the terminal name of the transmission source of the list added by the base station.
  • the terminal changes the priority of the thread that performs the processing of the processing information 61 acquired in step S101 based on the value of the high priority flag set in steps S116 and S117 (step S113). And it returns to the process at the time of a process result reception, or a barrier process.
  • step S105 step S112, and step S118
  • information can be shared between terminals performing parallel processing by transmitting the processing name to the base station. Therefore, for example, even if there is a terminal that has become unable to communicate during the execution of speculative processing, the processing that the terminal is executing with high priority can be known from other terminals sharing the information.
  • the operation when the terminal receives the processing name information distributed all at once from the base station operation when receiving the high priority processing name list) will be described next.
  • FIG. 25 is a flowchart of the operation when the terminal according to the third embodiment receives the high priority process name list.
  • the terminal receives the processing name information delivered from the base station all at once, the terminal starts the operation when receiving the high priority processing name list.
  • step S121 the terminal calculates the number of received process names (step S121), and the number of received process names is 1. It is confirmed whether or not.
  • step S122: No the number of processes speculatively executed is larger than the number of terminals performing speculative execution.
  • one terminal can process one process with high priority. Accordingly, when the process of the received process name is processed with high priority at the own terminal, the process processed with high priority at the own terminal is changed to low priority. Therefore, the terminal changes the high priority flag of the processing information 61 corresponding to all the received processing names to false (step S123).
  • the terminal # 2 and the terminal # 3 execute the processes of the thread # 5 and the thread # 6 that are executed with high priority at the terminal # 1 with high priority at the own terminal, Send to the station.
  • the terminal # 2 and the terminal # 3 receive the process name information delivered from the base station all at once, the thread # 5 and the thread # 6 that are executed with high priority in the own terminal are added to the received process name information. Each process is included.
  • step S123 the terminal # 2 and the terminal # 3 change the processing of the thread # 5 and the thread # 6, which are executed with high priority in the own terminal, to the low priority. Therefore, the terminal # 2 and the terminal # 3 does not require high priority processing. Therefore, after changing the high priority flag to false in step S123, the terminal calculates the number of pieces of processing information 61 in which the high priority flag is set to true (step S124), and whether the calculated value is 0 or not. To check.
  • step S124 If the value calculated in step S124 is 0 (step S125: Yes), the terminal changes the high priority flag of the processing information 61 corresponding to all received processing names to true (step S132). By step S132, it can be avoided that the process performed at high priority on the own terminal is lost because the process at the own terminal is changed to low priority at step S123.
  • the terminal adds the information of the transmission source terminal of the process name information to the high priority process terminal list field of the process information 61 corresponding to the received process name (step S128), and a series of high priority process name lists The operation at the time of reception ends.
  • step S124 when the value calculated in step S124 is not 0 (step S125: No), the terminal deletes its own terminal information from the high priority processing terminal list field of the processing information 61 in which the high priority flag is changed to false in step S123. (Step S126). Next, when there is a thread corresponding to the processing information 61 in which the high priority flag is changed to false in step S123, the terminal changes the processing information of the thread to low priority (step S127).
  • the terminal adds the information of the transmission source terminal of the process name information to the high priority process terminal list field of the process information 61 corresponding to the received process name (step S128), and a series of high priority process name lists The operation at the time of reception ends.
  • steps S123, S126, and S128 the process corresponding to the received process name can be executed with low priority by the own terminal, and the terminal that has transmitted the information of the process name can be executed with high priority.
  • step S121 determines from the memory 54 that the end flag is false, the processing flag is true, and the high priority flag is true.
  • Process information 61 is acquired (step S129). Then, the terminal calculates the number of pieces of processing information 61 acquired in step S129, that is, the number of pieces of processing information 61 whose high priority flag is true (step S130).
  • step S131: Yes If the value calculated in step S130 is 1 (step S131: Yes), the number of terminals performing speculative execution is greater than the number of processes executed speculatively, or the terminal itself has received The process corresponding to the process name is not performed with high priority. Therefore, the terminal adds the information of the terminal of the transmission source of the process name information to the high priority process terminal list field of the process information 61 corresponding to the received process name (step S128), and a series of high priority process name lists The operation at the time of reception ends.
  • step S131 No
  • the number of processes speculatively executed is larger than the number of terminals performing speculative execution. Therefore, in this case, the operation after step S123 is performed, and the process corresponding to the received process name is executed with low priority by the own terminal, and the terminal that is the transmission source of the process name information is executed with high priority. Like that.
  • Example 3 the same effect as Example 2 can be obtained. Further, by setting a priority to a process that is executed speculatively, speculative execution can be performed efficiently.
  • processing unit 14 storage unit 18 processing request transmission unit 19 processing result reception unit 51 data processing device 57, 58 reception unit, processing unit

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

 データ処理方法において、第1データ処理装置(51)は、第1処理の処理要求に応答して第1処理の処理情報を取得し、第1処理の処理情報に含まれる第1処理フラグにトルーを設定する。第1データ処理装置(51)は、第1処理を実行した後に第1処理の処理情報の第1終了フラグにトルーを設定する。第1データ処理装置(51)は、第1処理に続いて実行される第3処理の実行を開始する前に実行が終了している必要のある第2処理の処理情報を取得し、第2処理の処理情報に含まれる第2処理フラグおよび第2終了フラグに基づいて実行する処理を決定する。

Description

データ処理方法及びデータ処理システム
 この発明は、データ処理方法及びデータ処理システムに関する。
 従来、クライアントノードが、他のノード群に対し、処理能力及び参加意思を問い合わせ、他のノード群からの応答内容に基づいて、ジョブ処理の受け入れ可能なノードを決定し、ジョブの実行を分配して依頼し、ジョブ処理結果を集計するネットワークシステムがある。また、多数の加入者と、プロセッサ部と、多数の加入者及びプロセッサ部と通信を遂行する交換機と、を有し、プロセッサ部内のそれぞれのプロセッサをアクセスすることができる分散処理プロセッサ部を備えたネットワークシステムがある。
特開2006-201896号公報 特開2003-235083号公報
 しかしながら、無線により通信可能な複数の端末を利用して並列処理を行うシステムの場合、端末自身が移動すると、電波を遮る遮蔽物の状況が時々刻々と変化するため、通信品質が低下してしまうことがある。例えば、並列処理の開始時点では、通信品質が良好であっても、並列処理の途中で通信品質が低下し、通信に非常に時間がかかるようになったり、通信ができなくなったりすることがある。このような状況になると、並列処理が終わるまでに多大な時間がかかったり、並列処理を終わらせることができなくなってしまうという問題点がある。
 データ処理方法及びデータ処理システムは、複数の端末を利用して迅速に並列処理を実行することができるデータ処理方法及びデータ処理システムを提供することを目的とする。
 上述した課題を解決し、目的を達成するため、データ処理方法において、第1データ処理装置は、第1処理の処理要求に応答して第1処理の処理情報を取得し、第1処理の処理情報に含まれる第1処理フラグにトルーを設定する。第1データ処理装置は、第1処理を実行した後に第1処理の処理情報の第1終了フラグにトルーを設定する。第1データ処理装置は、第1処理に続いて実行される第3処理の実行を開始する前に実行が終了している必要のある第2処理の処理情報を取得し、第2処理の処理情報に含まれる第2処理フラグおよび第2終了フラグに基づいて実行する処理を決定する。
 開示のデータ処理方法及びデータ処理システムによれば、複数の端末を利用して迅速に並列処理を実行することができるという効果を奏する。
図1は、実施例1にかかるデータ処理方法を示すフローチャートである。 図2は、バリア同期を用いたループ並列処理を説明する模式図である。 図3は、実施例2にかかるデータ処理方法を説明する模式図である。 図4は、実施例2にかかる基地局を示すブロック図である。 図5は、実施例2にかかる並列処理情報の一例を示す模式図である。 図6は、実施例2にかかる処理情報の一例を示す模式図である。 図7は、実施例2にかかる端末を示すブロック図である。 図8は、実施例2にかかる処理結果の一例を示す模式図である。 図9は、実施例2にかかる基地局における並列処理開始時の動作を示すフローチャートである。 図10は、実施例2にかかる基地局における処理結果受信時の動作を示すフローチャートである。 図11は、実施例2にかかる端末における並列処理要求受信時の動作を示すフローチャートである。 図12は、実施例2にかかる端末における処理結果受信時の動作を示すフローチャートである。 図13は、図12の続きを示すフローチャートである。 図14は、図13の続きを示すフローチャートである。 図15は、実施例2にかかる端末におけるバリア処理時の動作を示すフローチャートである。 図16は、図15の続きを示すフローチャートである。 図17は、図15及び図16の続きを示すフローチャートである。 図18は、図16及び図17の続きを示すフローチャートである。 図19は、投機処理の優先度設定時の並列処理を説明する模式図である。 図20は、実施例3にかかる処理情報の一例を示す模式図である。 図21は、実施例3にかかる端末における処理結果受信時の動作を図13の続きとして示すフローチャートである。 図22は、実施例3にかかる端末におけるバリア処理時の動作を図15の続きとして示すフローチャートである。 図23は、実施例3にかかる端末における優先度設定処理時の動作を示すフローチャートである。 図24は、図23の続きを示すフローチャートである。 図25は、実施例3にかかる端末における高優先処理名リスト受信時の動作を示すフローチャートである。
 以下に、この発明にかかるデータ処理方法及びデータ処理システムの実施例を図面に基づいて詳細に説明する。データ処理方法及びデータ処理システムは、データ処理装置が、第1処理に続いて実行される第3処理の前に実行される第2処理の処理情報を取得し、第2処理の処理情報に含まれる第2処理フラグに基づいて第3処理を実行するものである。なお、この実施例によりこの発明が限定されるものではない。
(実施例1)
 図1は、実施例1にかかるデータ処理方法を示すフローチャートである。図1に示すように、データ処理が開始されると、まず、データ処理装置(第1データ処理装置)は、第1処理の処理要求に応答して第1処理の処理情報を取得する(ステップS1)。
 次いで、データ処理装置は、第1処理フラグにトルーを設定する(ステップS2)。第1処理フラグは、第1処理の処理情報に含まれている。次いで、データ処理装置は、第1処理を実行する。
 第1処理の実行後、データ処理装置は、第1終了フラグにトルーを設定する(ステップS3)。第1終了フラグは、第1処理の処理情報に含まれている。
 次いで、データ処理装置は、第2処理の処理情報を取得する(ステップS4)。データ処理装置では、本来、第1処理に続いて第3処理が実行されるようになっている。データ処理装置が第2処理を実行する場合、第2処理は、第3処理の前に実行される。
 次いで、データ処理装置は、第2処理フラグに基づいて第3処理を実行する(ステップS5)。第2処理フラグは、第2処理の処理情報に含まれている。そして、データ処理装置は、一連のデータ処理を終了する。
 実施例1によれば、処理速度の速いデータ処理装置が、第1処理の実行が終了した後、第3処理の実行を開始するまでの待機時間に、処理速度の遅いデータ処理装置で実行される第2処理を投機的に実行することができる。従って、複数のデータ処理装置を利用して迅速に並列処理を実行することができる。また、無線により通信可能な端末をデータ処理装置として用いて並列処理を行う場合、通信品質が低下した端末に割り当てられている第2処理を、通信品質の良好な端末が第3処理の実行開始を待つ間に投機的に実行することができる。従って、複数の端末を利用して迅速に並列処理を実行することができる。
(実施例2)
 実施例2は、実施例1にかかるデータ処理方法を、第1データ処理装置として携帯電話機などの端末を用いた携帯電話システムにおいて、バリア同期を用いたループ並列処理に適用したものである。なお、端末の一例として、携帯電話機以外にも、無線による通信が可能な携帯型のゲーム機やPDA(Personal Digital Assistants)などの携帯情報端末が挙げられる。
・バリア同期を用いたループ並列処理の説明
 図2は、バリア同期を用いたループ並列処理を説明する模式図である。図2には、前段のループ処理及び後段のループ処理を、それぞれイタレーション間に依存関係のない例えば10個の部分ループ処理に分割して、例えば10台の端末で並列に処理する例が示されている。
 図2において、「処理m-n」は、n番目の端末が処理するm段目の部分ループ処理を表す。従って、処理1-1、処理1-2、・・・、及び処理1-10は、別々の端末で処理される。処理1-1、処理2-1及び処理3-1は、同じ端末で処理される。なお、前段のループ処理の分割数及び後段のループ処理の分割数は、それぞれ10個に限らず、任意である。
 図2に示す例では、後段のループ処理は、前段のループ処理で出力される配列Aのすべてのデータを利用することになっている。従って、各前段の部分ループ処理(1-1~1-10)1,2,3のプログラムコードの最後には、バリア処理を行う関数(barrier())が挿入されている。それによって、すべての前段の部分ループ処理(1-1~1-10)1,2,3が終了してから、各後段の部分ループ処理(2-1~2-10)4,5,6が開始される。
 最終段の各処理(3-1~3-10)7,8,9は、各端末での処理のアンカーを示す。各後段の部分ループ処理4,5,6(2-1~2-10)のプログラムコードの最後には、バリア処理を行う関数(barrier())が挿入されている。従って、最終段の各処理(3-1~3-10)7,8,9は、すべての後段の部分ループ処理(2-1~2-10)4,5,6が終了してから、開始される。
・データ処理方法の説明
 図3は、実施例2にかかるデータ処理方法を説明する模式図である。図3に示すように、複数、例えば10台の端末で並列処理を行う際、端末#1は、自身に割り当てられた前段の部分ループ処理#1-1を実行する。端末#1は、前段の部分ループ処理#1-1の実行が終了した後に、他の端末#2、端末#3、・・・にそれぞれ割り当てられた前段の部分ループ処理#1-2、部分ループ処理#1-3、・・・を独立したスレッドとしてタイムスライス実行により投機的に実行する。
 端末#1は、他の端末#2、端末#3、・・・から処理結果を受け取ると、受け取った処理結果に対応するスレッドの実行をキャンセルする。端末#1は、最終的に他の端末#2、端末#3、・・・から処理結果を受け取るか、自身で投機的に実行したスレッドで前段の部分ループ処理#1-2、部分ループ処理#1-3、・・・が終了することによって、すべての前段の部分ループ処理の結果が揃うと、自身に割り当てられた後段の部分ループ処理#2-1の実行を開始する。
・基地局の説明
 図4は、実施例2にかかる基地局を示すブロック図である。図4に示すように、基地局11は、例えばCPU(Central Processing Unit、中央処理装置)12、記録装置13、記憶ユニットの一例として例えばメモリ14、及び通信部15を備えている。CPU12、記録装置13、メモリ14及び通信部15は、バス16に接続されている。
 CPU12は、OS(Operating System、オペレーティングシステム)やライブラリ17を実行する。CPU12がOSやライブラリ17を実行することによって、処理要求送信ユニットの一例として例えば処理要求配布部18が実現され、また処理結果受信ユニットの一例として例えば処理結果受信部19が実現される。また、CPU12は、種々のアプリケーションプログラムを実行する。
 処理要求配布部18は、並列処理全体を制御する。処理要求配布部18は、複数の端末へ処理の実行を要求する処理要求を配布する処理を行う。処理要求配布部18の動作については、基地局における並列処理開始時の動作として後述する。処理結果受信部19は、各端末から処理の実行結果を受信したときの処理を行う。処理結果受信部19の動作については、基地局における処理結果受信時の動作として後述する。
 記録装置13は、予めプログラムの作成者によって作成された並列処理情報20を記録している。並列処理情報20については、後述する。記録装置13の一例として、例えばROM(Read Only Memory、リードオンリーメモリ)、HD(Hard Disk、ハードディスク)または磁気テープなどの不揮発性の記憶装置が挙げられる。
 メモリ14は、例えばCPU12の作業領域として用いられる。メモリ14には、並列処理要求21及び回収データ格納領域22が展開される。並列処理要求21は、後述する並列処理情報20に含まれている並列処理要求を展開したものである。メモリ14には、並列処理要求21のデータの一部として、処理の実行が行われていることを示す処理フラグ、処理の実行の終了を示す終了フラグ、及び処理を実行する端末を示す情報が、処理に関連づけられて記憶される。また、図2に示す例では、回収データ格納領域22として配列Bの格納領域が展開される。メモリ14の一例として、例えばRAM(Random Access Memory、ランダムアクセスメモリ)が挙げられる。
 通信部15は、携帯電話網に無線通信により接続して端末との間で例えばパケットの送受信を行う。
・並列処理情報の一例
 図5は、実施例2にかかる並列処理情報の一例を示す模式図である。図5に示すように、並列処理情報20には、並列処理要求31及び基地局側利用情報32が含まれている。並列処理要求31には、処理情報33及び利用データ情報34が含まれている。処理情報33は、複数段及び複数の端末分に分割された部分ループ処理ごとに設定されている。利用データ情報34には、複数の端末で並列処理を行う際に必要となるデータサイズなどのデータ領域に関する情報が含まれている。
 基地局側利用情報32には、基地局が利用する情報が含まれている。基地局側利用情報32には、例えば並列処理を行う端末の数(必要端末数)、並列処理を開始する対象である処理(開始対象処理)、並列処理において後続となる対象である処理(待ち対象処理)、及び並列処理の結果として回収するデータ(回収データ)の情報が含まれている。
 例えば図2に示す例に対応する並列処理情報20の一例について説明する。処理情報33は、例えば処理1-1~1-10の各前段の部分ループ処理1,2,3、処理2-1~2-10の各後段の部分ループ処理4,5,6及び処理3-1~3-10の最終段の各処理7,8,9のそれぞれについて設定されている。
 利用データ情報34には、例えば配列名としてA、Aの配列のデータサイズとして100000、配列名としてB、及びBの配列のデータサイズとして100000という情報が含まれている。データに初期値が設定されている場合、並列処理要求31にデータの初期値が含まれていてもよい。
 基地局側利用情報32には、例えば必要端末数が10台であり、開始対象処理が処理1-1~1-10であり、待ち対象処理が処理2-1~2-10であり、回収データがデータサイズ100000の配列Bであるという情報が含まれている。
・処理情報の説明
 図6は、実施例2にかかる処理情報の一例を示す模式図である。図6に示すように、各部分ループ処理に関する処理情報33には、対応する部分ループ処理に対応するプログラムコード41、及び並列処理の際に利用される付随情報42が含まれている。プログラムコード41は、予めプログラムの作成者によって設定されている。
 付随情報42には、処理名、終了フラグ、処理フラグ、処理端末、後続処理、先行処理、データ出力領域及び処理スレッドの各フィールドが設定されている。これらのフィールドのうち、処理名、後続処理、先行処理及びデータ出力領域の各フィールドには、予めプログラムの作成者によってデータが設定されている。終了フラグ及び処理フラグの各フィールドには、予め初期値が設定されている。各フラグの初期値は、例えばフォールスであってもよい。
 端末は、処理情報33に記述されたすべての先行処理の実行が終了すると、処理情報33に記述されたプログラムコード41の実行を開始することができる。端末は、処理情報33に記述されたプログラムコード41の実行を終えると、処理情報33に記述された後続処理の実行を開始するか、または実行の開始を待機する状態になることができる。データ出力領域のフィールドには、対応する部分ループ処理から処理結果として出力されるデータの範囲が設定される。
 例えば図2に示す例に対応する処理情報33の一例について説明する。処理名のフィールドには、処理1-1や処理1-2などが設定される。処理1-1~1-10について、何れも先行処理がないので、先行処理のフィールドにはヌルが設定される。処理1-1について、後続処理は処理2-1であるので、後続処理のフィールドには処理2-1が設定される。処理1-1について、データ出力領域のフィールドには、配列Aの0から9999までの要素の範囲が設定される。処理1-2~処理1-10についても同様である。
 処理2-1について、先行処理は処理1-1~1-10のすべてであるので、先行処理のフィールドには処理1-1~1-10が設定される。処理2-1について、後続処理は処理3-1であるので、後続処理のフィールドには処理3-1が設定される。処理2-2~処理2-10についても同様である。
 処理3-1について、先行処理は処理2-1~2-10のすべてであるので、先行処理のフィールドには処理2-1~2-10が設定される。処理3-2~処理3-10についても同様である。処理3-1~3-10について、何れも後続処理がないので、後続処理のフィールドにはヌルが設定される。処理3-1~3-10については、処理情報33にプログラムコード41が記述されていない。つまり、処理3-1~3-10は、実質的に何も実行されない。処理3-1~3-10が設定されていることによって、各端末は、処理2-1~2-10を投機的に実行することができる。
・端末の説明
 図7は、実施例2にかかる端末を示すブロック図である。図7に示すように、端末51は、例えばCPU52、通信部53及びメモリ54を備えている。CPU52、通信部53及びメモリ54は、バス55に接続されている。
 CPU52は、OSやライブラリ56を実行する。CPU52がOSやライブラリ56を実行することによって、受信ユニット及び処理ユニットの一例として例えばバリア処理部57及び受信部58が実現される。受信部58は、処理要求に応答して当該処理要求に対応する処理情報を取得する。また、受信部58は、取得した処理情報に含まれる処理フラグにトルーを設定する。受信部58の動作については、端末における並列処理要求受信時及び処理結果受信時の各動作として後述する。
 バリア処理部57は、処理の実行後に当該処理に対応する処理情報の終了フラグにトルーを設定する。バリア処理部57は、投機的な処理の対象となる処理の処理情報を取得し、当該処理情報に含まれる処理フラグに基づいて投機的な処理を行うか否かを判断する。また、バリア処理部57は、処理の終了後に処理結果を生成して基地局へ送信する。バリア処理部57の動作については、端末におけるバリア処理時の動作として後述する。処理結果については、後述する。
 また、OSやライブラリ56の実行によって、スケジューラ部59及びスレッド管理部60が実現される。スケジューラ部59は、タイムスライス実行により一つのプロセッサで複数のスレッドを切り替えて実行する際に、スレッドの切り替えを制御する。タイムスライス実行により、プロセッサが一つでも、擬似的に複数の処理が同時に動作しているように見せかけることができる。スレッド管理部60は、起動されたスレッドを管理する。また、CPU52は、種々のアプリケーションプログラムを実行する。
 メモリ54は、例えばCPU52の作業領域として用いられる。メモリ54には、各部分ループ処理に関する処理情報61及び利用データ領域62,63が展開される。図2に示す例では、利用データ領域62として配列Aの格納領域が展開される。利用データ領域63として配列Bの格納領域が展開される。メモリ54の一例として、例えばRAMが挙げられる。
 通信部53は、携帯電話網に無線通信により接続して基地局との間で例えばパケットの送受信を行う。
・処理結果の説明
 図8は、実施例2にかかる処理結果の一例を示す模式図である。図8に示すように、処理結果71には、データ72及び付随情報73が含まれている。データ72には、部分ループ処理の結果として出力されたデータが格納される。付随情報73には、処理名、処理端末及びデータ領域の各フィールドが設定されている。
・基地局における並列処理開始時の動作
 図9は、実施例2にかかる基地局における並列処理開始時の動作を示すフローチャートである。処理要求配布部18は、並列処理の開始を指示されると、動作を開始する。
 図9に示すように、処理要求配布部18は、動作を開始すると、まず、記録装置13から並列処理情報20を読み込んで、並列処理情報20に記録されている並列処理要求31をメモリ14に展開する(展開したものが、図4の並列処理要求21)。また、処理要求配布部18は、基地局側利用情報32に指定されている回収データの情報に基づいて、メモリ14に回収データ格納領域22を用意する(ステップS11)。
 次いで、処理要求配布部18は、基地局側利用情報32に指定されている必要端末数の情報に基づいて、並列処理をさせる端末、すなわち処理対象の端末を選別する(ステップS12)。また、処理要求配布部18は、基地局側利用情報32に指定されている開始対象処理の情報に基づいて、開始対象処理に対応する処理要求を取得する(ステップS13)。なお、ステップS12とステップS13とは、何れが先であってもよい。
 次いで、処理要求配布部18は、ステップS13で取得した各処理要求に、ステップS12で選別した端末を重複しないように設定する(ステップS14)。そして、処理要求配布部18は、メモリ14に展開されている並列処理要求21の対応する処理情報33の処理端末フィールドに、設定した端末の例えば識別情報を書き込む。最初に処理要求に端末を設定する際には、一台の端末に一つの処理要求が割り当てられるようにしてもよい。
 次いで、処理要求配布部18は、ステップS12で選別したすべての端末に処理要求を送信する(ステップS15)。次いで、処理要求配布部18は、基地局側利用情報32において待ち対象処理に指定されている処理に対応するすべての処理情報33の終了フラグをチェックする(ステップS16)。
 そして、ステップS16でチェックしたすべての終了フラグがトルーになるまで待機する(ステップS17:No)。該当するすべての終了フラグがトルーになると(ステップS17:Yes)、並列処理がすべて終了し、処理結果がメモリ14の回収データ格納領域22に格納される。そして、処理要求配布部18は、一連の並列処理開始時の動作を終了する。
・基地局における処理結果受信時の動作
 図10は、実施例2にかかる基地局における処理結果受信時の動作を示すフローチャートである。処理結果受信部19は、上述したように処理要求配布部18がすべての待ち対象処理の終了フラグがトルーになるのを待つ間に(ステップS16、ステップS17)、並列処理をしている端末から通信部15が処理結果71を受信すると、割り込みによって動作を開始する。このとき、複数の端末からほぼ同時に同じ処理に対する処理結果を受信した場合には、基地局は、何れか一つの処理結果を有効とし、他の処理結果を無効とする。例えば、基地局は、先に受信した処理結果を有効とし、後から受信した処理結果を無効としてもよい。
 図10に示すように、処理結果受信部19は、動作を開始すると、まず、受信した処理結果71の処理名フィールドから処理名を取得する(ステップS21)。次いで、処理結果受信部19は、メモリ14から、ステップS21で取得した処理名に対応する処理情報33の終了フラグの値を取得する(ステップS22)。
 ステップS22で取得した終了フラグがトルーであれば(ステップS23:No)、基地局はステップS21で取得した処理名に対応する処理結果をすでに受け取っていることになる。従って、処理結果受信部19は、一連の処理結果受信時の動作を終了し、処理要求配布部18による並列処理開始時の動作に処理を戻す。
 ステップS22で取得した終了フラグがフォールスであれば(ステップS23:Yes)、処理結果受信部19は、並列処理をしているすべての端末に、受信した処理結果71を一斉配信する(ステップS24)。それによって、並列処理をしているすべての端末が、他の端末で実行されている部分ループ処理が終了したことを知ることができる。
 次いで、処理結果受信部19は、ステップS21で取得した処理名に対応する処理情報33の終了フラグをトルーに設定する(ステップS25)。なお、ステップS24とステップS25とは、何れが先であってもよい。次いで、ステップS21で取得した処理名に対応する処理が並列処理情報20の基地局側利用情報32において待ち対象処理に指定されていない場合(ステップS26:No)、処理結果受信部19は、一連の処理結果受信時の動作を終了する。そして、処理要求配布部18による並列処理開始時の動作に処理が戻る。
 ステップS21で取得した処理名に対応する処理が待ち対象処理に指定されている場合(ステップS26:Yes)、処理結果受信部19は、メモリ14に用意された回収データ格納領域22に処理結果71のデータ72を展開する(ステップS27)。そして、処理結果受信部19は、一連の処理結果受信時の動作を終了し、処理要求配布部18による並列処理開始時の動作に処理を戻す。
・端末における並列処理要求受信時の動作
 図11は、実施例2にかかる端末における並列処理要求受信時の動作を示すフローチャートである。受信部58は、基地局から並列処理要求を受信すると、動作を開始する。
 図11に示すように、受信部58は、動作を開始すると、まず、メモリ54に処理情報61及び利用データ領域62,63を展開するのに必要な領域のサイズを算出する(ステップS31)。次いで、受信部58は、メモリ54に、ステップS31で算出したサイズ分のメモリ領域を確保する(ステップS32)。
 次いで、受信部58は、メモリ54に、受信した並列処理要求に含まれている処理情報61を展開する(ステップS33)。また、受信部58は、メモリ54に利用データ領域62,63を展開する(ステップS34)。なお、ステップS33とステップS34とは、何れが先であってもよい。
 データに初期値が設定されている場合には、受信部58は、メモリ54に展開された利用データ領域62,63にデータの初期値の情報をコピーする(ステップS35)。次いで、受信部58は、メモリ54に展開した処理情報61の中から、処理端末として自端末が指定されている処理情報61を取得する(ステップS36)。メモリ54に展開された処理情報61において、処理端末フィールドに自端末の識別情報が設定されていれば、処理端末として自端末が指定されていることになる。
 次いで、受信部58は、ステップS36で取得した処理情報61の処理フラグをトルーに設定する(ステップS37)。次いで、受信部58は、新規スレッドを立ち上げて、取得した処理情報61のプログラムコードを実行させる(ステップS38)。また、受信部58は、ステップS36で取得した処理情報61の処理スレッドフィールドに、ステップS38で立ち上げたスレッドのID(識別情報)を記録する(ステップS39)。なお、ステップS37~ステップS39の処理の順番は、問わない。そして、受信部58は、一連の並列処理要求受信時の動作を終了する。
・端末における処理結果受信時の動作
 図12は、実施例2にかかる端末における処理結果受信時の動作を示すフローチャートである。図13は、図12の続きを示すフローチャートであり、図14は、図13の続きを示すフローチャートである。受信部58は、基地局から他の端末からの処理結果を受信すると、動作を開始する。
 図12に示すように、受信部58は、動作を開始すると、まず、受信した処理結果71の処理名フィールドから処理名を取得し、メモリ54から、取得した処理名に対応する処理情報61を取得する(ステップS41)。次いで、受信部58は、ステップS41で取得した処理情報61の終了フラグの値と処理フラグの値を確認する(ステップS42)。
 確認した結果、終了フラグがトルーであれば(ステップS43:No)、ステップS41で取得した処理名に対応する処理が自端末で終了していることになる。しかし、上述したように、基地局が複数の端末から、同じ処理に対する処理結果を受信した場合には、何れか一つの処理結果が有効となる。従って、自端末で処理が終了したことよりも、基地局から配信されてきた処理結果71の方が有効となる。
 そこで、受信部58は、ステップS41で取得した処理情報61の処理端末フィールドに、受信した処理結果71に設定されている処理端末の情報を書き込む(ステップS44)。そして、受信部58は、一連の処理結果受信時の動作を終了する。
 一方、ステップS42で確認した終了フラグがフォールスである場合(ステップS43:Yes)、ステップS41で取得した処理名に対応する処理が自端末では終了していないことになる。そこで、ステップS42で確認した処理フラグの値に基づいて、ステップS41で取得した処理名に対応する処理が自端末で投機的に実行されているか否かがチェックされる。
 ステップS42で確認した処理フラグがフォールスである場合(ステップS45:No)、ステップS41で取得した処理名に対応する処理は、自端末では投機的に実行されていないことになる。そこで、受信部58は、ステップS41で取得した処理情報61の処理フラグ及び終了フラグをトルーに設定する(ステップS46、ステップS47)。なお、ステップS46とステップS47とは、何れが先であってもよい。
 一方、ステップS42で確認した処理フラグがトルーである場合(ステップS45:Yes)、ステップS41で取得した処理名に対応する処理が自端末で既に投機的に実行されていることになる。そこで、受信部58は、ステップS41で取得した処理情報61の処理スレッドフィールドからスレッドのIDを取得し(ステップS48)、取得したIDに対応するスレッドの投機的な実行をキャンセルする(ステップS49)。そして、受信部58は、ステップS41で取得した処理情報61の終了フラグをトルーに設定する(ステップS47)。なお、ステップS49とステップS47とは、何れが先であってもよい。
 次いで、図13に示すように、受信部58は、ステップS41で取得した処理情報61の処理端末フィールドに、受信した処理結果71に設定されている処理端末の情報を書き込む(ステップS50)。そして、受信部58は、メモリ54の利用データ領域62,63に、受信した処理結果71に含まれているデータ72をコピーする(ステップS51)。例えば図2に示す例の場合、データ72は、配列Aのデータである場合には利用データ領域62に、配列Bのデータである場合には利用データ領域63に、それぞれコピーされる。なお、ステップS50とステップS51とは、何れが先であってもよい。
 次いで、受信部58は、バリア処理待ちのスレッドがあるか否かを確認する。バリア処理待ちのスレッドがない場合(ステップS52:No)、受信部58は、一連の処理結果受信時の動作を終了する。
 一方、バリア処理待ちのスレッドがある場合(ステップS52:Yes)、受信部58は、バリア処理待ちのスレッドのID(識別情報)に対応する処理情報61をメモリ54から取得する(ステップS53)。そして、受信部58は、ステップS53で取得した処理情報61の後続処理の処理情報61をメモリ54から取得する(ステップS54)。例えば図2に示す例の場合で、処理1-1を行っているスレッドがバリア処理待ち状態であるときには、受信部58は、処理1-1の後続処理である処理2-1の処理情報61をメモリ54から取得する。
 次いで、受信部58は、ステップS54で取得した処理情報61の先行処理の処理情報61をメモリ54から取得する(ステップS55)。例えば図2に示す例の場合で、ステップS54で処理2-1の処理情報61を取得した場合、受信部58は、処理2-1の先行処理である処理1-1~1-10の処理情報61をメモリ54から取得する。
 次いで、図14に示すように、受信部58は、ステップS55で取得したすべての先行処理について処理情報61の終了フラグの値を確認する。すべての先行処理の終了フラグがトルーである場合には(ステップS56:Yes)、受信部58は、バリア処理待ち状態のスレッドのバリア処理待ち状態を解除する(ステップS57)。そして、受信部58は、一連の処理結果受信時の動作を終了する。一方、一つでも先行処理の終了フラグがトルーでない場合には(ステップS56:No)、受信部58は、何もせずに、一連の処理結果受信時の動作を終了する。
 例えば図2に示す例で、処理1-1がバリア処理待ち状態であるときに、処理1-1の後続処理である処理2-1に先行するすべての処理1-1~1-10が終了すると、処理1-1のバリア処理待ち状態を解除することができる。そこで、ステップS54で、受信部58は、バリア処理待ち状態の処理の後続処理2-1を確認する。そして、ステップS55及びステップS56で、受信部58は、この後続処理2-1に対して先行するすべての処理1-1~1-10が終了しているか否かを確認する。処理1-1~1-10が終了していれば、受信部58は、処理1-1のバリア処理待ち状態を解除して後続処理2-1を開始することができる。
・端末におけるバリア処理時の動作
 端末でスレッドの処理が進むと、バリア処理が呼び出される。例えば図2に示す例で、処理1-1、処理2-1及び処理3-1が割り当てられた端末において、処理2-1が終了してバリア処理が呼び出されたとする。この場合のバリア処理では、起こり得るケースとしては次の三つが考えられる。
 第1に、当該端末において、処理1-1の終了後に投機的に実行した処理1-2が最後まで終了したため、処理2-1の終了後に処理1-2の後続処理である処理2-2を優先的に実行するケースがある(第1のケース)。第2に、処理2-2~2-10で終わっていない処理があるため、当該端末において処理2-2~2-10のうちの終わっていない処理を投機的に実行するとともに、バリア処理待ち状態となるケースがある(第2のケース)。第3に、バリア処理が呼び出された時点で処理2-2~2-10がすべて終了していて、当該端末において次の処理3-1を実行することが可能な状態となっているケースがある(第3のケース)。以下、三つのケースごとに説明する。
 図15は、実施例2にかかる端末におけるバリア処理時の動作を示すフローチャートである。図16は、図15の続きを示すフローチャートである。図17は、図15及び図16の続きを示すフローチャートである。図18は、図16及び図17の続きを示すフローチャートである。バリア処理が呼び出されると、バリア処理部57は、動作を開始する。
・第1のケース
 図15に示すように、バリア処理部57は、動作を開始すると、まず、バリア処理を呼び出したスレッドのID(識別情報)に対応する処理情報61をメモリ54から取得する(ステップS61)。次いで、バリア処理部57は、ステップS61で取得した処理情報61の終了フラグをトルーに設定する(ステップS62)。
 次いで、バリア処理部57は、ステップS61で取得した処理情報61のデータ出力領域フィールドの情報に基づいて、図8に示すような処理結果71を生成し(ステップS63)、処理結果71を基地局へ送信する(ステップS64)。なお、ステップS62は、ステップS63の後でもよいし、ステップS64の後でもよい。
 次いで、バリア処理部57は、メモリ54に展開した処理情報61の中から、処理端末として自端末が指定されており、かつバリア同期の処理を呼び出したスレッドで行われている処理に対して先行処理となるすべての処理の処理情報61を取得する(ステップS65)。そして、バリア処理部57は、ステップS65で取得したすべての処理情報61の後続処理となる処理情報61をメモリ54から取得する(ステップS66)。
 例えば図2に示す例で、処理2-1がバリア同期の処理を呼び出したスレッドで行われている処理であるときに、バリア処理部57は、処理2-1の先行処理である処理1-1~1-10のうち、処理端末として自端末が指定されている処理情報61を取得する。例えば、処理1-1、処理1-2及び処理1-3の各処理情報61において、処理端末として自端末が指定されている場合、現時点よりも前に、自端末が処理1-1、処理1-2及び処理1-3を最後まで実行していたことになる。
 処理1-1が、本来、自端末が実行する処理である場合、処理1-2及び処理1-3は、過去に自端末が投機的に実行し、最後まで実行することができた処理である。そこで、自端末は、処理1-1の後続処理である処理2-1だけでなく、処理1-2及び処理1-3のそれぞれの後続処理である処理2-2及び処理2-3も実行する。従って、バリア処理部57は、処理1-1、処理1-2及び処理1-3のそれぞれの後続処理である処理2-1、処理2-2及び処理2-3の処理情報61を取得する。
 次いで、バリア処理部57は、ステップS66で取得したすべての処理情報61のうち、処理フラグがフォールスである処理情報61があるか否か確認する。処理フラグがフォールスである処理情報61がある場合(ステップS67:Yes)、バリア処理部57は、新規スレッドを立ち上げて、処理フラグがフォールスである処理情報61のプログラムコードを実行させる(ステップS69)。その際、処理フラグがフォールスである処理情報61が複数ある場合には、バリア処理部57は、複数の処理情報61の中から任意の一つを選択して(ステップS68)、プログラムコードを実行させる(ステップS69)。
 また、バリア処理部57は、ステップS69でプログラムコードが実行された処理情報61の処理スレッドフィールドに、ステップS69で立ち上げたスレッドのID(識別情報)を記録する(ステップS70)。次いで、バリア処理部57は、ステップS69でプログラムコードが実行された処理情報61の処理端末フィールドに自端末の情報を記録し、当該処理情報61の処理フラグをトルーに設定する(ステップS71)。なお、ステップS69~ステップS71の処理の順番は、問わない。
 次いで、図17に示すように、バリア処理部57は、バリア処理待ち状態のスレッドがあるか否かを確認する。バリア処理待ち状態のスレッドがない場合(ステップS79:No)、バリア処理部57は、ステップS69で立ち上げたスレッドをバリア処理待ちの状態に遷移させる(ステップS80)。この状態で、端末の受信部58によって、バリア処理待ち状態のスレッドのバリア処理待ち状態が解除されると(図14のステップS57)、図18に示すフローチャートのステップS82へ進む。
 そして、図18に示すように、バリア処理部57は、バリア処理待ち状態が解除されたスレッドで行われていた処理に対する後続処理の処理情報61の処理フラグをトルーに設定する(ステップS82)。また、バリア処理部57は、バリア処理待ち状態が解除されたスレッドで行われていた処理に対する後続処理の処理情報61の処理端末フィールドに自端末の情報を記録する(ステップS83)。なお、ステップS82とステップS83とは、何れが先であってもよい。
 次いで、バリア処理部57は、バリア処理待ち状態が解除されたスレッドで行われていた処理に対する後続処理の処理情報61にプログラムコードが含まれているか否かを確認する。プログラムコードが含まれていない場合(ステップS84:No)、バリア処理部57は、バリア処理待ち状態が解除されたスレッドで行われていた処理に対する後続処理のスレッドの実行を終了し(ステップS88)、一連のバリア処理時の動作を終了する。
 例えば図2に示す例では、バリア処理待ち状態が解除されたスレッドで行われていた処理に対する後続処理が例えば処理3-1~3-10である場合に、ステップS84でプログラムコードが含まれていない場合となる。
 ステップS84でプログラムコードが含まれている場合(ステップS84:Yes)、バリア処理部57は、新規スレッドを立ち上げて、バリア処理待ち状態が解除されたスレッドで行われていた処理に対する後続処理の処理情報61のプログラムコードを実行させる(ステップS85)。また、バリア処理部57は、ステップS85でプログラムコードが実行された処理情報61の処理スレッドフィールドに、ステップS85で立ち上げたスレッドのID(識別情報)を記録する(ステップS86)。そして、バリア処理部57は、バリア処理待ち状態が解除されたスレッドで行われていた処理に対する後続処理のスレッドの実行を終了し(ステップS88)、一連のバリア処理時の動作を終了する。
 一方、ステップS79で、バリア処理待ち状態のスレッドがすでにある場合(ステップS79:Yes)、図18に示すように、バリア処理部57は、ステップS69で立ち上げたスレッドの実行を終了し(ステップS88)、一連のバリア処理時の動作を終了する。
 ステップS67で、処理フラグがフォールスである処理情報61が複数ある場合には、第1のケースの処理が複数回行われる。例えば図2に示す例で、端末が、本来処理すべき処理2-1の実行が終了した後、処理2-2及び処理2-3を投機的に実行する場合、1回目の第1のケースの処理によって例えば処理2-2の投機的な実行を行ったとする。処理2-2の終了によってバリア処理が呼び出されると、当該端末は、2回目の第1のケースの処理によって例えば処理2-3の投機的な実行を行う。この繰り返しによって、複数の処理を投機的に実行することができる。
・第2のケース
 上述した第1のケースに対応する処理がないか、第1のケースに対応する最後の処理によってバリア処理が呼び出された場合には、図15に示すフローチャートのステップS67で、処理フラグがフォールスである処理情報61がない状態となる(ステップS67:No)。従って、図16に示すように、バリア処理部57は、ステップS61で取得した処理情報61の後続処理に対応する処理情報61をメモリ54から取得する(ステップS72)。
 次いで、バリア処理部57は、ステップS72で取得した処理情報61の先行処理に対応するすべての処理要求をメモリ54から取得する(ステップS73)。次いで、バリア処理部57は、ステップS73で取得した処理要求において、処理フラグがフォールスである処理情報61があるか否か確認する。処理フラグがフォールスである処理情報61がある場合(ステップS74:Yes)、投機的に実行可能な処理が存在することになる。従って、バリア処理部57は、処理フラグがフォールスである処理情報61ごとに新規スレッドを立ち上げて、当該処理情報61のプログラムコードを実行させる(ステップS75)。
 また、バリア処理部57は、ステップS75でプログラムコードが実行された各処理情報61の処理スレッドフィールドに、ステップS75で立ち上げたスレッドのID(識別情報)を記録する(ステップS76)。次いで、バリア処理部57は、ステップS69でプログラムコードが実行された各処理情報61の処理端末フィールドに自端末の情報を記録し、当該処理情報61の処理フラグをトルーに設定する(ステップS77)。なお、ステップS75~ステップS77の処理の順番は、問わない。そして、図17に示すフローチャートのステップS79へ進む。
 次いで、図17に示すように、バリア処理部57は、バリア処理待ち状態のスレッドがあるか否かを確認する。バリア処理待ち状態のスレッドがない場合(ステップS79:No)、バリア処理部57は、ステップS75で立ち上げたスレッドをバリア処理待ちの状態に遷移させる(ステップS80)。この状態で、端末の受信部58によって、バリア処理待ち状態のスレッドのバリア処理待ち状態が解除されると(図14のステップS57)、図18に示すフローチャートのステップS82へ進む。ステップS82以降、またはステップS79で、バリア処理待ち状態のスレッドがすでにある場合(ステップS79:Yes)は、何れも上述した第1のケースと同様である。
 一方、ステップS74で、処理フラグがフォールスである処理情報61がない場合(ステップS74:No)、投機的に実行可能な処理がないことになる。そこで、バリア処理部57は、ステップS73で取得した処理要求において、終了フラグがフォールスである処理情報61があるか否か確認する。終了フラグがフォールスである処理情報61がある場合(ステップS78:Yes)、投機的に実行中の処理が存在することになる。この場合、図17に示すフローチャートのステップS79へ進む。
 次いで、図17に示すように、バリア処理待ち状態のスレッドがない場合(ステップS79:No)、バリア処理部57は、終了フラグがフォールスである処理情報61の処理、すなわち投機的に実行中の処理を行っているスレッドをバリア処理待ちの状態に遷移させる(ステップS80)。これ以降、またはステップS79で、バリア処理待ち状態のスレッドがすでにある場合(ステップS79:Yes)は、何れも上述した第1のケースと同様である。
・第3のケース
 投機的に実行可能な処理がなく、かつ投機的に実行中の処理もない状態でバリア処理が呼び出された場合には、図16に示すフローチャートのステップS78で、終了フラグがフォールスである処理情報61がない状態となる(ステップS78:No)。この状態で、図18に示すように、バリア処理待ち状態のスレッドがある場合(ステップS81:Yes)、バリア処理部57は、当該スレッドのバリア処理待ち状態を解除する(ステップS87)。そして、バリア処理部57は、バリア処理待ち状態を解除したスレッドの実行を終了し(ステップS88)、一連のバリア処理時の動作を終了する。
 一方、バリア処理待ち状態のスレッドがない場合(ステップS81:No)、当該端末において、現在のスレッドがこの段で最初に実行された処理であり、他の端末で処理が終了しているので、バリア処理待ちを行う必要がない状態である。従って、受信部58によってバリア処理待ち状態が解除された場合と同様に、バリア処理部57は、ステップS82以降の処理を行う。
 実施例2によれば、実施例1と同様の効果が得られる。また、各端末が、終了していない処理を独立したスレッドとしてタイムスライス実行により投機的に実行するので、どの処理を投機的に実行すればよいかわからないという不都合が生じるのを防ぐことができる。
(実施例3)
 実施例3は、実施例2において、端末が投機的に実行するスレッドに優先度を設定し、タイムスライス実行時に優先度が高いスレッドに対してより多くのCPU時間を割り当てるようにしたものである。
・投機処理の優先度設定時の並列処理の説明
 図19は、投機処理の優先度設定時の並列処理を説明する模式図である。図19に示す例では、優先度として高と低の2種類が設定されており、高優先度のスレッドが線で囲まれて示されている。また、端末の数が6台である例が示されている。
 図19に示すように、端末#1は、自身に割り当てられた処理を行うスレッド#1の実行を終了した後に、#2~#6の各スレッドを高優先で投機的に実行している。この時点で、端末#1は、高優先で投機的に実行しているスレッドの数が最も多い端末である。端末#2は、自身に割り当てられた処理を行うスレッド#2の実行が終了すると、端末#1において高優先で投機的に実行されているスレッドの数の半分もしくは約半分の数のスレッド(#5及び#6)を高優先で投機的に実行する。端末#1では、端末#2で高優先に設定されたスレッド(#5及び#6)の優先度が低に変更される。
 この時点で、例えば端末#2が、高優先で投機的に実行しているスレッドの数が最も多い端末であるとする。端末#3は、自身に割り当てられた処理を行うスレッド#3の実行が終了すると、端末#2において高優先で投機的に実行されているスレッドの数の半分もしくは約半分の数のスレッド(#6)を高優先で投機的に実行する。端末#2では、端末#3で高優先に設定されたスレッド(#6)の優先度が低に変更される。他の端末においても同様である。このようにすることによって、並列処理をしている端末間で、高優先で投機的に実行されるスレッドの数が平均化される。
 また、投機的な実行の対象となるスレッドが減ると、投機的な実行をしている端末の数が投機的な実行の対象となるスレッドの数よりも多くなる。この場合には、複数の端末で同じスレッドが高優先で投機的に実行されることになる。従って、高優先で実行している端末の数が最も少ないスレッドが高優先で実行される。このようにすることによって、投機的な実行の対象となるスレッドの中で高優先で実行されるスレッドの数が平均化される。例えば、図19に示す例では、例えば#1~#4の端末でスレッド#5とスレッド#6とが高優先に設定されており、均等に実行されている。
・処理情報の説明
 図20は、実施例3にかかる処理情報の一例を示す模式図である。図20に示すように、処理情報81の付随情報82には、実施例2にかかる処理情報33の付随情報42に加えて(図6参照)、高優先フラグ及び高優先処理端末リストの各フィールドが設定されている。例えば、高優先フラグがトルーである場合、処理情報81に対応する処理を行うスレッドは高優先に設定される。高優先フラグフィールドには、初期値として、例えばトルーが設定されていてもよい。高優先フラグの初期値がトルーである場合、各スレッドは、高優先で動作するように起動される。高優先処理端末リストフィールドには、処理情報81に対応する処理を行うスレッドを高優先で実行している端末が記録される。
・端末における処理結果受信時の動作
 図21は、実施例3にかかる端末における処理結果受信時の動作を図13の続きとして示すフローチャートである。すなわち、実施例3では、受信部58は、実施例2において図12~図14を参照しながら説明した処理結果受信時の動作において、図14に示すフローチャートの部分を図21に示すフローチャートに置き換えた動作をする。以下に、実施例2とは異なる点についてのみ説明する。従って、図12及び図13に示すフローチャートについては、説明を省略する。
 ステップS41~ステップS57は、実施例2で説明したとおりである。図21に示すように、図13のステップS55で取得したすべての先行処理について、一つでもトルーでない終了フラグがある場合には(ステップS56:No)、受信部58は、ステップS55で取得したすべての先行処理の高優先フラグを取得する(ステップS91)。そして、受信部58は、ステップS91で取得したすべての先行処理について高優先フラグの値を確認する。
 一つでもフォールスでない終了フラグがある場合には(ステップS92:No)、受信部58は、バリア処理待ち状態のスレッドのバリア処理待ち状態を解除し(ステップS57)、一連の処理結果受信時の動作を終了する。ステップS91で取得したすべての先行処理の高優先フラグがフォールスである場合(ステップS92:Yes)、高優先に設定されているスレッドの実行がすべて終了したことになる。従って、受信部58は、優先度設定処理を実行し(ステップS93)、一連の処理結果受信時の動作を終了する。優先度設定処理については、後述する。
・端末におけるバリア処理時の動作
 図22は、実施例3にかかる端末におけるバリア処理時の動作を図15の続きとして示すフローチャートである。すなわち、実施例3では、バリア処理部57は、実施例2において図15~図18を参照しながら説明したバリア処理時の動作において、図16に示すフローチャートの部分を図22に示すフローチャートに置き換えた動作をする。以下に、実施例2とは異なる点についてのみ説明する。従って、図15、図17及び図18に示すフローチャートについては、説明を省略する。
 ステップS61~ステップS67及びステップS72~ステップS77は、実施例2で説明したとおりである。図22に示すように、ステップS61~ステップS67及びステップS72~ステップS77において複数のスレッドが起動されると、バリア処理部57は、優先度設定処理を実行し(ステップS96)、図17のステップS79へ進む。バリア処理時のその他の動作については、実施例2で説明したとおりである。
・端末における優先度設定処理時の動作
 図23は、実施例3にかかる端末における優先度設定処理時の動作を示すフローチャートである。図24は、図23の続きを示すフローチャートである。
 図23に示すように、優先度設定処理が開始されると、端末は、まず、メモリ54に展開されている処理情報61から、終了フラグがフォールスであり、かつ処理フラグがトルーであるすべての処理情報61を取得する(ステップS101)。次いで、端末は、ステップS101で取得した処理情報61の高優先処理端末リストを取得する(ステップS102)。
 そして、端末は、ステップS102で取得した高優先処理端末リストが空であるか否かを確認する。確認したすべての高優先処理端末リストが空である場合(ステップS103:Yes)、自端末以外に高優先で処理を実行している端末がないことになる。従って、端末は、割り当てられた処理を最初に終了したのが自端末であるということを認識することができる。
 端末は、割り当てられた処理を最初に終了したのが自端末であるということを認識すると、ステップS101で取得したすべての処理情報61の高優先処理端末リストフィールドに自端末の情報を記録する(ステップS104)。これによって、割り当てられた処理を最初に終了した端末では、投機的に実行される処理がすべて高優先で実行されることになる。
 次いで、端末は、ステップS101で取得したすべての処理情報61の処理名の情報をリストにして基地局へ送信する(ステップS105)。送信された処理名情報のリストは、基地局で該リストの送信元の端末名が付されて基地局から一斉に配信される。そして、処理結果受信時の処理またはバリア処理に戻る。
 一方、高優先処理端末リストが空でない場合(ステップS103:No)、図24に示すように、端末は、ステップS101で取得したすべての処理情報61に基づいて、端末ごとに高優先で実行される処理の数を集計する(ステップS106)。次いで、端末は、ステップS106で集計した高優先で実行される処理の数の最大値が1であるか否かを確認する。
 高優先で実行される処理の数の最大値が1である場合(ステップS107:Yes)、端末は、ステップS101で取得した処理情報61の中から、高優先処理端末リストフィールドに記録されている端末の数が最小である処理情報61を一つ選択する(ステップS108)。次いで、端末は、ステップS108で選択した処理情報61の高優先処理端末リストフィールドに自端末の情報を追加する(ステップS109)。
 そして、端末は、ステップS108で選択した処理情報61の高優先フラグをトルーに設定する(ステップS110)。また、端末は、ステップS101で取得した処理情報61のうち、ステップS108で選択した処理情報61以外の処理情報61の高優先フラグをフォールスに設定する(ステップS111)。なお、ステップS110とステップS111とは、何れが先であってもよい。
 ステップS108~ステップS111によって、投機的な実行をしている端末の数が投機的に実行される処理の数よりも多い場合に、高優先の処理が均等に実行されるように、優先度が設定される。
 次いで、端末は、ステップS108で選択した処理情報61の処理名、すなわち高優先で処理することにした処理の処理名の情報を基地局へ送信する(ステップS112)。送信された処理名の情報は、基地局で該処理名の送信元の端末名が付されて基地局から一斉に配信される。次いで、端末は、ステップS110及びステップS111で設定した高優先フラグの値に基づいて、ステップS101で取得した処理情報61の処理を行うスレッドの優先度を変更する(ステップS113)。そして、処理結果受信時の処理またはバリア処理に戻る。
 一方、高優先で実行される処理の数の最大値が1でない場合(ステップS107:No)、端末は、端末ごとに集計された、高優先で実行される処理の数が最大である端末を一つ選択する(ステップS114)。次いで、端末は、ステップS114で選択した端末において高優先で実行される処理とされている処理の任意の半分もしくは約半分の数の処理を選択する(ステップS115)。
 次いで、端末は、ステップS115で選択した処理に対応する処理情報61の高優先フラグをトルーに設定する。また、端末は、高優先処理端末リストフィールドに記録されている端末の情報を自端末の情報に変更する(ステップS116)。また、端末は、ステップS101で取得した処理情報61のうち、ステップS115で選択した処理以外の処理に対応する処理情報61の高優先フラグをフォールスに設定する(ステップS117)。なお、ステップS116とステップS117とは、何れが先であってもよい。
 ステップS114~ステップS117によって、例えば図19に示す例の#1~#3の端末の前半部分のように、高優先で実行されている処理の数が最も多い端末から任意の半分を選択して自端末で高優先で処理するように、優先度が設定される。
 次いで、端末は、ステップS115で選択した処理の処理名のリストを基地局へ送信する(ステップS118)。送信された処理名のリストは、基地局で該リストの送信元の端末名が付されて基地局から一斉に配信される。次いで、端末は、ステップS116及びステップS117で設定した高優先フラグの値に基づいて、ステップS101で取得した処理情報61の処理を行うスレッドの優先度を変更する(ステップS113)。そして、処理結果受信時の処理またはバリア処理に戻る。
 ステップS105、ステップS112及びステップS118において、基地局へ処理名を送信することによって、並列処理を行っている端末間で情報を共有することができる。従って、例えば投機的な処理の実行中に通信不能となった端末があっても、当該端末が高優先で実行している処理を、情報を共有している他の端末から知ることができる。端末が、基地局から一斉に配信された処理名の情報を受け取ったときの動作(高優先処理名リスト受信時の動作)については、次に説明する。
・端末における高優先処理名リスト受信時の動作
 図25は、実施例3にかかる端末における高優先処理名リスト受信時の動作を示すフローチャートである。端末は、基地局から一斉に配信された処理名の情報を受け取ると、高優先処理名リスト受信時の動作を開始する。
 図25に示すように、端末は、高優先処理名リスト受信時の動作を開始すると、まず、端末は、受信した処理名の数を計算し(ステップS121)、受信した処理名の数が1であるか否かを確認する。受信した処理名の数が1でない場合(ステップS122:No)、投機的に実行される処理の数が投機的な実行をしている端末の数よりも多いことになる。
 一つの処理を高優先で処理することができるのは、原則的に一つの端末である。従って、受信した処理名の処理を自端末で高優先で処理している場合には、自端末で高優先で処理している処理を低優先に変更する。そこで、端末は、受信したすべての処理名に対応する処理情報61の高優先フラグをフォールスに変更する(ステップS123)。
 その際、例えば図19に示す例で、端末#2がスレッド#2を終了するタイミングと端末#3がスレッド#3を終了するタイミングとが同時であるとする。この場合、端末#2と端末#3とは、端末#1で高優先で実行されていたスレッド#5及びスレッド#6の各処理を自端末で高優先で実行することとして、処理名を基地局へ送信する。端末#2及び端末#3は、基地局から一斉に配信された処理名の情報を受け取ると、受け取った処理名の情報に、自端末で高優先で実行するとしたスレッド#5及びスレッド#6の各処理が含まれていることになる。
 従って、ステップS123によって、端末#2及び端末#3は、自端末で高優先で実行するとしたスレッド#5及びスレッド#6の各処理を低優先に変更してしまうので、端末#2及び端末#3には、高優先で行う処理がなくなってしまう。そこで、端末は、ステップS123で高優先フラグをフォールスに変更した後、高優先フラグがトルーに設定されている処理情報61の数を算出し(ステップS124)、算出した値が0であるか否かを確認する。
 ステップS124で算出した値が0である場合(ステップS125:Yes)、端末は、受信したすべての処理名に対応する処理情報61の高優先フラグをトルーに変更する(ステップS132)。ステップS132によって、ステップS123で自端末での処理を低優先に変更したために、自端末に高優先で行う処理がなくなってしまうのを回避することができる。
 そして、端末は、受信した処理名に対応する処理情報61の高優先処理端末リストフィールドに当該処理名の情報の送信元の端末の情報を追加し(ステップS128)、一連の高優先処理名リスト受信時の動作を終了する。
 一方、ステップS124で算出した値が0でない場合(ステップS125:No)、端末は、ステップS123で高優先フラグをフォールスに変更した処理情報61の高優先処理端末リストフィールドから自端末の情報を削除する(ステップS126)。次いで、端末は、ステップS123で高優先フラグをフォールスに変更した処理情報61に対応するスレッドがある場合には、当該スレッドの処理情報を低優先に変更する(ステップS127)。
 そして、端末は、受信した処理名に対応する処理情報61の高優先処理端末リストフィールドに当該処理名の情報の送信元の端末の情報を追加し(ステップS128)、一連の高優先処理名リスト受信時の動作を終了する。ステップS123、ステップS126及びステップS128により、受信した処理名に対応する処理を、自端末は低優先で実行し、当該処理名の情報の送信元の端末が高優先で実行するようにできる。
 一方、ステップS121の計算結果が1である場合(ステップS122:Yes)、端末は、メモリ54から、終了フラグがフォールスであり、かつ処理フラグがトルーであり、かつ高優先フラグがトルーであるすべての処理情報61を取得する(ステップS129)。そして、端末は、ステップS129で取得した処理情報61の数、すなわち高優先フラグがトルーである処理情報61の数を算出する(ステップS130)。
 ステップS130で算出した値が1である場合(ステップS131:Yes)、投機的な実行をしている端末の数が投機的に実行される処理の数よりも多いか、自端末では、受信した処理名に対応する処理を高優先で行っていないことになる。従って、端末は、受信した処理名に対応する処理情報61の高優先処理端末リストフィールドに当該処理名の情報の送信元の端末の情報を追加し(ステップS128)、一連の高優先処理名リスト受信時の動作を終了する。
 一方、ステップS130で算出した値が1でない場合(ステップS131:No)、投機的に実行される処理の数が投機的な実行をしている端末の数よりも多いことになる。従って、この場合には、ステップS123以降の動作を行い、受信した処理名に対応する処理を、自端末は低優先で実行し、当該処理名の情報の送信元の端末が高優先で実行するようにする。
 実施例3によれば、実施例2と同様の効果が得られる。また、投機的に実行される処理に優先度を設定することによって、効率よく投機的な実行を行うことができる。
 14 記憶ユニット
 18 処理要求送信ユニット
 19 処理結果受信ユニット
 51 データ処理装置
 57,58 受信ユニット、処理ユニット

Claims (12)

  1.  第1データ処理装置は、
     第1処理の処理要求に応答して前記第1処理の処理情報を取得し、
     前記第1処理の処理情報に含まれる第1処理フラグにトルーを設定し、
     前記第1処理を実行した後に前記第1処理の処理情報の第1終了フラグにトルーを設定し、
     前記第1処理に続いて実行される第3処理の前に実行される第2処理の処理情報を取得し、
     前記第2処理の処理情報に含まれる第2処理フラグおよび第2終了フラグに基づいて実行する処理を決定すること
     を特徴とするデータ処理方法。
  2.  前記第2処理フラグがフォールスを示すときに前記第2処理を実行すること
     を特徴とする請求項1に記載のデータ処理方法。
  3.  前記第2処理フラグがトルーを示すとともに前記第2処理の処理情報に含まれる第2終了フラグがトルーを示すとき、前記第3処理を実行すること
     を特徴とする請求項1または請求項2に記載のデータ処理方法。
  4.  前記第2処理フラグがトルーを示すとともに前記第2処理の処理情報に含まれる第2終了フラグがフォールスを示すとき、前記第3処理の実行を開始しないこと
     を特徴とする請求項1または請求項2に記載のデータ処理方法。
  5.  前記第2処理の実行結果を受信し、
     前記第2処理の処理情報を取得し、
     前記第2処理の処理情報に含まれる処理装置情報が前記第1データ処理装置を示すとともに第2終了フラグがトルーを示すとき、前記処理装置情報を更新すること
     を特徴とする請求項1乃至請求項4の何れか一に記載のデータ処理方法。
  6.  前記第2処理の実行結果を受信し、
     前記第2処理の処理情報を取得し、
     前記第2処理の処理情報に含まれる処理装置情報が前記第1データ処理装置を示すとともに第2終了フラグがフォールスを示し第2処理フラグがトルーを示すとき、前記第2処理の実行を停止すること
     を特徴とする請求項1乃至請求項4の何れか一に記載のデータ処理方法。
  7.  前記第2処理の実行結果を受信し、
     前記第2処理の処理情報を取得し、
     前記第2処理の処理情報に含まれる処理装置情報が前記第1データ処理装置を示すとともに第2終了フラグがフォールスを示し第2処理フラグがフォールスを示すとき、前記第3処理を実行すること
     を特徴とする請求項1乃至請求項4の何れか一に記載のデータ処理方法。
  8.  前記第2処理の実行結果を受信し、
     前記第2処理の処理情報を取得し、
     前記第2処理の処理情報に含まれる処理装置情報が前記第1データ処理装置を示すとともに第2終了フラグがフォールスを示すとき、前記第1データ処理装置は、優先度の高い処理を実行する第2データ処理装置で実行される第4処理を実行すること
     を特徴とする請求項1乃至請求項4の何れか一に記載のデータ処理方法。
  9.  第1処理の処理要求に応答して前記第1処理の処理情報を取得する受信ユニットと、
     前記第1処理の処理情報に含まれる第1処理フラグにトルーを設定するとともに前記第1処理を実行した後に前記第1処理の処理情報の第1終了フラグにトルーを設定し、前記第1処理に続いて実行される第3処理の前に実行される第2処理の処理情報を取得し、前記第2処理の処理情報に含まれる第2処理フラグに基づいて前記第3処理を実行する処理ユニットと
     を含むことを特徴とするデータ処理システム。
  10.  複数のデータ処理装置に処理の実行を要求する処理要求を送信する処理要求送信ユニットと、
     前記複数のデータ処理装置のうちの少なくとも一のデータ処理装置から前記処理の実行結果を取得する処理結果受信ユニットと、
     前記処理の実行が行われていることを示す処理フラグ、前記処理の実行の終了を示す終了フラグ、及び前記処理を実行するデータ処理装置を示す情報を前記処理に関連づけて記憶する記憶ユニットと
     を含むことを特徴とするデータ処理システム。
  11.  前記処理結果受信ユニットは、
     前記処理結果を受信するとき、前記処理に対応する終了フラグがフォールスを示すときに前記処理フラグをトルーに変更すること
     を特徴とする請求項10に記載のデータ処理システム。
  12.  前記記憶ユニットは、前記処理の実行の優先度を示す優先フラグを記憶すること
     を特徴とする請求項10または請求項11に記載のデータ処理システム。
PCT/JP2011/061896 2011-05-24 2011-05-24 データ処理方法及びデータ処理システム WO2012160655A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2013516111A JP5825346B2 (ja) 2011-05-24 2011-05-24 データ処理方法及びデータ処理システム
PCT/JP2011/061896 WO2012160655A1 (ja) 2011-05-24 2011-05-24 データ処理方法及びデータ処理システム
US14/085,141 US9189301B2 (en) 2011-05-24 2013-11-20 Data processing method and data processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2011/061896 WO2012160655A1 (ja) 2011-05-24 2011-05-24 データ処理方法及びデータ処理システム

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/085,141 Continuation US9189301B2 (en) 2011-05-24 2013-11-20 Data processing method and data processing system

Publications (1)

Publication Number Publication Date
WO2012160655A1 true WO2012160655A1 (ja) 2012-11-29

Family

ID=47216758

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/061896 WO2012160655A1 (ja) 2011-05-24 2011-05-24 データ処理方法及びデータ処理システム

Country Status (3)

Country Link
US (1) US9189301B2 (ja)
JP (1) JP5825346B2 (ja)
WO (1) WO2012160655A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11449795B2 (en) 2019-08-29 2022-09-20 Canvass Analytics Inc. Process speed-based forecasting

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59123944A (ja) * 1982-12-29 1984-07-17 Fujitsu Daiichi Tsushin Softwear Kk プログラム間同期方式
JPH02144657A (ja) * 1988-11-26 1990-06-04 Hitachi Ltd 並列演算処理装置
JPH0883110A (ja) * 1995-07-21 1996-03-26 Hitachi Ltd 制御装置
JP2009230590A (ja) * 2008-03-25 2009-10-08 Fujitsu Ltd 分散処理を実行する演算装置とサーバおよび分散処理方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020129038A1 (en) * 2000-12-18 2002-09-12 Cunningham Scott Woodroofe Gaussian mixture models in a data mining system
JP4335516B2 (ja) * 2001-12-04 2009-09-30 パナソニック株式会社 複数のプロセッサを用いた動画像符号化装置およびその方法
US6947758B2 (en) 2001-12-05 2005-09-20 Samsung Electronics Co., Ltd. System and method for providing a distributed processing element unit in a mobile telecommunications network
JP4259390B2 (ja) * 2004-04-28 2009-04-30 日本電気株式会社 並列演算処理装置
JP2006201896A (ja) 2005-01-19 2006-08-03 Fujitsu Ltd ネットワークシステム及び移動通信ノード
US8438572B2 (en) * 2006-03-15 2013-05-07 Freescale Semiconductor, Inc. Task scheduling method and apparatus
US8572618B2 (en) * 2010-05-07 2013-10-29 Oracle International Corporation Event driven change injection and dynamic extensions to a business process execution language process

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59123944A (ja) * 1982-12-29 1984-07-17 Fujitsu Daiichi Tsushin Softwear Kk プログラム間同期方式
JPH02144657A (ja) * 1988-11-26 1990-06-04 Hitachi Ltd 並列演算処理装置
JPH0883110A (ja) * 1995-07-21 1996-03-26 Hitachi Ltd 制御装置
JP2009230590A (ja) * 2008-03-25 2009-10-08 Fujitsu Ltd 分散処理を実行する演算装置とサーバおよび分散処理方法

Also Published As

Publication number Publication date
US20140082637A1 (en) 2014-03-20
JPWO2012160655A1 (ja) 2014-07-31
JP5825346B2 (ja) 2015-12-02
US9189301B2 (en) 2015-11-17

Similar Documents

Publication Publication Date Title
KR20220150989A (ko) 자원 선택 방법 및 단말 장치
US11284347B2 (en) Activation system information transmission method, apparatus, and device
US10624022B2 (en) Method for establishing wireless LAN communication connection and electronic device therefor
JP2008099280A (ja) 通信システム
CN101502080A (zh) 用于通过简化的套接字接口来支持广播/多播因特网协议包的设备和方法
CN111459676B (zh) 一种节点资源管理方法、装置及存储介质
CN104917813A (zh) 请求资源的方法及装置
WO2014199537A1 (ja) 無線通信装置、無線通信方法、および無線通信制御プログラム
CN102625453B (zh) 用于动态选择rf资源分配中的调度策略的方法和装置
CN110536326B (zh) 基于小步快跑算法的网络负载均衡方法及装置
JP5825346B2 (ja) データ処理方法及びデータ処理システム
US8171273B2 (en) Method and apparatus for reconfiguring software in SDR terminal
JPH07282026A (ja) マルチノード・コンピュータ・システムおよびその方法
US11930399B2 (en) Method, device and system for implementing edge computing
CN112165505B (zh) 去中心化的数据处理方法、电子装置和存储介质
CN111093291B (zh) Tdma自组网及其构建方法、节点、存储介质
JP6502508B2 (ja) スケジューリング装置および方法
CN105634982A (zh) 一种测速服务器的排队方法、测速服务器和客户端
CN115114311A (zh) 一种事务执行方法以及相关装置
JP6930139B2 (ja) 並列プロセス実行方法
CN111294374A (zh) 一种异构设备启动系统、方法、装置及电子设备
CN113206882B (zh) 共识方法、计算机设备和存储介质
JP5857698B2 (ja) タスク並列処理方法、その装置及びそのプログラム、並びにプログラム生成方法、その装置及びそのプログラム
CN116684074B (zh) 硬件密码模组多核调度算法驱动方法、装置及电子设备
JP2007124457A (ja) 通信システム、通信装置、サーバ及びこれらのプログラムと、通信方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11866166

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2013516111

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11866166

Country of ref document: EP

Kind code of ref document: A1