WO2012046300A1 - 情報処理装置、情報処理プログラム、および情報処理方法 - Google Patents

情報処理装置、情報処理プログラム、および情報処理方法 Download PDF

Info

Publication number
WO2012046300A1
WO2012046300A1 PCT/JP2010/067467 JP2010067467W WO2012046300A1 WO 2012046300 A1 WO2012046300 A1 WO 2012046300A1 JP 2010067467 W JP2010067467 W JP 2010067467W WO 2012046300 A1 WO2012046300 A1 WO 2012046300A1
Authority
WO
WIPO (PCT)
Prior art keywords
thread
common variable
storage area
value
data storage
Prior art date
Application number
PCT/JP2010/067467
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 PCT/JP2010/067467 priority Critical patent/WO2012046300A1/ja
Priority to JP2012537509A priority patent/JP5429395B2/ja
Publication of WO2012046300A1 publication Critical patent/WO2012046300A1/ja
Priority to US13/856,775 priority patent/US20130239113A1/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
    • 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

Definitions

  • the present invention relates to an information processing apparatus, an information processing program, and an information processing method for controlling a write request.
  • one process is divided into a plurality of threads, and the plurality of threads are executed in parallel.
  • Some variables are written between multiple threads.
  • a variable in which writing is performed between a plurality of threads is referred to as a common variable.
  • the banner display process data to be displayed is stored in the shared memory.
  • the data to be displayed in each banner display is stored in the shared memory according to the banner display order (Z order) described in the HTML (Hyper Text MarkUp Language) document.
  • the banners may be displayed overlapping each other. Therefore, the banner display processing must be executed in compliance with the display order of the banners, and thus the sequential processing is performed as described above.
  • each thread is assigned to an arbitrary CPU (Central Processing Unit) from the multi-core processor, and the processing of the thread is executed.
  • CPU Central Processing Unit
  • each CPU executes a thread assigned to each CPU regardless of the execution status of other CPUs.
  • it is necessary to perform sequential processing or synchronous processing with all other threads having the common variable (see, for example, Non-Patent Document 1 below).
  • An object of the present invention is to provide an information processing apparatus, an information processing program, and an information processing method capable of improving throughput and execution efficiency in order to solve the above-described problems caused by the prior art.
  • the storage destination of the value of the common variable of each thread of a thread group having a write request for the value of the common variable is set in a data storage area in which the execution order of each thread is associated with a number that defines the output order And storing the value of the common variable for the thread in the execution order corresponding to the number defining the output order of the data storage area in the set data storage area for each thread of the thread group, When all the threads in the group are finished, each value of the common variable stored in the data storage area for each thread is read in the output order, and the read common variable is read out.
  • the information processing apparatus overwrites the values to a particular storage location in the output order, information processing program, and an information processing method is provided.
  • the information processing apparatus According to the information processing apparatus, the information processing program, and the information processing method, it is possible to improve the throughput and the execution efficiency.
  • FIG. 6 is an explanatory diagram illustrating an example of a thread management table 300.
  • FIG. It is explanatory drawing which shows an example of execution order information.
  • 2 is a block diagram showing an information processing apparatus 200.
  • FIG. FIG. 4 is an explanatory diagram illustrating an example of starting process 1.
  • 6 is an explanatory diagram illustrating a detection example 1 of a write request from a thread 1;
  • FIG. 10 is an explanatory diagram illustrating a detection example 2 of a write request from a thread 1; 6 is an explanatory diagram illustrating an example of detection of a write request from a thread 3.
  • FIG. FIG. 10 is an explanatory diagram illustrating a detection example 1 of a write request from a thread 2;
  • FIG. 10 is an explanatory diagram illustrating a detection example 2 of a write request from a thread 2; 6 is an explanatory diagram illustrating an example of detection of a write request from a thread 4.
  • FIG. 6 is an explanatory diagram illustrating an example of detecting the end of a thread 4.
  • FIG. 1 is an explanatory view showing an embodiment of the present invention.
  • a banner display 1 and a banner display 2 in the browser are given.
  • the overlapping portion of the browser banner display is a common variable a.
  • the table 100 is information indicating the execution order of browser processing threads.
  • the table 100 includes a thread ID item 101 and an execution order number item 102.
  • thread identification information is registered in the thread ID item 101.
  • a number indicating the execution order is registered in the item 102 of the execution order number.
  • the execution order number is information obtained by analyzing the HTML document by the browser process.
  • the table 103 is information indicating the storage destination of the value of the common variable a for each thread having the common variable a.
  • the table 103 has a thread ID item 104 and a storage destination item 105 for the common variable a.
  • thread ID item 104 thread identification information is registered.
  • the storage destination item 105 of the common variable a the storage destination address on the GRAM is registered by the OS.
  • GRAM Graphic Random Access Memory
  • the output destination is a display device.
  • the OSD processing unit outputs the data stored in the data storage area of the GRAM to the output destination in the order of output.
  • the execution order of each thread in the GRAM Is set in a data storage area corresponding to a number that defines the output order (number in the output order).
  • the output order number in the GRAM is set based on the table 100.
  • the OS sets each storage destination secured in the table 100.
  • the OS detects a request to write the common variable a from the banner display processing 2
  • the common variable a of the banner display processing 2 is stored in the data storage area of the banner display processing 2 that has been set. Stores a value.
  • the OS detects (4) a request to write the common variable a from the banner display process 1
  • the common variable a of the banner display process 1 is stored in the set data storage area of the banner display process 1. Stores a value.
  • the OS detects the end of the banner display process 1 and the banner display process 2, (6) notifies the OSD processing unit of a write instruction. Then, the OSD processing unit reads (7) each value of the common variable a stored in the data storage area in the order of the output number, and (8) overwrites the read value of the common variable a to a specific storage destination.
  • the value of the common variable a in the banner display process 1 is executed after the writing process of the value of the common variable a in the banner display process 2, the value of the common variable a in the specific storage destination is the banner. This is the value of the common variable a in the display process 2.
  • a multi-core processor system will be described as an example of the information processing apparatus.
  • the multi-core processor is a processor in which a plurality of cores are mounted. If a plurality of cores are mounted, a single processor having a plurality of cores may be used, or a processor group in which single core processors are arranged in parallel may be used.
  • a processor group in which single-core processors are arranged in parallel will be described as an example.
  • FIG. 2 is a block diagram illustrating hardware of the information processing apparatus.
  • the information processing apparatus 200 includes CPUs # 0 to # 3, a shared memory 201, a GRAM 202, an OSD processing unit 203, and a display 204. Each unit is connected via a bus 205.
  • CPU # 0 to CPU # 3 each have a core, a register, and a cache.
  • the CPU # 0 executes the OS 210 and controls the entire information processing apparatus 200.
  • the OS 210 is a master OS, has a function of controlling which CPU the thread is assigned to, and executes the thread assigned to the CPU # 0.
  • CPU # 1, CPU # 2, and CPU # 3 execute OS 211, OS 212, and OS 213, respectively, and execute threads assigned to each OS.
  • OS 211 to OS 213 are slave OSs.
  • the GRAM 202 has a number group that defines the output order to the output destination and a data storage area corresponding to each number of the number group, as in the GRAM shown in FIG.
  • the output destination is the display 204.
  • the display 204 displays data such as a document, an image, and function information as well as a cursor, an icon, or a tool box.
  • a TFT liquid crystal display, a plasma display, or the like can be adopted as the display 204.
  • the OSD processing unit 203 has a function of outputting data stored on the GRAM 202 to the display 204 or the shared memory 201 based on the Z value.
  • the OSD processing unit 203 has a mode setting register and a process ID register.
  • the mode setting register is a register indicating whether to output data to the display 204 or to output data to the shared memory 201.
  • the mode setting register is a 1-bit register.
  • the output destination of data by the OSD processing unit 203 is the display 204.
  • the output destination of data by the OSD processing unit 203 is Indicates that the shared memory 201 is used. In this embodiment, it is assumed that the OSD processing unit 203 detects an instruction to write to the shared memory 201 to detect that the value of the mode setting register has changed from 0 to 1.
  • the process ID register is a register in which process identification information is registered.
  • the OSD processing unit 203 detects an instruction to write to the shared memory 201, the data on the GRAM 202 corresponding to the process identification information set in the process ID register is output to the shared memory 201 in the order of the Z value.
  • the shared memory 201 includes, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), a flash ROM, and the like.
  • a flash ROM stores a boot program
  • a ROM stores application software
  • a RAM is used as a work area for CPU # 0 to CPU # 3.
  • the program stored in the shared memory 201 is loaded on each CPU, thereby causing each CPU to execute a coded process.
  • the shared memory 201 stores, for example, a thread management table 300, an execution order information group, and a common variable information group.
  • the thread management table 300 is information for managing a thread allocation destination CPU for each process for which an activation instruction has been accepted.
  • FIG. 3 is an explanatory diagram showing an example of the thread management table 300.
  • the thread management table 300 includes a process ID item 301, a thread ID item 302, an allocation area item 303, an allocation destination CPU item 304, and a status item 305.
  • Process ID is stored in the process ID item 301.
  • the thread ID field 302 holds the thread ID of the thread included in the process for each process.
  • the allocation area item 303 holds the address of the storage area secured for each thread on the GRAM 202.
  • the assignment destination CPU item 304 holds identification information of the assignment destination CPU of the thread.
  • the state item 305 holds the thread state. There are four thread states: unassigned, executing, and terminated.
  • the OS 210 accepts a process activation instruction
  • the identification information of the process that accepted the activation instruction is registered in the process ID item 301 in the thread management table 300. Then, the OS 210 registers the identification information of the thread included in the process in the thread ID item 302 in the thread management table 300 and registers unassigned in the status item 305.
  • each piece of execution order information in the execution order information group is information indicating the execution order of threads including common variables in each process, for example.
  • the execution order is given as an example of the specific order when the common variables for each thread in the GRAM 202 are stored in the shared memory 201.
  • FIG. 4 is an explanatory diagram showing an example of execution order information.
  • the execution order information 400 is information indicating the execution order of threads including common variables in the process 1. In process 1, thread 1 is executed first, thread 2 is executed second, thread 3 is executed third, and thread 4 is executed fourth.
  • the OS registers a number indicating the execution order as the Z value of the GRAM 202.
  • FIG. 5 is an explanatory diagram showing an example of common variable information.
  • the common variable information 500 is information regarding common variables in the process 1.
  • the common variable information 500 includes an address information item 501 and a size item 502.
  • the address information item 501 holds address information on the shared memory 201
  • the size item 502 holds the size of a variable stored at the address held in the address information item 501.
  • the common variable of the process 1 is a variable stored in the address A on the shared memory 201 and the address B on the shared memory 201.
  • the size of the variable stored at the address A on the shared memory 201 is 2 bytes, and the size of the variable stored at the address B on the shared memory 201 is 3 bytes.
  • a 2-byte area of a variable stored at address A on shared memory 201, an area of a size that can store address A, a 3-byte area of a variable stored at address B on shared memory 201, and an address B Is set for each thread including a common variable.
  • FIG. 6 is a block diagram showing the information processing apparatus 200.
  • the information processing apparatus 200 includes a setting unit 601, a first storage unit 602, a second storage unit 603, and a storage unit 604.
  • the storage unit 604 is the GRAM 202.
  • the function of the setting unit 601 is realized by the CPU # 0 executing the OS 210 having the information processing program stored in the shared memory 201.
  • the functions of the first storage unit 602 are realized when each CPU executes an OS having an information processing program stored in the shared memory 201.
  • the second storage unit 603 when the OS notifies the OSD processing unit 203 of a write instruction and the OSD processing unit 203 receives the write instruction, the function of the second storage unit 603 is realized.
  • the storage unit 604 has a number group that defines the output order to the output destination and a data storage area corresponding to each number of the number group.
  • the setting unit 601 corresponds to the storage destination of the common variable value of each thread in the thread group having a write request for the same common variable value in the target process, and the number that defines the execution order of each thread and the output order.
  • the data storage area is set.
  • the first storage unit 602 stores, in the data storage area set by the setting unit 601, a common variable for threads in the execution order corresponding to the number that defines the output order of the data storage area. Stores a value.
  • the second storage unit 603 reads the values of the common variables stored in the data storage area for each thread by the first storage unit 602 in the order of output, and Overwrite each value to a specific storage location in the output order.
  • FIG. 7 is an explanatory diagram showing an example of starting process 1.
  • the OS 210 detects (1) a process 1 activation instruction
  • the OS 210 (2) sets a storage area for storing a common variable on the GRAM 202 for each thread that handles the common variable among the threads of the process 1.
  • a variable stored at address A of shared memory 201 stored in a storage area set for each thread
  • a variable stored at address B of shared memory 201 address A
  • address B address A
  • address B address B
  • address B address B
  • the OS 210 (3) registers information related to the process 1 in the thread management table 300.
  • the OS 210 (4) assigns the thread 1 to the CPU # 0, and the OS 210 (5) registers the assignment destination CPU of the thread 1 in the thread management table 300.
  • FIG. 8 is an explanatory diagram showing an example of assignment of each thread of the target process.
  • thread 1 is assigned to CPU # 0
  • thread 2 is assigned to CPU # 1
  • thread 3 is assigned to CPU # 2
  • thread 4 is assigned to CPU # 3.
  • the thread management table 300 an assignment destination CPU of each thread is registered.
  • FIG. 9 is an explanatory diagram illustrating a detection example 1 of a write request from the thread 1.
  • the OS 210 detects a write request from the thread 1, the OS 210 searches the common variable information 500 for an address A that is a write destination address of the write request.
  • the OS 210 finds the address A from the common variable information 500, the OS 210 acquires the address of the storage area on the GRAM 202 of the thread 1 from the thread management table 300.
  • a write request is executed to the GRAM 202 based on the address acquired by the OS 210.
  • Data C and address A are stored in the storage area of the thread 1 in the GRAM 202.
  • FIG. 10 is an explanatory diagram showing a detection example 2 of a write request from the thread 1.
  • the OS 210 detects a write request from the thread 1, the OS 210 searches the common variable information 500 for an address B that is a write destination address of the write request.
  • the OS 210 finds the address B from the common variable information 500, the OS 210 acquires the address of the storage area on the GRAM 202 of the thread 1 from the thread management table 300.
  • Data D and address B are stored in the storage area of the thread 1 based on the address acquired by the OS 210.
  • Data C, data D, address A, and address B are stored in the storage area of the thread 1 of the GRAM 202.
  • FIG. 11 is an explanatory diagram showing an example of detection of a write request from the thread 3.
  • the OS 212 searches the common variable information 500 for an address A that is a write destination address of the write request.
  • the OS 212 finds the address A from the common variable information 500, the OS 212 acquires the address of the storage area on the GRAM 202 of the thread 3 from the thread management table 300.
  • Data E and address A are stored in the storage area of the thread 3 based on the address acquired by the OS 212.
  • Data E and address A are stored in the storage area of the thread 3 of the GRAM 202.
  • FIG. 12 is an explanatory diagram showing a detection example 1 of a write request from the thread 2.
  • the OS 211 detects a write request from the thread 2, the OS 211 searches the common variable information 500 for an address B that is a write destination address of the write request.
  • the OS 211 finds the address B from the common variable information 500, the OS 211 acquires the address of the storage area on the GRAM 202 of the thread 2 from the thread management table 300.
  • Data F and address B are stored in the storage area of the thread 2 based on the address acquired by the OS 211.
  • Data F and address B are stored in the storage area of the thread 2 of the GRAM 202.
  • FIG. 13 is an explanatory diagram showing a detection example 2 of a write request from the thread 2.
  • the OS 211 detects a write request from the thread 2, the OS 211 searches the common variable information 500 for an address A that is a write destination address of the write request.
  • the OS 211 finds the address A from the common variable information 500, the OS 211 acquires the address of the storage area on the GRAM 202 of the thread 2 from the thread management table 300. Based on the address acquired by the OS 211, the data G and the address A are stored in the storage area of the thread 2 in the GRAM 202. Data G and address A are stored in the storage area of the thread 2 of the GRAM 202.
  • FIG. 14 is an explanatory diagram showing an example of detection of a write request from the thread 4.
  • the OS 213 searches the common variable information 500 for an address B that is a write destination address of the write request.
  • the OS 213 finds the address B from the common variable information 500, the OS 213 acquires the address of the storage area on the GRAM 202 of the thread 4 from the thread management table 300.
  • Data H and address B are stored in the storage area of the thread 2 based on the address acquired by the OS 213.
  • Data H and address B are stored in the storage area of the thread 4 of the GRAM 202.
  • FIG. 15 is an explanatory diagram showing an example of detecting the end of the thread 4.
  • the OS 213 detects the end of the thread 4
  • the item 305 of the state of the thread 4 related to the process 1 in the thread management table 300 is updated from being executed to being ended.
  • FIG. 16 is an explanatory diagram showing an example of detecting the end of all threads.
  • the OS 210 detects the end of all threads of the process 1 based on the update of the state item 305 of the thread management table 300, the OS 210 sets the process ID register of the OSD processing unit 203 to 1. Then, the OS 210 sets the mode setting register to 1.
  • the OSD processing unit 203 When the OSD processing unit 203 detects that the mode setting register has changed to 1, the OSD processing unit 203 sets a storage area on the GRAM 202 to be output from the GRAM 202 to the shared memory 201 based on the value set in the process ID register. It is specified using the thread management table 300.
  • the OSD processing unit 203 stores data in the shared memory 201 based on the address information stored in the order of the regions having the smallest Z value among the identified storage regions on the GRAM 202.
  • FIG. 17 is a flowchart illustrating an information processing procedure by the OS 210.
  • the OS 210 determines whether the OS 210 has received an instruction to start a target process or an instruction to assign a target thread (step S1701).
  • the OS 210 determines that the target process activation instruction and the target thread allocation instruction are not received (step S1701: NO)
  • the process returns to step S1701.
  • step S1701 if the OS 210 determines that an assignment instruction for the target thread has been received (step S1701: assignment instruction for the target thread), an assignment destination CPU of the target thread that has received the assignment instruction is determined (step S1702). Next, the OS 210 registers the assignment destination CPU of the target thread in the thread management table 300 (step S1703), assigns the target thread (step S1704), and returns to step S1701.
  • step S1701 when the OS 210 determines that the target process activation instruction has been received (step S1701: target process activation instruction), the target process execution order information 400 is acquired (step S1705).
  • the OS 210 secures a data size and an area corresponding to the size of each address on the GRAM 202 for each thread of the target process (step S1706).
  • the OS 210 registers the target process in the thread management table 300 (step S1707), and determines the assignment destination CPU of the master thread of the target process (step S1708).
  • the OS 210 registers the assignment destination CPU of the master thread in the thread management table 300 (step S1709), assigns the master thread of the target process to the assignment destination CPU (step S1710), and returns to step S1701.
  • FIG. 18 is a flowchart showing an information processing procedure by each OS.
  • the information processing procedure shown in FIG. 18 is executed by each OS, but will be described by taking the OS 210 as an example.
  • the OS 210 determines whether or not a write request from the executing thread or the end of the thread is detected (step S1801). When the OS 210 determines that the write request from the executing thread and the end of the thread are not detected (step S1801: No), the process returns to step S1801.
  • step S1801 end of thread
  • step S1801 the state regarding the ended thread in the thread management table 300 is updated (step S1802), and the process returns to step S1801.
  • step S1801 write request
  • step S1803 the common variable information regarding the process to which the thread belongs (step S1803).
  • the OS 210 retrieves the address information of the write request from the common variable information (step S1804), and determines whether the address information of the write request is in the common variable information (step S1805). When the OS 210 determines that the address information of the write request is not included in the common variable information (step S1805: No), the process returns to step S1801.
  • step S1805 when the OS 210 determines that the storage destination of the write request is in the common variable information (step S1805: Yes), the data and address information are written to the area on the GRAM 202 corresponding to the thread being executed (step S1806). ), The process returns to step S1801.
  • FIG. 19 is a flowchart showing a control processing procedure by the OS 210 at the end of a thread having a process of writing to a common variable.
  • the OS 210 determines whether or not a process in which all threads using the common variable have ended is detected (step S1901).
  • step S1901 determines that a process in which all threads using the common variable have not been detected.
  • step S1901 determines that a process in which all threads using the common variable have been detected (step S1901: Yes)
  • a write instruction to write data in the area of the detected process on the GRAM 202 to the shared memory 201 is issued.
  • the OSD processing unit 203 is notified (step S1902). Specifically, the writing instruction indicates that the mode setting flag is set to 1.
  • the OS 210 determines whether or not the completion notification from the OSD processing unit 203 has been received (step S1903).
  • the OS 210 determines that the completion notification from the OSD processing unit 203 has not been received (step S1903: No)
  • the process returns to step S1903.
  • the OS 210 determines that the completion notification from the OSD processing unit 203 has been received (step S1903: Yes)
  • the detected process area on the GRAM 202 is released (step S1904).
  • the OS 210 deletes information regarding the detected process from the thread management table 300 (step S1905), and the series of processing ends.
  • FIG. 20 is a flowchart showing an output processing procedure by the OSD processing unit 203.
  • the OSD processing unit 203 determines whether an instruction to write to the shared memory is detected (step S2001).
  • detection of a write instruction indicates that the mode setting flag has changed from 0 to 1.
  • step S2001: No the process returns to step S2001.
  • step S2001: Yes the placement area of each thread is identified from the thread management table 300 based on the process ID set in the process ID register. (Step S2002).
  • the OSD processing unit 203 identifies the Z value stored in the allocation area of each thread on the GRAM 202 (step S2003), outputs the Z value from the GRAM 202 to the shared memory in ascending order (step S2004), and completes the writing operation as the master OS. (Step S2005), and the process returns to step S2001. Further, the OSD processing unit 203 notifies the master OS of the completion of writing and sets the mode setting register to 0.
  • the number that defines the output order of the common variable value of each thread of the thread group having the common variable in the target process on the GRAM. Is stored in an area corresponding to the execution order of each thread. Then, after all threads in the thread group are finished, the values of the common variables are read from the GRAM in the numerical order that defines the output order, and overwritten to a specific storage location in the numerical order. Even if the execution order of the thread group is different from the execution order of the process-defined thread group, the value of the final common variable can be prevented from being different, and throughput and execution efficiency can be improved. Can do.
  • the function can be easily realized by using GRAM, which is an existing hardware, with the common variable values of each thread as different areas.

Abstract

 OSが、(1)ブラウザ処理に含まれるバナー表示処理1とバナー表示処理2との共通変数aの値の格納先を、各スレッドの実行順をGRAM内の出力順を規定する番号(出力順の番号)に対応させたデータ記憶領域に設定する。OSが、(2)バナー表示処理2からの共通変数aの書き込み要求を検出すると、(3)設定されたバナー表示処理2のデータ記憶領域に、バナー表示処理2の共通変数aの値を格納する。OSが、(4)バナー表示処理1からの共通変数aの書き込み要求を検出すると、(5)設定されたバナー表示処理1のデータ記憶領域に、バナー表示処理1の共通変数aの値を格納する。OSが、バナー表示処理1,2の終了を検出すると、(6)OSD処理部に書き込み指示を通知する。OSD処理部が(7)データ記憶領域に格納された共通変数aの各値を出力の番号順に読み出し、(8)読み出した共通変数aの値を特定の格納先へ上書きする。

Description

情報処理装置、情報処理プログラム、および情報処理方法
 本発明は、書き込み要求を制御する情報処理装置、情報処理プログラム、および情報処理方法に関する。
 従来より、マルチスレッド処理では1つのプロセスを複数のスレッドに分割し、該複数のスレッドを平行して実行させる。変数によっては複数のスレッド間で書き込みが行われる。ここで、複数のスレッド間で書き込みが行われる変数を共通変数と称する。
 シングルコアプロセッサシステムにおいて共通変数を有するスレッドを実行するには逐次処理を行うことで、スレッドの実行順序が変わってしまうことにより最終的な共通変数の値が異なるのを防止することができる。
 ここで、共通変数に関して、ブラウザ処理のバナー表示処理を例に挙げて説明する。バナー表示処理では表示するデータを共有メモリへ格納する。バナー表示処理が複数ある場合、各バナー表示で表示するデータをHTML(Hyper Text MarkUp Language)文書に記載されたバナーの表示順(Zオーダー)に沿って共有メモリへ格納する。表示によってはバナー同士が重なって表示される場合があるため、バナーの表示順を遵守してバナー表示処理が実行されなければならないため、上述したように逐次処理が行われる。
 また、共有メモリ型マルチコアプロセッサシステムでは、各スレッドはマルチコアプロセッサから任意のCPU(Central Processing Unit)に割り当てられることで、該スレッドの処理が実行される。マルチコアプロセッサシステムでは、各CPUが他のCPUの実行状況に関係なく、該各CPUに割り当てられたスレッドを実行する。各CPUは共通変数を有するスレッドを実行する場合、該共通変数を有する他のすべてのスレッドと逐次処理を行うか同期処理を行う必要がある(たとえば、下記非特許文献1を参照。)。
間瀬 正啓、外2名、「マルチコアにおけるParallelizable Cプログラムの自動並列化」、2009 Information Processing Society of Japan
 しかしながら、逐次処理ではスループットが低下する問題点があり、同期処理ではオーバーヘッドで実行効率が低下してしまう問題点があった。
 本発明は、上述した従来技術による問題点を解消するため、スループットおよび実行効率を向上させることができる情報処理装置、情報処理プログラム、および情報処理方法を提供することを目的とする。
 本発明の一観点によれば、出力先への出力順を規定する番号群と当該番号群の各番号に対応するデータ記憶領域とを有する記憶手段にアクセス可能であって、対象プロセス内の同一の共通変数の値についての書き込み要求を有するスレッド群の各スレッドの前記共通変数の値の格納先を、前記各スレッドの実行順を前記出力順を規定する番号に対応させたデータ記憶領域に設定し、前記スレッド群のスレッドごとに、設定された前記データ記憶領域に、当該データ記憶領域の出力順を規定する番号に対応する実行順のスレッドについての前記共通変数の値を格納し、前記スレッド群のすべてのスレッドが終了すると、前記スレッドごとに前記データ記憶領域に格納された前記共通変数の各値を前記出力順に読み出し、読み出した前記共通変数の各値を前記出力順に特定の格納先へ上書きする情報処理装置、情報処理プログラム、および情報処理方法が提供される。
 本情報処理装置、情報処理プログラム、および情報処理方法によれば、スループットおよび実行効率を向上させることができるという効果を奏する。
本発明の一実施例を示す説明図である。 情報処理装置のハードウェアを示すブロック図である。 スレッド管理テーブル300の一例を示す説明図である。 実行順序情報の一例を示す説明図である。 共通変数情報の一例を示す説明図である。 情報処理装置200を示すブロック図である。 プロセス1の起動例を示す説明図である。 対象プロセスの各スレッドの割当例を示す説明図である。 スレッド1からの書き込み要求の検出例1を示す説明図である。 スレッド1からの書き込み要求の検出例2を示す説明図である。 スレッド3からの書き込み要求の検出例を示す説明図である。 スレッド2からの書き込み要求の検出例1を示す説明図である。 スレッド2からの書き込み要求の検出例2を示す説明図である。 スレッド4からの書き込み要求の検出例を示す説明図である。 スレッド4の終了の検出例を示す説明図である。 すべてのスレッドの終了の検出例を示す説明図である。 OS210による情報処理手順を示すフローチャートである。 各OSによる情報処理手順を示すフローチャートである。 共通変数への書き込み処理を有するスレッドの終了時のOS210による制御処理手順を示すフローチャートである。 OSD処理部203による出力処理手順を示すフローチャートである。
 以下に添付図面を参照して、本発明にかかる情報処理装置、情報処理プログラム、および情報処理方法の好適な実施の形態を詳細に説明する。
 図1は、本発明の一実施例を示す説明図である。ここでは、アプリケーションの一例として、ブラウザ内のバナー表示1およびバナー表示2を挙げる。図1では、ブラウザのバナー表示の重なり箇所を共通変数aとしている。テーブル100はブラウザ処理のスレッドの実行順序を示す情報である。テーブル100では、スレッドIDの項目101と実行順の番号の項目102とを有している。スレッドIDの項目101にはスレッドの識別情報が登録されている。実行順の番号の項目102には実行順序を示す番号が登録されている。実行順の番号はブラウザ処理がHTML文書を解析することにより得られる情報である。
 テーブル103は共通変数aを有するスレッドごとの共通変数aの値の格納先を示す情報である。テーブル103はスレッドIDの項目104と共通変数aの格納先の項目105とを有している。スレッドIDの項目104にはスレッドの識別情報が登録されている。共通変数aの格納先の項目105にはOSによりGRAM上の格納先のアドレスが登録される。
 GRAM(Graphic Randam Access Memory)は出力先への出力順を規定する番号群と当該番号群の各番号に対応するデータ記憶領域とを有する。該出力先は表示装置である。OSD処理部はGRAMのデータ記憶領域に記憶されたデータを出力順に出力先へ出力する。
 まず、OSが、ブラウザ処理が起動されると、(1)ブラウザ処理に含まれるバナー表示処理1とバナー表示処理2との共通変数aの値の格納先を、各スレッドの実行順をGRAM内の出力順を規定する番号(出力順の番号)に対応させたデータ記憶領域に設定する。GRAM内の出力順の番号はテーブル100に基づいて設定される。そして、OSが、テーブル100に確保した各格納先を設定する。
 つぎに、OSが、(2)バナー表示処理2からの共通変数aの書き込み要求を検出すると、(3)設定されたバナー表示処理2のデータ記憶領域に、バナー表示処理2の共通変数aの値を格納する。つぎに、OSが、(4)バナー表示処理1からの共通変数aの書き込み要求を検出すると、(5)設定されたバナー表示処理1のデータ記憶領域に、バナー表示処理1の共通変数aの値を格納する。
 そして、OSが、バナー表示処理1およびバナー表示処理2の終了を検出すると、(6)OSD処理部に書き込み指示を通知する。そして、OSD処理部が(7)データ記憶領域に格納された共通変数aの各値を出力の番号順に読み出し、(8)読み出した共通変数aの値を特定の格納先へ上書きする。
 よって、バナー表示処理2における共通変数aの値の書き込み処理のあとに、バナー表示処理1における共通変数aの値の書き込み処理が実行されても、特定の格納先の共通変数aの値はバナー表示処理2における共通変数aの値となる。
 本実施の形態では情報処理装置の一例としてマルチコアプロセッサシステムを挙げて説明する。ここで、マルチコアプロセッサシステムにおいて、マルチコアプロセッサとは、コアが複数搭載されたプロセッサである。コアが複数搭載されていれば、複数のコアが搭載された単一のプロセッサでもよく、シングルコアのプロセッサが並列されているプロセッサ群でもよい。なお、本実施の形態では、説明を単純化するため、シングルコアのプロセッサが並列されているプロセッサ群を例に挙げて説明する。
(情報処理装置のハードウェア)
 図2は、情報処理装置のハードウェアを示すブロック図である。情報処理装置200では、CPU#0~CPU#3と、共有メモリ201と、GRAM202と、OSD処理部203と、ディスプレイ204と、を有している。各部はバス205を介して接続されている。
 ここで、CPU#0~CPU#3はそれぞれコアとレジスタとキャッシュとを有している。CPU#0はOS210を実行し、情報処理装置200の全体の制御を司る。OS210はマスタOSであり、スレッドをどのCPUに割り当てるかを制御する機能を有し、該CPU#0に割り当てられたスレッドを実行する。
 CPU#1とCPU#2とCPU#3とは、それぞれOS211とOS212とOS213とを実行し、各OSに割り当てられたスレッドを実行する。OS211~OS213はスレーブOSである。
 GRAM202は、図1で示したGRAMと同様に出力先への出力順を規定する番号群と当該番号群の各番号に対応するデータ記憶領域とを有する。該出力先はディスプレイ204である。
 ディスプレイ204は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する。ディスプレイ204は、たとえば、TFT液晶ディスプレイ、プラズマディスプレイなどを採用することができる。
 OSD処理部203はGRAM202上に格納されたデータをZ値に基づいてディスプレイ204または共有メモリ201へ出力する機能を有する。OSD処理部203はモード設定レジスタとプロセスIDレジスタとを有している。モード設定レジスタはディスプレイ204へデータを出力するか、共有メモリ201へデータを出力するかを示すレジスタである。モード設定レジスタは1ビットのレジスタである。
 モード設定レジスタの値が0であると、OSD処理部203によるデータの出力先がディスプレイ204であることを示し、モード設定レジスタの値が1であると、OSD処理部203によるデータの出力先が共有メモリ201であることを示す。本実施の形態では、OSD処理部203がモード設定レジスタの値が0から1へと変化したのを検出することを共有メモリ201への書き込み指示を検出したこととする。
 プロセスIDレジスタはプロセスの識別情報が登録されるレジスタである。OSD処理部203が共有メモリ201への書き込み指示を検出すると、プロセスIDレジスタに設定されたプロセスの識別情報に対応するGRAM202上のデータをZ値の順で共有メモリ201へ出力する。
 共有メモリ201は、具体的には、たとえば、ROM(Read Only Memory)と、RAM(Random Access Memory)と、フラッシュROMなどを有している。たとえば、フラッシュROMがブートプログラムを記憶し、ROMがアプリケーションソフトウェアを記憶し、RAMがCPU#0~CPU#3のワークエリアとして使用される。共有メモリ201に記憶されているプログラムは、各CPUにロードされることで、コーディングされている処理を該各CPUに実行させることとなる。共有メモリ201は、たとえば、スレッド管理テーブル300と、実行順序情報群と、共通変数情報群と、を記憶している。
 スレッド管理テーブル300は、起動指示が受け付けられたプロセスごとにスレッドの割当先CPUを管理する情報である。
 図3は、スレッド管理テーブル300の一例を示す説明図である。スレッド管理テーブル300は、プロセスIDの項目301と、スレッドIDの項目302と、割当領域の項目303と、割当先CPUの項目304と、状態の項目305と、を有している。
 プロセスIDの項目301にはプロセスIDが保持される。スレッドIDの項目302にはプロセスごとに該プロセスに含まれるスレッドのスレッドIDが保持される。割当領域の項目303にはGRAM202上にスレッドごとに確保した記憶領域のアドレスが保持される。割当先CPUの項目304にはスレッドの割当先CPUの識別情報が保持される。状態の項目305にはスレッドの状態が保持される。スレッドの状態には未割当と、実行中と、終了と、の4つの状態がある。
 たとえば、OS210がプロセスの起動指示を受け付けると、スレッド管理テーブル300内のプロセスIDの項目301に起動指示を受け付けたプロセスの識別情報を登録する。そして、OS210がスレッド管理テーブル300内のスレッドIDの項目302に該プロセスに含まれるスレッドの識別情報を登録するとともに、状態の項目305に未割当を登録する。
 図2に戻って、実行順序情報群の各実行順序情報は、たとえば、各プロセス内の共通変数を含むスレッドの実行順序を示す情報である。本実施の形態では、GRAM202内のスレッドごとの共通変数を共有メモリ201へ格納する際の特定順序の一例として該実行順序を挙げている。
 図4は、実行順序情報の一例を示す説明図である。実行順序情報400はプロセス1内の共通変数を含むスレッドの実行順序を示す情報である。プロセス1ではスレッド1が1番目に実行され、スレッド2が2番目に実行され、スレッド3が3番目に実行され、スレッド4が4番目に実行されることとする。そして、OSはGRAM202のZ値として該実行順序を示す番号を登録することとする。
 図5は、共通変数情報の一例を示す説明図である。共通変数情報500はプロセス1内の共通変数に関する情報である。共通変数情報500はアドレス情報の項目501とサイズの項目502とを有している。アドレス情報の項目501には共有メモリ201上のアドレス情報が保持され、サイズの項目502はアドレス情報の項目501に保持されているアドレスに格納される変数のサイズが保持されている。ここで、プロセス1の共通変数は、共有メモリ201上のアドレスAと共有メモリ201上のアドレスBとに格納される変数である。
 共有メモリ201上のアドレスAに格納される変数のサイズは2バイトであり、共有メモリ201上のアドレスBに格納される変数のサイズは3バイトである。共有メモリ201上のアドレスAに格納される変数の2バイトの領域と、アドレスAが格納できるサイズの領域と、共有メモリ201上のアドレスBに格納される変数の3バイトの領域と、アドレスBが格納できるサイズの領域と、が共通変数を含むスレッドごとに設定される。
(情報処理装置200のブロック図)
 図6は、情報処理装置200を示すブロック図である。情報処理装置200は、設定部601と、第1の格納部602と、第2の格納部603と、記憶部604と、を有している。記憶部604は、GRAM202である。設定部601は、共有メモリ201に記憶された情報処理プログラムを有するOS210をCPU#0が実行することにより、該部の機能が実現される。第1の格納部602は、共有メモリ201に記憶された情報処理プログラムを有するOSを各CPUが実行することにより、該部の機能が実現される。第2の格納部603については、OSがOSD処理部203に書き込み指示を通知し、OSD処理部203が書き込み指示を受け付けると、第2の格納部603の機能を実現する。
 記憶部604は、出力先への出力順を規定する番号群と当該番号群の各番号に対応するデータ記憶領域とを有する。
 設定部601は、対象プロセス内の同一の共通変数の値についての書き込み要求を有するスレッド群の各スレッドの共通変数の値の格納先を、各スレッドの実行順を出力順を規定する番号に対応させたデータ記憶領域に設定する。
 第1の格納部602は、スレッド群のスレッドごとに、設定部601により設定されたデータ記憶領域に、当該データ記憶領域の出力順を規定する番号に対応する実行順のスレッドについての共通変数の値を格納する。
 第2の格納部603は、スレッド群のすべてのスレッドが終了すると、第1の格納部602によりスレッドごとにデータ記憶領域に格納された共通変数の各値を出力順に読み出し、読み出した共通変数の各値を出力順に特定の格納先へ上書きする。
 図7は、プロセス1の起動例を示す説明図である。まず、OS210が、(1)プロセス1の起動指示を検出すると、OS210が、(2)プロセス1のスレッドのうち、共通変数を扱うスレッドごとにGRAM202上に共通変数を格納させる記憶領域を共通変数情報500に基づいて設定する。本実施の形態では、スレッドごとに設定された記憶領域に記憶される共有メモリ201のアドレスAに格納される変数と、共有メモリ201のアドレスBに格納される変数と、アドレスAと、アドレスBと、は該記憶領域において格納される位置が決定されていることとする。
 そして、OS210が(3)スレッド管理テーブル300にプロセス1に関する情報を登録する。つぎに、OS210が(4)スレッド1をCPU#0に割り当て、OS210が(5)スレッド管理テーブル300にスレッド1の割当先CPUを登録する。
 図8は、対象プロセスの各スレッドの割当例を示す説明図である。図8では、スレッド1がCPU#0に割り当てられ、スレッド2がCPU#1に割り当てられ、スレッド3がCPU#2に割り当てられ、スレッド4がCPU#3に割り当てられている。スレッド管理テーブル300には各スレッドの割当先CPUが登録されている。
 図9は、スレッド1からの書き込み要求の検出例1を示す説明図である。OS210がスレッド1からの書き込み要求を検出すると、OS210が該書き込み要求の書き込み先アドレスであるアドレスAを共通変数情報500から検索する。OS210が共通変数情報500からアドレスAを探し当てると、OS210がスレッド管理テーブル300からスレッド1のGRAM202上の記憶領域のアドレスを取得する。OS210が取得したアドレスに基づいてGRAM202に対して書き込み要求を実行する。GRAM202内のスレッド1の記憶領域にはデータCとアドレスAが格納されている。
 図10は、スレッド1からの書き込み要求の検出例2を示す説明図である。OS210がスレッド1からの書き込み要求を検出すると、OS210が該書き込み要求の書き込み先アドレスであるアドレスBを共通変数情報500から検索する。OS210が共通変数情報500からアドレスBを探し当てると、OS210がスレッド管理テーブル300からスレッド1のGRAM202上の記憶領域のアドレスを取得する。OS210が取得したアドレスに基づいてスレッド1の記憶領域へデータDとアドレスBとを格納する。GRAM202のスレッド1の記憶領域にはデータCとデータDとアドレスAとアドレスBが格納されている。
 図11は、スレッド3からの書き込み要求の検出例を示す説明図である。OS212がスレッド3からの書き込み要求を検出すると、OS212が該書き込み要求の書き込み先アドレスであるアドレスAを共通変数情報500から検索する。OS212が共通変数情報500からアドレスAを探し当てると、OS212がスレッド管理テーブル300からスレッド3のGRAM202上の記憶領域のアドレスを取得する。OS212が取得したアドレスに基づいてスレッド3の記憶領域へデータEとアドレスAとを格納する。GRAM202のスレッド3の記憶領域にはデータEとアドレスAが格納されている。
 図12は、スレッド2からの書き込み要求の検出例1を示す説明図である。OS211がスレッド2からの書き込み要求を検出すると、OS211が該書き込み要求の書き込み先アドレスであるアドレスBを共通変数情報500から検索する。OS211が共通変数情報500からアドレスBを探し当てると、OS211がスレッド管理テーブル300からスレッド2のGRAM202上の記憶領域のアドレスを取得する。OS211が取得したアドレスに基づいてスレッド2の記憶領域へデータFとアドレスBとを格納する。GRAM202のスレッド2の記憶領域にはデータFとアドレスBが格納されている。
 図13は、スレッド2からの書き込み要求の検出例2を示す説明図である。OS211がスレッド2からの書き込み要求を検出すると、OS211が該書き込み要求の書き込み先アドレスであるアドレスAを共通変数情報500から検索する。OS211が共通変数情報500からアドレスAを探し当てると、OS211がスレッド管理テーブル300からスレッド2のGRAM202上の記憶領域のアドレスを取得する。OS211が取得したアドレスに基づいてGRAM202にスレッド2の記憶領域へデータGとアドレスAとを格納する。GRAM202のスレッド2の記憶領域にはデータGとアドレスAが格納されている。
 図14は、スレッド4からの書き込み要求の検出例を示す説明図である。OS213がスレッド4からの書き込み要求を検出すると、OS213が該書き込み要求の書き込み先アドレスであるアドレスBを共通変数情報500から検索する。OS213が共通変数情報500からアドレスBを探し当てると、OS213がスレッド管理テーブル300からスレッド4のGRAM202上の記憶領域のアドレスを取得する。OS213が取得したアドレスに基づいてスレッド2の記憶領域へデータHとアドレスBとを格納する。GRAM202のスレッド4の記憶領域にはデータHとアドレスBが格納されている。
 図15は、スレッド4の終了の検出例を示す説明図である。OS213がスレッド4の終了を検出すると、スレッド管理テーブル300内のプロセス1に関するスレッド4の状態の項目305を実行中から終了に更新する。
 図16は、すべてのスレッドの終了の検出例を示す説明図である。OS210がスレッド管理テーブル300の状態の項目305の更新に基づいてプロセス1のすべてのスレッドの終了を検出すると、OS210がOSD処理部203のプロセスIDレジスタを1に設定する。そして、OS210がモード設定レジスタを1に設定する。
 OSD処理部203はモード設定レジスタが1に変化したのを検出すると、OSD処理部203がプロセスIDレジスタに設定された値に基づいて、GRAM202から共有メモリ201へ出力するGRAM202上の記憶領域を、スレッド管理テーブル300を用いて特定する。OSD処理部203は特定したGRAM202上の記憶領域のうち、Z値が小さい値の領域順に格納されたアドレス情報に基づいて共有メモリ201へデータを格納する。
(情報処理手順)
 図17は、OS210による情報処理手順を示すフローチャートである。まず、OS210が、対象プロセスの起動指示または対象スレッドの割当指示を受け付けたか否かを判断する(ステップS1701)。OS210が、対象プロセスの起動指示および対象スレッドの割当指示を受け付けていないと判断した場合(ステップS1701:No)、ステップS1701へ戻る。
 ステップS1701において、OS210が、対象スレッドの割当指示を受け付けたと判断した場合(ステップS1701:対象スレッドの割当指示)、割当指示を受け付けた対象スレッドの割当先CPUを決定する(ステップS1702)。つぎに、OS210が、対象スレッドの割当先CPUをスレッド管理テーブル300に登録し(ステップS1703)、対象スレッドを割り当てて(ステップS1704)、ステップS1701へ戻る。
 ステップS1701において、OS210が、対象プロセスの起動指示を受け付けたと判断した場合(ステップS1701:対象プロセスの起動指示)、対象プロセスの実行順序情報400を取得する(ステップS1705)。OS210が、対象プロセスのスレッドごとにデータのサイズおよび該各アドレスのサイズ分の領域をGRAM202上に確保する(ステップS1706)。
 OS210が、スレッド管理テーブル300に対象プロセスを登録し(ステップS1707)、対象プロセスのマスタスレッドの割当先CPUを決定する(ステップS1708)。OS210が、マスタスレッドの割当先CPUをスレッド管理テーブル300に登録し(ステップS1709)、対象プロセスのマスタスレッドを割当先CPUに割り当て(ステップS1710)、ステップS1701へ戻る。
 図18は、各OSによる情報処理手順を示すフローチャートである。図18で示す情報処理手順は各OSが実行主体であるが、OS210を例に挙げて説明する。OS210が、実行中のスレッドからの書き込み要求、またはスレッドの終了を検出したか否かを判断する(ステップS1801)。OS210が、実行中のスレッドからの書き込み要求およびスレッドの終了を検出していないと判断した場合(ステップS1801:No)、ステップS1801へ戻る。
 OS210が、実行中のスレッドの終了を検出したと判断した場合(ステップS1801:スレッドの終了)、スレッド管理テーブル300内の終了したスレッドに関する状態を更新し(ステップS1802)、ステップS1801へ戻る。OS210が、実行中のスレッドからの書き込み要求を検出したと判断した場合(ステップS1801:書き込み要求)、スレッドが属するプロセスに関する共通変数情報を取得する(ステップS1803)。
 つぎに、OS210が、書き込み要求のアドレス情報を共通変数情報から検索し(ステップS1804)、書き込み要求のアドレス情報が共通変数情報にあるか否かを判断する(ステップS1805)。OS210が、書き込み要求のアドレス情報が共通変数情報にないと判断した場合(ステップS1805:No)、ステップS1801へ戻る。
 つぎに、OS210が、書き込み要求の格納先が共通変数情報にあると判断した場合(ステップS1805:Yes)、実行中のスレッドに対応するGRAM202上の領域へデータとアドレス情報とを書き込み(ステップS1806)、ステップS1801へ戻る。
 図19は、共通変数への書き込み処理を有するスレッドの終了時のOS210による制御処理手順を示すフローチャートである。OS210が、共通変数を用いるスレッドがすべて終了したプロセスを検出したか否かを判断する(ステップS1901)。OS210が、共通変数を用いるスレッドがすべて終了したプロセスを検出していないと判断した場合(ステップS1901:No)、一連の処理を終了する。
 一方、OS210が、共通変数を用いるスレッドがすべて終了したプロセスを検出したと判断した場合(ステップS1901:Yes)、GRAM202上の検出されたプロセスの領域内のデータを共有メモリ201へ書き込む書き込み指示をOSD処理部203に通知する(ステップS1902)。書き込み指示とは、具体的には、モード設定フラグを1に設定することを示している。
 そして、OS210が、OSD処理部203からの完了通知を受け付けたか否かを判断する(ステップS1903)。OS210が、OSD処理部203からの完了通知を受け付けていないと判断した場合(ステップS1903:No)、ステップS1903へ戻る。OS210が、OSD処理部203からの完了通知を受け付けたと判断した場合(ステップS1903:Yes)、GRAM202上の検出されたプロセスの領域を解放する(ステップS1904)。OS210が、検出されたプロセスに関する情報をスレッド管理テーブル300から削除し(ステップS1905)、一連の処理を終了する。
 図20は、OSD処理部203による出力処理手順を示すフローチャートである。OSD処理部203が、共有メモリへの書き込み指示を検出したか否かを判断する(ステップS2001)。ここで、書き込み指示を検出するとは、モード設定フラグが0から1に変化したことを示している。
 OSD処理部203が、共有メモリへの書き込み指示を検出していないと判断した場合(ステップS2001:No)、ステップS2001へ戻る。OSD処理部203が、共有メモリへの書き込み指示を検出したと判断した場合(ステップS2001:Yes)、プロセスIDレジスタに設定されたプロセスIDに基づいてスレッド管理テーブル300から各スレッドの配置領域を特定する(ステップS2002)。
 OSD処理部203は、GRAM202上の各スレッドの配置領域に格納されたZ値を特定し(ステップS2003)、Z値の小さい順にGRAM202から共有メモリへ出力し(ステップS2004)、書き込み完了をマスタOSへ通知し(ステップS2005)、ステップS2001へ戻る。また、OSD処理部203は書き込み完了をマスタOSへ通知するとともに、モード設定レジスタを0に設定する。
 以上説明したように、情報処理装置、情報処理プログラム、および情報処理方法によれば、対象プロセスで共通変数を有するスレッド群の各スレッドの共通変数の値を、GRAM上に出力順を規定する番号に各スレッドの実行順を対応させた領域に格納する。そして、該スレッド群のすべてのスレッドが終了後に、出力順を規定する番号順にGRAM上から共通変数の値を読み出し、該番号順に特定の格納先に上書きする。スレッド群の動作時の実行順序とプロセス定義されたスレッド群の実行順序とが異なっていても、最終的な共通変数の値が異なるのを防止することができ、スループットおよび実行効率を向上させることができる。
 また、各スレッドの共通変数の値をそれぞれ異なる領域として既存のハードウェアであるGRAMを用いることにより、機能を容易に実現することができる。
 200 情報処理装置
 202 GRAM
 601 設定部
 602 第1の格納部
 603 第2の格納部
 604 記憶部

Claims (4)

  1.  出力先への出力順を規定する番号群と当該番号群の各番号に対応するデータ記憶領域とを有する記憶手段と、
     対象プロセス内の同一の共通変数の値についての書き込み要求を有するスレッド群の各スレッドの前記共通変数の値の格納先を、前記出力順を規定する番号に前記各スレッドの実行順を対応させたデータ記憶領域に設定する設定手段と、
     前記スレッド群のスレッドごとに、前記設定手段により設定された前記データ記憶領域に、当該データ記憶領域の出力順を規定する番号に対応する実行順のスレッドについての前記共通変数の値を格納する第1の格納手段と、
     前記スレッド群のすべてのスレッドが終了すると、前記第1の格納手段により前記スレッドごとに前記データ記憶領域に格納された前記共通変数の各値を前記出力順に読み出し、読み出した前記共通変数の各値を前記出力順に特定の格納先へ上書きする第2の格納手段と、
     を備えることを特徴とする情報処理装置。
  2.  前記記憶手段は、前記出力先を表示装置とするGRAM(Graphic Randam Access Memory)であることを特徴とする請求項1に記載の情報処理装置。
  3.  出力先への出力順を規定する番号群と当該番号群の各番号に対応するデータ記憶領域とを有する記憶手段と前記データ記憶領域へのデータの格納を制御する制御回路にアクセス可能なコンピュータに、
     対象プロセス内の同一の共通変数の値についての書き込み要求を有するスレッド群の各スレッドの前記共通変数の値の格納先を、前記出力順を規定する番号に前記各スレッドの実行順を対応させたデータ記憶領域に設定する設定工程と、
     前記スレッド群のスレッドごとに、前記設定工程により設定された前記データ記憶領域に、当該データ記憶領域の出力順を規定する番号に対応する実行順のスレッドについての前記共通変数の値を格納する第1の格納工程と、
     前記スレッド群のすべてのスレッドが終了すると、前記第1の格納工程により前記スレッドごとに前記データ記憶領域に格納された前記共通変数の各値を前記出力順に読み出し、前記制御回路に、読み出した前記共通変数の各値を前記出力順に特定の格納先へ上書きさせる第2の格納工程と、
     を実行させることを特徴とする情報処理プログラム。
  4.  出力先への出力順を規定する番号群と当該番号群の各番号に対応するデータ記憶領域とを有する記憶手段と前記データ記憶領域へのデータの格納を制御する制御回路にアクセス可能なコンピュータが、
     対象プロセス内の同一の共通変数の値についての書き込み要求を有するスレッド群の各スレッドの前記共通変数の値の格納先を、前記出力順を規定する番号に前記各スレッドの実行順を対応させたデータ記憶領域に設定する設定工程と、
     前記スレッド群のスレッドごとに、前記設定工程により設定された前記データ記憶領域に、当該データ記憶領域の出力順を規定する番号に対応する実行順のスレッドについての前記共通変数の値を格納する第1の格納工程と、
     前記スレッド群のすべてのスレッドが終了すると、前記第1の格納工程により前記スレッドごとに前記データ記憶領域に格納された前記共通変数の各値を前記出力順に読み出し、前記制御回路に、読み出した前記共通変数の各値を前記出力順に特定の格納先へ上書きさせる第2の格納工程と、
     を実行することを特徴とする情報処理方法。
PCT/JP2010/067467 2010-10-05 2010-10-05 情報処理装置、情報処理プログラム、および情報処理方法 WO2012046300A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2010/067467 WO2012046300A1 (ja) 2010-10-05 2010-10-05 情報処理装置、情報処理プログラム、および情報処理方法
JP2012537509A JP5429395B2 (ja) 2010-10-05 2010-10-05 情報処理装置、情報処理プログラム、および情報処理方法
US13/856,775 US20130239113A1 (en) 2010-10-05 2013-04-04 Information processing apparatus, computer product, and information processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2010/067467 WO2012046300A1 (ja) 2010-10-05 2010-10-05 情報処理装置、情報処理プログラム、および情報処理方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/856,775 Continuation US20130239113A1 (en) 2010-10-05 2013-04-04 Information processing apparatus, computer product, and information processing method

Publications (1)

Publication Number Publication Date
WO2012046300A1 true WO2012046300A1 (ja) 2012-04-12

Family

ID=45927320

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/067467 WO2012046300A1 (ja) 2010-10-05 2010-10-05 情報処理装置、情報処理プログラム、および情報処理方法

Country Status (3)

Country Link
US (1) US20130239113A1 (ja)
JP (1) JP5429395B2 (ja)
WO (1) WO2012046300A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019003415A (ja) * 2017-06-15 2019-01-10 日本電気株式会社 情報処理装置、情報処理方法および情報処理プログラム

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11861403B2 (en) * 2020-10-15 2024-01-02 Nxp Usa, Inc. Method and system for accelerator thread management

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04219859A (ja) * 1990-03-12 1992-08-10 Hewlett Packard Co <Hp> 並列プロセッサに直列命令ストリームデータを分散するハードウェアディストリビュータ
EP1456750A1 (en) * 2001-12-12 2004-09-15 Telefonaktiebolaget LM Ericsson (publ) Collision handling apparatus and method
US7650331B1 (en) * 2004-06-18 2010-01-19 Google Inc. System and method for efficient large-scale data processing
JP4981041B2 (ja) * 2005-06-29 2012-07-18 インテル コーポレイション キャッシュする方法、装置及びシステム
US8190610B2 (en) * 2006-10-05 2012-05-29 Yahoo! Inc. MapReduce for distributed database processing

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
DAISUKE MITSUGI ET AL.: "A Consideration and Evaluation of Thread Partitioning Methods based on Program Structures", IEICE TECHNICAL REPORT, vol. 105, no. 487, 9 December 2005 (2005-12-09), pages 25 - 30 *
JENN-YUAN TSAI ET AL.: "The Superthreaded Architecture: Thread Pipelining with Run-Time Data Dependence Checking and Control Speculation", PROCEEDINGS OF THE 1996 CONFERENCE ON PARALLEL ARCHITECTURES AND COMPILATION TECHNIQUES, 20 October 1996 (1996-10-20), pages 35 - 46 *
TOSHIYA NAKA ET AL.: "Heiretsu Hai Bijon Graphics System", NATIONAL TECHNICAL REPORT, vol. 39, no. 1, 18 February 1993 (1993-02-18), pages 89 - 98 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019003415A (ja) * 2017-06-15 2019-01-10 日本電気株式会社 情報処理装置、情報処理方法および情報処理プログラム

Also Published As

Publication number Publication date
JP5429395B2 (ja) 2014-02-26
JPWO2012046300A1 (ja) 2014-02-24
US20130239113A1 (en) 2013-09-12

Similar Documents

Publication Publication Date Title
JP5650952B2 (ja) マルチコア/スレッドのワークグループ計算スケジューラ
EP0243892B1 (en) System for guaranteeing the logical integrity of data
TWI525540B (zh) 具有橫跨多個處理器之平行資料執行緒的映射處理邏輯
US20170004005A1 (en) Exception handling in microprocessor systems
CN105765541B (zh) 用于机动车的控制器
JP5773065B2 (ja) スケジューリングプログラム、マルチコアプロセッサシステム、およびスケジューリング方法
JP5673672B2 (ja) マルチコアプロセッサシステム、制御プログラム、および制御方法
US9588808B2 (en) Multi-core system performing packet processing with context switching
US9038080B2 (en) Method and system for heterogeneous filtering framework for shared memory data access hazard reports
CN104866443A (zh) 可中断存储独占
JP2016110460A (ja) プログラマブルコントローラ、プログラマブルコントローラの制御方法およびプログラム
KR20130080663A (ko) 멀티-쓰레딩을 사용하는 그래픽 처리를 위한 방법 및 장치
JP5429395B2 (ja) 情報処理装置、情報処理プログラム、および情報処理方法
KR102332523B1 (ko) 연산 처리 장치 및 방법
JP2007517322A (ja) プロセッサにおける同時物理スレッド数からの論理スレッド数のデカップリング
EP2551769A1 (en) Multi-core processor system, memory controller control method and memory controller control program
US7779230B2 (en) Data flow execution of methods in sequential programs
US20220413849A1 (en) Providing atomicity for complex operations using near-memory computing
CN102736949A (zh) 改善对非连贯设备要执行的任务的调度
US9384046B2 (en) Information processing apparatus, computer product, and information processing method for multi-thread process
US20070043869A1 (en) Job management system, job management method and job management program
CN108536644B (zh) 由装置端推核心入队列的装置
JP5376042B2 (ja) マルチコアプロセッサシステム、スレッド切り替え制御方法、およびスレッド切り替え制御プログラム
JP6207213B2 (ja) 情報処理装置
CN116302115A (zh) 指令执行方法、装置、图形处理器、电子设备及存储介质

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: 10858108

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2012537509

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: 10858108

Country of ref document: EP

Kind code of ref document: A1