JPH08339294A - Device and method for random number generation in multiprocessor system - Google Patents

Device and method for random number generation in multiprocessor system

Info

Publication number
JPH08339294A
JPH08339294A JP8083416A JP8341696A JPH08339294A JP H08339294 A JPH08339294 A JP H08339294A JP 8083416 A JP8083416 A JP 8083416A JP 8341696 A JP8341696 A JP 8341696A JP H08339294 A JPH08339294 A JP H08339294A
Authority
JP
Japan
Prior art keywords
random number
random
generated
processor
initial value
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP8083416A
Other languages
Japanese (ja)
Other versions
JP3123920B2 (en
Inventor
Ryoji Nemoto
亮治 根元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP08083416A priority Critical patent/JP3123920B2/en
Publication of JPH08339294A publication Critical patent/JPH08339294A/en
Application granted granted Critical
Publication of JP3123920B2 publication Critical patent/JP3123920B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)
  • Complex Calculations (AREA)

Abstract

PURPOSE: To easily generate random numbers by performing control so as to turn a random number group parallelly generated based on an initial value set beforehand by respective processors to a series of random number sequence. CONSTITUTION: The processors 31 to 34 generate the random numbers, a processor management means 1 sets the initial value and a parameter group for generating the random numbers in the respective processors 31 to 34, a processor management table 2 stores the parameter group for generating the random numbers for the respective processors and a generated random number sequence storage part 4 stores the random numbers generated by the respective processors 31 to 34. The processor management means 1 sets the initial value and the parameter group for generating the random numbers in the respective processors and stores them in the processor management table 2 and the respective processors 31 to 34 generate the random numbers by a multiplication joint method based on the initial value and the parameter group for generating the random numbers stored in the processor management table 2.

Description

【発明の詳細な説明】Detailed Description of the Invention

【発明の属する技術分野】本発明は、マルチプロセッサ
システムを構成する各プロセッサに乱数を発生させるマ
ルチプロセッサシステムにおける乱数発生装置および乱
数発生方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a random number generating device and a random number generating method in a multiprocessor system for generating random numbers in each processor constituting the multiprocessor system.

【0001】[0001]

【従来の技術】「Lehmer D.H., Proceedings of a Secon
d Symposium on Large-Scale DigitalCalculating Mach
inery, Ann. Comput. Lab. Harvard U. 26 (1951), pp.
141-146」には、乱数発生法の一つである合同法が記載さ
れている。
[Prior Art] "Lehmer DH, Proceedings of a Secon
d Symposium on Large-Scale DigitalCalculating Mach
inery, Ann. Comput. Lab. Harvard U. 26 (1951), pp.
141-146 ”describes a congruential method, which is one of the random number generation methods.

【0002】合同法は、合同式を用いた漸化式 Xi+1 = aXi+c (mod m) すなわち、ある数Xiにある定数aを乗算してある数c
を加算したものを、ある数mで除算した余りをXi+1
するという整数演算を行う漸化式によって、周期的に反
復する乱数の数列{Xi}を求める方法である。
The congruential method is a recurrence formula using the congruence formula: X i + 1 = aX i + c (mod m) That is, a certain number X i is multiplied by a certain constant a.
Is a method of obtaining a sequence {X i } of periodically repeated random numbers by a recurrence formula that performs an integer operation in which the remainder obtained by dividing by a certain number m is X i + 1 .

【0003】この漸化式においてc=0の場合、漸化式 Xi+1 = aXi (mod m) の右辺が乗算だけになるので、特に乗算合同法と呼び、
c≠0の場合には混合合同法と呼ぶ。
In the recurrence formula, when c = 0, the right side of the recurrence formula X i + 1 = aX i (mod m) is only multiplication, and therefore, it is called a multiplication congruential method.
When c ≠ 0, it is called the mixed congruential method.

【0004】特開昭60−136876号公報には、合
同法のアルゴリズムに基づいて、並列に乱数を発生させ
る方法が記載されている。
Japanese Unexamined Patent Publication No. 60-136876 discloses a method of generating random numbers in parallel based on the algorithm of the congruential method.

【0005】[0005]

【発明が解決しようとする課題】ところで汎用的に利用
されるマルチプロセッサシステムにおいて乱数を発生す
る場合には、該乱数を発生するプログラム、発生された
乱数を使用する汎用プログラム、さらにこれらとは全く
関係のない他のプログラム群がマルチプロセッサシステ
ムを構成するプロセッサ群を共有して利用する。このよ
うな場合、乱数を発生するプログラムが利用することが
できるプロセッサの数は動的に変化する。
By the way, in the case of generating a random number in a multiprocessor system which is generally used, a program for generating the random number, a general program for using the generated random number, Other unrelated programs share and use the processors that make up the multiprocessor system. In such a case, the number of processors that can be used by the program that generates random numbers changes dynamically.

【0006】特開昭60−136876号公報において
は、乱数発生開始後に乱数を発生させるプロセッサの数
を変更することについては、示唆されておらず、このよ
うな汎用的に利用されるマルチプロセッサシステムにお
いては、効率良く乱数を発生することができないという
問題点がある。
In JP-A-60-136876, there is no suggestion of changing the number of processors that generate random numbers after the start of random number generation, and such a multiprocessor system that is used for general purposes. However, there is a problem that random numbers cannot be efficiently generated.

【0007】本発明の目的は、マルチプロセッサシステ
ムにおいて、容易に乱数を発生することができるように
することにある。
An object of the present invention is to make it possible to easily generate random numbers in a multiprocessor system.

【0008】本発明の他の目的は、マルチプロセッサシ
ステムにおいて、乱数発生中に乱数を発生させるプロセ
ッサの数を変更することができるようにすることにあ
る。
Another object of the present invention is to make it possible to change the number of processors that generate random numbers during random number generation in a multiprocessor system.

【0009】本発明の他の目的は、マルチプロセッサシ
ステムにおいて実行されるさまざまなプログラム群と共
存して効率良く乱数を発生することができるようにする
ことにある。
Another object of the present invention is to enable efficient generation of random numbers in coexistence with various programs executed in a multiprocessor system.

【0010】[0010]

【課題を解決するための手段】本発明の第1のマルチプ
ロセッサシステムにおける乱数発生装置は、マルチプロ
セッサシステムに含まれる複数のプロセッサの各々に対
して乱数を発生するための初期値を予め設定し、各プロ
セッサが該初期値に基づいて並列に発生する乱数群が一
連の乱数列になるように制御するプロセッサ管理部から
構成されている。
A random number generator in a first multiprocessor system of the present invention presets an initial value for generating a random number for each of a plurality of processors included in the multiprocessor system. The processor management unit controls each processor so that a random number group generated in parallel based on the initial value becomes a series of random number sequences.

【0011】本発明の第2のマルチプロセッサシステム
における乱数発生装置は、第1のマルチプロセッサシス
テムにおける乱数発生装置において、前記プロセッサ管
理部は、さらに、前記複数のプロセッサによる乱数発生
中に、乱数を発生させるプロセッサを追加し、追加した
プロセッサを含めた各プロセッサに対して乱数を発生す
るための前記初期値を再設定し、該各プロセッサが再設
定された初期値に基づいて並列に発生する乱数群が一連
の乱数列になるように制御することを特徴とする。
The random number generator in the second multiprocessor system of the present invention is the random number generator in the first multiprocessor system, wherein the processor management unit further generates a random number during random number generation by the plurality of processors. A random number generated by adding a processor to be generated, resetting the initial value for generating a random number to each processor including the added processor, and generating parallel numbers based on the reset initial value by each processor. The feature is that the group is controlled to be a series of random numbers.

【0012】本発明の第3のマルチプロセッサシステム
における乱数発生装置は、マルチプロセッサシステムに
含まれる複数のプロセッサの各々に対して乱数を発生す
るための初期値と乱数発生数とを予め設定し、各プロセ
ッサが該初期値に基づいて並列に発生する該乱数発生数
の乱数群が一連の乱数列になるように制御するプロセッ
サ管理部から構成されている。
A random number generator in a third multiprocessor system of the present invention presets an initial value and a random number generation number for generating a random number for each of a plurality of processors included in the multiprocessor system, The processor management unit controls each processor so that a random number group of the random number generation numbers generated in parallel based on the initial value becomes a series of random number sequences.

【0013】本発明の第4のマルチプロセッサシステム
における乱数発生装置は、第3のマルチプロセッサシス
テムにおける乱数発生装置において、前記プロセッサ管
理部は、さらに、前記複数のプロセッサによる乱数発生
中に、乱数を発生させるプロセッサを追加し、追加した
プロセッサを含めた各プロセッサに対して乱数を発生す
るための前記初期値と前記乱数発生数とを再設定し、該
各プロセッサが再設定された初期値に基づいて並列に発
生する再設定された乱数発生数の乱数群が一連の乱数列
になるように制御することを特徴とする。
The random number generator in the fourth multiprocessor system of the present invention is the random number generator in the third multiprocessor system, wherein the processor management unit further generates a random number during the random number generation by the plurality of processors. A processor to be generated is added, and the initial value and the random number generation number for generating a random number are reset for each processor including the added processor, and each processor is based on the reset initial value. It is characterized in that the random number group of the reset random number numbers generated in parallel is controlled so as to be a series of random number sequences.

【0014】本発明の第5のマルチプロセッサシステム
における乱数発生装置は、マルチプロセッサシステムに
含まれる複数のプロセッサが発生する乱数を格納する発
生乱数列格納部と、前記複数のプロセッサの各々に対し
て乱数を発生するための初期値を設定し、該初期値が一
連の乱数列になるように前記発生乱数列格納部へ格納す
るとともに、前記マルチプロセッサシステム全体での乱
数の発生総数と乱数を発生するプロセッサの数とに基づ
いて各プロセッサの乱数発生数を設定し、さらに、各プ
ロセッサが前記初期値に基づいて並列に発生する該乱数
発生数の乱数群が一連の乱数列になるように制御し、発
生された乱数を前記発生乱数列格納部に格納されている
該初期値の後に格納するプロセッサ管理部とから構成さ
れている。
A random number generator in a fifth multiprocessor system according to the present invention includes: a generated random number sequence storage section for storing random numbers generated by a plurality of processors included in the multiprocessor system; An initial value for generating a random number is set, the initial value is stored in the generated random number sequence storage unit so as to be a series of random number sequences, and the total number of random numbers generated in the entire multiprocessor system and the random number are generated. The number of random numbers generated by each processor is set based on the number of processors to be generated, and further, the random number group of the number of random numbers generated by each processor in parallel based on the initial value is controlled to be a series of random numbers. Then, the processor management unit stores the generated random number after the initial value stored in the generated random number sequence storage unit.

【0015】本発明の第6のマルチプロセッサシステム
における乱数発生装置は、第5のマルチプロセッサシス
テムにおける乱数発生装置において、さらに前記プロセ
ッサ管理部は、前記複数のプロセッサによる乱数発生中
に、乱数を発生させるプロセッサを追加し、追加したプ
ロセッサを含めた各プロセッサに対して乱数を発生する
ための初期値を再設定し、該初期値が一連の乱数列にな
るように前記発生乱数列格納部へ格納するとともに、前
記マルチプロセッサシステム全体での乱数の発生総数と
乱数を発生するプロセッサの数とに基づいて各プロセッ
サの乱数発生数を設定し、さらに、各プロセッサが前記
再設定された初期値に基づいて並列に発生する再設定さ
れた乱数発生数の乱数群が一連の乱数列になるように制
御し、発生された乱数を前記発生乱数列格納部に格納さ
れている該初期値の後に格納することを特徴とする。
The random number generator in the sixth multiprocessor system of the present invention is the random number generator in the fifth multiprocessor system, and the processor management unit generates a random number during the random number generation by the plurality of processors. A processor to be added is added, an initial value for generating a random number is reset for each processor including the added processor, and the initial value is stored in the generated random number sequence storage unit so as to be a series of random number sequences. In addition, the random number generation number of each processor is set based on the total number of random numbers generated in the multiprocessor system and the number of processors generating random numbers, and each processor is based on the reset initial value. Generated by controlling the random number group of the reset random number generated in parallel so that it becomes a series of random number sequences. Characterized by storing the number after the initial value stored in the generated random number sequence storing unit.

【0016】本発明の第7のマルチプロセッサシステム
における乱数発生装置は、第5のマルチプロセッサシス
テムにおける乱数発生装置において、さらに前記プロセ
ッサ管理部は、前記複数のプロセッサによる乱数発生中
に乱数を発生させるプロセッサを追加する場合、既設の
プロセッサの内、最多の乱数を発生したプロセッサが発
生した乱数の数に任意の値を加算した数まで、既設のす
べてのプロセッサが乱数を発生するように制御するとと
もに、既設のすべてのプロセッサが発生済みの乱数の個
数に基づいて、各プロセッサが乱数を発生するための初
期値を再設定し、該初期値が一連の乱数列になるように
前記発生乱数列格納部へ格納し、前記マルチプロセッサ
システム全体での乱数の発生総数、発生済みの乱数の個
数、および乱数を発生するプロセッサの数とに基づいて
各プロセッサの乱数発生数を設定し、さらに、各プロセ
ッサが前記再設定された初期値と発生済みの乱数の数と
に基づいて並列に発生する再設定された乱数発生数の乱
数群が、一連の乱数列になるように制御し、発生された
乱数を前記発生乱数列格納部に格納されている該初期値
の後に格納することを特徴とする。
The random number generator in the seventh multiprocessor system of the present invention is the random number generator in the fifth multiprocessor system, and the processor management unit further generates a random number during random number generation by the plurality of processors. When adding a processor, control so that all existing processors generate random numbers up to the number of random numbers generated by the processor that generated the most random numbers among the existing processors and add any value. Storing the generated random number sequence so that each processor resets an initial value for generating random numbers based on the number of random numbers generated by all the existing processors and the initial value becomes a series of random number sequences The total number of random numbers generated in the entire multiprocessor system, the number of generated random numbers, and the random number The number of generated random numbers for each processor is set based on the number of generated processors, and further, each processor is reset in parallel based on the reset initial value and the number of generated random numbers. The random number group of the generated random numbers is controlled so as to be a series of random number sequences, and the generated random numbers are stored after the initial value stored in the generated random number sequence storage unit.

【0017】本発明の第8のマルチプロセッサシステム
における乱数発生装置は、マルチプロセッサシステムに
含まれる複数のプロセッサが発生する乱数を格納する発
生乱数列格納部と、前記複数のプロセッサの各々に対し
て、Xn = X*αnmodMただし、α、X、およびM
は整数で、0≦X<M、nはプロセッサの番号とする式
を利用して、乱数を発生するための初期値を設定し、該
初期値が一連の乱数列になるように前記発生乱数列格納
部へ格納するとともに、前記マルチプロセッサシステム
全体での乱数の発生総数と乱数を発生するプロセッサの
数とに基づいて、乱数発生数 = (発生総数/プロセッ
サ数)−1とする式を利用して、各プロセッサの乱数発
生数を設定し、さらに、各プロセッサが前記初期値に基
づいて並列に発生する該乱数発生数の乱数群が、Xn+rt
= αr*Xn+r(t-1) ただし、Xは整数、αは初期
値、rはプロセッサ数、nはプロセッサの番号、tは自
然数で、1≦t≦乱数発生数 とする式を利用して、一
連の乱数列になるように制御し、発生された乱数を前記
発生乱数列格納部に格納されている該初期値の後に格納
するプロセッサ管理部とから構成されている。
A random number generation device in an eighth multiprocessor system of the present invention includes a generated random number sequence storage section for storing random numbers generated by a plurality of processors included in the multiprocessor system, and each of the plurality of processors. , X n = X * α n mod M, where α, X, and M
Is an integer, 0 ≦ X <M, n is an processor number, and an initial value for generating a random number is set, and the generated random number is a series of random numbers. While storing in the column storage unit, based on the total number of random numbers generated in the entire multiprocessor system and the number of processors that generate random numbers, use the expression that the number of random numbers generated = (total number of generated / number of processors) -1 Then, the random number generation number of each processor is set, and the random number group of the random number generation numbers generated in parallel by each processor based on the initial value is X n + rt.
= Α r * X n + r (t-1) where X is an integer, α is an initial value, r is the number of processors, n is the number of the processor, t is a natural number, and 1≤t≤the number of random numbers generated Is used to control a series of random numbers so that the generated random numbers are stored after the initial value stored in the generated random number sequence storage.

【0018】本発明の第9のマルチプロセッサシステム
における乱数発生装置は、第8のマルチプロセッサシス
テムにおける乱数発生装置において、さらに前記プロセ
ッサ管理部は、前記複数のプロセッサによる乱数発生中
に乱数を発生させるプロセッサを追加する場合、既設の
プロセッサの内、最多の乱数を発生したプロセッサが発
生した乱数の数に任意の値を加算した数まで、既設のす
べてのプロセッサが乱数を発生するように制御するとと
もに、既設のすべてのプロセッサが発生済みの乱数の個
数に基づいて、Xq+n = Xq*αnmodM ただし、
α、X、およびMは整数で、0≦X<M、nはプロセッ
サの番号、qは既設のすべてのプロセッサが発生した乱
数の合計 とする式を利用して、各プロセッサが乱数を
発生するための初期値を再設定し、該初期値が一連の乱
数列になるように前記発生乱数列格納部へ格納し、前記
マルチプロセッサシステム全体での乱数の発生総数、発
生済みの乱数の個数、および乱数を発生するプロセッサ
の数とに基づいて、乱数発生数 = {(乱数の発生総数
−発生済みの乱数の個数)/プロセッサの数}−1とす
る式を利用して、各プロセッサの乱数発生数を設定し、
さらに、各プロセッサが前記再設定された初期値と発生
済みの乱数の数とに基づいて並列に発生する再設定され
た乱数発生数の乱数群が、Xn+q+rt = αr*X
n+q+r(t-1) ただし、Xは整数、αは初期値、rはプロ
セッサ数、nはプロセッサの番号、qは既設のすべての
プロセッサが発生した乱数の合計、tは自然数で、1≦
t≦乱数発生数 とする式を利用して、一連の乱数列に
なるように制御し、発生された乱数を前記発生乱数列格
納部に格納されている該初期値の後に格納することを特
徴とする。
The random number generating device in the ninth multiprocessor system of the present invention is the random number generating device in the eighth multiprocessor system, and the processor management unit generates a random number during random number generation by the plurality of processors. When adding a processor, control so that all existing processors generate random numbers up to the number of random numbers generated by the processor that generated the most random numbers among the existing processors and add any value. , X q + n = X q * α n modM where , based on the number of random numbers generated by all the existing processors,
α, X, and M are integers, 0 ≦ X <M, n is the processor number, and q is a sum of random numbers generated by all existing processors, and each processor generates a random number. Reset the initial value for, and stored in the generated random number sequence storage unit so that the initial value becomes a series of random number sequence, the total number of random numbers generated in the entire multiprocessor system, the number of generated random numbers, And the number of processors that generate random numbers, the number of generated random numbers = {(total number of generated random numbers-number of generated random numbers) / number of processors} -1 Set the number of occurrences,
Furthermore, a random number group of the reset random number generation numbers generated in parallel by each processor based on the reset initial value and the number of generated random numbers is X n + q + rt = α r * X
n + q + r (t-1) where X is an integer, α is an initial value, r is the number of processors, n is the processor number, q is the sum of random numbers generated by all existing processors, and t is a natural number. 1 ≦
It is controlled to be a series of random number sequences by using an equation of t ≦ number of generated random numbers, and the generated random numbers are stored after the initial value stored in the generated random number sequence storage unit. And

【0019】本発明の第1のマルチプロセッサシステム
における乱数発生装置は、マルチプロセッサシステムに
含まれる複数のプロセッサの各々に対して乱数を発生す
るための初期値を予め設定し、各プロセッサが該初期値
に基づいて並列に発生する乱数群が一連の乱数列になる
ように制御することを特徴とする。
The random number generator in the first multiprocessor system of the present invention presets an initial value for generating a random number for each of a plurality of processors included in the multiprocessor system, and each processor sets the initial value. The random number group generated in parallel based on the value is controlled to be a series of random number sequences.

【0020】本発明の第2のマルチプロセッサシステム
における乱数発生方法は、第1のマルチプロセッサシス
テムにおける乱数発生方法において、さらに、前記複数
のプロセッサによる乱数発生中に、乱数を発生させるプ
ロセッサを追加し、追加したプロセッサを含めた各プロ
セッサに対して乱数を発生するための前記初期値を再設
定し、該各プロセッサが再設定された初期値に基づいて
並列に発生する乱数群が一連の乱数列になるように制御
することを特徴とする。
A second method for generating random numbers in a multiprocessor system according to the present invention is the method for generating random numbers in the first multiprocessor system, further comprising a processor for generating random numbers during random number generation by the plurality of processors. , The initial value for generating a random number for each processor including the added processor is reset, and a random number group generated in parallel based on the reset initial value for each processor is a series of random number sequences. It is characterized by controlling so that

【0021】本発明の第3のマルチプロセッサシステム
における乱数発生方法は、マルチプロセッサシステムに
含まれる複数のプロセッサの各々に対して乱数を発生す
るための初期値と乱数発生数とを予め設定し、各プロセ
ッサが該初期値に基づいて並列に発生する該乱数発生数
の乱数群が一連の乱数列になるように制御することを特
徴とする。
A third method for generating random numbers in a multiprocessor system according to the present invention is such that an initial value for generating a random number and a random number generation number are preset for each of a plurality of processors included in the multiprocessor system. It is characterized in that each processor controls so that a random number group of the number of generated random numbers generated in parallel based on the initial value becomes a series of random number sequences.

【0022】本発明の第4のマルチプロセッサシステム
における乱数発生方法は、第3のマルチプロセッサシス
テムにおける乱数発生方法において、さらに、前記複数
のプロセッサによる乱数発生中に、乱数を発生させるプ
ロセッサを追加し、追加したプロセッサを含めた各プロ
セッサに対して乱数を発生するための前記初期値と前記
乱数発生数とを再設定し、該各プロセッサが再設定され
た初期値に基づいて並列に発生する再設定された乱数発
生数の乱数群が一連の乱数列になるように制御すること
を特徴とする。
The random number generating method in the fourth multiprocessor system of the present invention is the same as the random number generating method in the third multiprocessor system, and further includes a processor for generating random numbers during the random number generation by the plurality of processors. , Resetting the initial value and the random number generation number for generating a random number to each processor including the added processor, and resetting each processor in parallel based on the reset initial value. It is characterized in that the random number group of the set random number is controlled so as to be a series of random number sequences.

【0023】本発明の第5のマルチプロセッサシステム
における乱数発生方法は、マルチプロセッサシステムに
含まれる複数のプロセッサの各々に対して乱数を発生す
るための初期値を設定し、該初期値が一連の乱数列にな
るように記憶装置へ格納するとともに、前記マルチプロ
セッサシステム全体での乱数の発生総数と乱数を発生す
るプロセッサの数とに基づいて各プロセッサの乱数発生
数を設定し、さらに、各プロセッサが前記初期値に基づ
いて並列に発生する該乱数発生数の乱数群が一連の乱数
列になるように制御し、発生された乱数を前記記憶装置
に格納されている該初期値の後に格納することを特徴と
する。
According to a fifth method for generating a random number in a multiprocessor system of the present invention, an initial value for generating a random number is set for each of a plurality of processors included in the multiprocessor system, and the initial value is a series of values. The random number sequence is stored in the storage device, and the random number generation number of each processor is set based on the total number of random numbers generated in the multiprocessor system and the number of processors generating the random number. Controls so that a random number group of the random number generation numbers generated in parallel based on the initial value becomes a series of random number sequences, and stores the generated random number after the initial value stored in the storage device. It is characterized by

【0024】本発明の第6のマルチプロセッサシステム
における乱数発生方法は、第5のマルチプロセッサシス
テムにおける乱数発生方法において、さらに、前記複数
のプロセッサによる乱数発生中に、乱数を発生させるプ
ロセッサを追加し、追加したプロセッサを含めた各プロ
セッサに対して乱数を発生するための初期値を再設定
し、該初期値が一連の乱数列になるように前記記憶装置
へ格納するとともに、前記マルチプロセッサシステム全
体での乱数の発生総数と乱数を発生するプロセッサの数
とに基づいて各プロセッサの乱数発生数を設定し、さら
に、各プロセッサが前記再設定された初期値に基づいて
並列に発生する再設定された乱数発生数の乱数群が一連
の乱数列になるように制御し、発生された乱数を前記記
憶装置に格納されている該初期値の後に格納することを
特徴とする。
A random number generation method in a sixth multiprocessor system of the present invention is the same as the random number generation method in the fifth multiprocessor system, further comprising a processor for generating random numbers during the random number generation by the plurality of processors. , Resetting an initial value for generating a random number to each processor including the added processor, storing the initial value in the storage device so that the initial value becomes a series of random number sequences, and the entire multiprocessor system The number of random numbers generated by each processor is set based on the total number of random numbers generated in and the number of processors generating random numbers, and further, each processor is reset to occur in parallel based on the reset initial value. The generated random numbers are controlled to be a series of random numbers, and the generated random numbers are stored in the storage device. And storing, after that initial value.

【0025】本発明の第7のマルチプロセッサシステム
における乱数発生方法は、第5のマルチプロセッサシス
テムにおける乱数発生方法において、さらに、前記複数
のプロセッサによる乱数発生中に乱数を発生させるプロ
セッサを追加する場合、既設のプロセッサの内、最多の
乱数を発生したプロセッサが発生した乱数の数に任意の
値を加算した数まで、既設のすべてのプロセッサが乱数
を発生するように制御するとともに、既設のすべてのプ
ロセッサが発生済みの乱数の個数に基づいて、各プロセ
ッサが乱数を発生するための初期値を再設定し、該初期
値が一連の乱数列になるように前記記憶装置へ格納し、
前記マルチプロセッサシステム全体での乱数の発生総
数、発生済みの乱数の個数、および乱数を発生するプロ
セッサの数とに基づいて各プロセッサの乱数発生数を設
定し、さらに、各プロセッサが前記再設定された初期値
と発生済みの乱数の数とに基づいて並列に発生する再設
定された乱数発生数の乱数群が、一連の乱数列になるよ
うに制御し、発生された乱数を前記記憶装置に格納され
ている該初期値の後に格納することを特徴とする。
The random number generating method in the seventh multiprocessor system of the present invention is the same as the random number generating method in the fifth multiprocessor system, wherein a processor for generating random numbers during the random number generation by the plurality of processors is added. , Controls all existing processors to generate random numbers up to the number obtained by adding an arbitrary value to the number of random numbers generated by the processor that generated the most random numbers, and Based on the number of random numbers generated by the processor, each processor resets an initial value for generating a random number, and the initial value is stored in the storage device so as to be a series of random number sequences,
The number of random numbers generated by each processor is set based on the total number of random numbers generated in the entire multiprocessor system, the number of generated random numbers, and the number of processors that generate random numbers, and each processor is reconfigured. Based on the initial value and the number of generated random numbers, the random number group of the reset random number generated in parallel is controlled so as to be a series of random number sequences, and the generated random numbers are stored in the storage device. It is characterized in that it is stored after the stored initial value.

【0026】本発明の第8のマルチプロセッサシステム
における乱数発生方法は、マルチプロセッサシステムに
含まれる複数のプロセッサの各々に対して、Xn = X
*αnmodM ただし、α、X、およびMは整数で、
0≦X<M、nはプロセッサの番号とする式を利用し
て、乱数を発生するための初期値を設定し、該初期値が
一連の乱数列になるように記憶装置へ格納するととも
に、前記マルチプロセッサシステム全体での乱数の発生
総数と乱数を発生するプロセッサの数とに基づいて、乱
数発生数 = (発生総数/プロセッサ数)−1とする式
を利用して、各プロセッサの乱数発生数を設定し、さら
に、各プロセッサが前記初期値に基づいて並列に発生す
る該乱数発生数の乱数群が、Xn+rt = αr*X
n+r(t-1) ただし、Xは整数、αは初期値、rはプロセ
ッサ数、nはプロセッサの番号、tは自然数で、1≦t
≦乱数発生数 とする式を利用して、一連の乱数列にな
るように制御し、発生された乱数を前記記憶装置に格納
されている該初期値の後に格納することを特徴とする。
The random number generating method in the eighth multiprocessor system of the present invention is X n = X for each of the plurality of processors included in the multiprocessor system.
* Α n modM where α, X, and M are integers,
0 ≦ X <M, where n is an processor number, an initial value for generating a random number is set, and the initial value is stored in a storage device so that the initial value becomes a series of random number sequences. Based on the total number of random numbers generated in the entire multiprocessor system and the number of processors generating random numbers, the random number generation of each processor is performed using the formula: random number generation number = (total number of generation / number of processors) -1. And the number of random numbers of the random number generated by each processor in parallel based on the initial value is X n + rt = α r * X
n + r (t-1) where X is an integer, α is an initial value, r is the number of processors, n is the processor number, t is a natural number, and 1 ≦ t
It is characterized in that the equation is used to control the number of random numbers to be a series of random numbers, and the generated random numbers are stored after the initial value stored in the storage device.

【0027】本発明の第9のマルチプロセッサシステム
における乱数発生方法は、第8のマルチプロセッサシス
テムにおける乱数発生方法において、さらに、前記複数
のプロセッサによる乱数発生中に乱数を発生させるプロ
セッサを追加する場合、既設のプロセッサの内、最多の
乱数を発生したプロセッサが発生した乱数の数に任意の
値を加算した数まで、既設のすべてのプロセッサが乱数
を発生するように制御するとともに、既設のすべてのプ
ロセッサが発生済みの乱数の個数に基づいて、Xq+n
q*αnmodM ただし、α、X、およびMは整数
で、0≦X<M、nはプロセッサの番号、qは既設のす
べてのプロセッサが発生した乱数の合計とする式を利用
して、各プロセッサが乱数を発生するための初期値を再
設定し、該初期値が一連の乱数列になるように前記記憶
装置へ格納し、前記マルチプロセッサシステム全体での
乱数の発生総数、発生済みの乱数の個数、および乱数を
発生するプロセッサの数とに基づいて、乱数発生数 =
{(乱数の発生総数−発生済みの乱数の個数)/プロセ
ッサの数}−1 とする式を利用して、各プロセッサの
乱数発生数を設定し、さらに、各プロセッサが前記再設
定された初期値と発生済みの乱数の数とに基づいて並列
に発生する再設定された乱数発生数の乱数群が、X
n+q+rt = αr*Xn+q+r(t-1) ただし、Xは整数、α
は初期値、rはプロセッサ数、nはプロセッサの番号、
qは既設のすべてのプロセッサが発生した乱数の合計、
tは自然数で、1≦t≦乱数発生数 とする式を利用し
て、一連の乱数列になるように制御し、発生された乱数
を前記記憶装置に格納されている該初期値の後に格納す
ることを特徴とする。
The random number generating method in the ninth multiprocessor system of the present invention is the same as the random number generating method in the eighth multiprocessor system, wherein a processor for generating random numbers during the random number generation by the plurality of processors is added. , Controls all existing processors to generate random numbers up to the number obtained by adding an arbitrary value to the number of random numbers generated by the processor that generated the most random numbers, and Based on the number of random numbers generated by the processor, X q + n =
X q * α n mod M where α, X, and M are integers, 0 ≦ X <M, n is the processor number, and q is the sum of random numbers generated by all existing processors. , Each processor resets an initial value for generating a random number, stores the initial value in the storage device so that the initial value becomes a series of random number sequences, and generates the total number of random numbers in the entire multiprocessor system. Based on the number of random numbers in and the number of processors that generate random numbers,
{(Total number of generated random numbers−number of generated random numbers) / number of processors} −1 is used to set the number of generated random numbers of each processor, and further, each processor is reset to the initial value. A random number group of the reset random number generation numbers that are generated in parallel based on the value and the number of generated random numbers is X.
n + q + rt = α r * X n + q + r (t-1) where X is an integer, α
Is the initial value, r is the number of processors, n is the processor number,
q is the sum of random numbers generated by all existing processors,
t is a natural number, and is controlled so as to be a series of random number sequences by using an expression of 1 ≦ t ≦ random number generation number, and the generated random number is stored after the initial value stored in the storage device. It is characterized by doing.

【0028】[0028]

【発明の実施の形態】以下、本発明の実施例について、
図を参照しながら詳細に説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below.
A detailed description will be given with reference to the drawings.

【0029】図1を参照すると、本発明の第1の実施例
であるマルチプロセッサシステムにおける乱数発生装置
は、乱数を発生するプロセッサ31、32、33、およ
び34と、各プロセッサにおいて乱数を発生するための
初期値およびパラメータ群を設定するプロセッサ管理部
1と、乱数を発生するためのパラメータ群を各プロセッ
サ毎に格納するプロセッサ管理テーブル2と、各プロセ
ッサによって発生された乱数を格納する発生乱数列格納
部4とから構成されている。
Referring to FIG. 1, the random number generator in the multiprocessor system according to the first embodiment of the present invention generates processors 31, 32, 33 and 34 for generating random numbers, and each processor generates random numbers. Initial value and a parameter group for setting a processor group, a processor management table 2 that stores a parameter group for generating a random number for each processor, and a generated random number sequence that stores the random number generated by each processor It is composed of a storage unit 4.

【0030】以下に、本発明の第1の実施例であるマル
チプロセッサシステムにおける乱数発生装置について、
図1〜図3、および図7〜図11を参照して詳細に説明
する。
The random number generator in the multiprocessor system according to the first embodiment of the present invention will be described below.
This will be described in detail with reference to FIGS. 1 to 3 and 7 to 11.

【0031】本実施例においては、各プロセッサが、初
期値を基にして400個ずつの乱数を発生させることと
する。
In the present embodiment, each processor is assumed to generate 400 random numbers based on the initial value.

【0032】まず、プロセッサ管理部1は、各プロセッ
サ31〜34の初期値を次式に基づいて設定する。
First, the processor management unit 1 sets initial values of the processors 31 to 34 based on the following equation.

【0033】Xn = X*αnmodM (ただし、α、X、およびMは整数で、0≦X<M、n
はプロセッサの番号とする。) したがって、 プロセッサ31は、X1 = X*αmodM プロセッサ32は、X2 = X*α2modM プロセッサ33は、X3 = X*α3modM プロセッサ34は、X4 = X*α4modM が初期値となる。
X n = X * α n mod M (where α, X, and M are integers, and 0 ≦ X <M, n
Is the processor number. ) Therefore, the processor 31 has X 1 = X * α modM processor 32, X 2 = X * α 2 modM processor 33, X 3 = X * α 3 modM processor 34 has X 4 = X * α 4 modM It will be the initial value.

【0034】プロセッサ管理部1は、図2に示すよう
に、これらの初期値を発生乱数列格納部4に格納する。
The processor management unit 1 stores these initial values in the generated random number sequence storage unit 4, as shown in FIG.

【0035】プロセッサ管理部1は、図7に示すよう
に、これらの初期値をプロセッサ管理テーブル2にも格
納する。
As shown in FIG. 7, the processor management unit 1 also stores these initial values in the processor management table 2.

【0036】次に、プロセッサ管理部1は、各プロセッ
サの乱数発生数を次式に基づいて設定する。
Next, the processor management unit 1 sets the random number generation number of each processor based on the following equation.

【0037】 乱数発生数 = (発生総数/プロセッサ数)−1 したがって、 乱数発生数 = (400/4)−1 = 99 プロセッサ管理部1は、図8に示すように、この乱数発
生数をプロセッサ管理テーブル2の乱数発生数の欄に格
納する。該計算において、除算に剰余が出た場合には、
プロセッサ番号の小さい順に、乱数発生数に該剰余から
1ずつ加える。
Number of Random Numbers Generated = (Total Number of Generated / Number of Processors) −1 Therefore, Number of Generated Random Numbers = (400/4) −1 = 99 The processor management unit 1 calculates the number of generated random numbers as shown in FIG. It is stored in the random number generation column of the management table 2. In the calculation, if there is a remainder in the division,
From the remainder, one is added to the random number generation number in ascending order of processor number.

【0038】次に、プロセッサ管理部1は、各プロセッ
サが乱数生成に使用する乗算合同法の乗数を次式によっ
て決定し、図9に示すように、プロセッサ管理テーブル
2の乗数の欄に格納する。
Next, the processor management unit 1 determines the multiplier of the congruential multiplication method used by each processor for random number generation by the following equation, and stores it in the multiplier field of the processor management table 2 as shown in FIG. .

【0039】乗数 = α**r (= αr) (αは初期値の値、**はべき算、rはプロセッサ数で
ある。) したがって、本実施例では、乗数 = α4 である。
[0039] Multiplier = α ** r (= α r ) (α is a value of the initial value, ** is exponentiation, r is a number of processors.) Thus, in this embodiment, a multiplier = alpha 4.

【0040】プロセッサ管理部1は、各プロセッサが発
生する乱数を直列に発生乱数列格納部4へ格納する際の
結果格納位置間隔を、図10に示すように、プロセッサ
管理テーブル2の結果格納位置間隔の欄に格納する。本
実施例では、プロセッサ数が4であることにより、結果
格納位置間隔も4となる。
The processor management unit 1 stores the result storage position intervals when storing the random numbers generated by each processor in the generated random number sequence storage unit 4 in series, as shown in FIG. Store in the space column. In this embodiment, since the number of processors is 4, the result storage position interval is also 4.

【0041】プロセッサ管理部1は、プロセッサ管理テ
ーブル2内の各プロセッサの発生数カウンタに0を格納
する。
The processor management unit 1 stores 0 in the occurrence number counter of each processor in the processor management table 2.

【0042】次に、プロセッサ管理部1は、各プロセッ
サに対して乱数発生開始を指示する。
Next, the processor management unit 1 instructs each processor to start random number generation.

【0043】各プロセッサは、プロセッサ管理部1から
乱数の発生開始を指示されると、図11の状態のプロセ
ッサ管理テーブル2から、自プロセッサのプロセッサ番
号に対応する乗数、初期値、および乱数発生数の数値を
得て、次式の計算を行って乱数を発生する。さらに、各
プロセッサは、発生した乱数を図3に示すように発生乱
数列格納部4に結果格納間隔にしたがって格納するとと
もに、プロセッサ管理テーブル2内の自プロセッサのプ
ロセッサ番号に対応する発生数カウンタの値に1加算す
る。
When each processor is instructed by the processor management unit 1 to start the generation of random numbers, the processor management table 2 in the state shown in FIG. 11 indicates that the multiplier corresponding to the processor number of its own processor, the initial value, and the number of generated random numbers. The numerical value of is obtained and the following formula is calculated to generate a random number. Further, each processor stores the generated random number in the generated random number sequence storage unit 4 according to the result storage interval as shown in FIG. 3, and stores the generated random number in the processor management table 2 corresponding to the processor number of its own processor. Add 1 to the value.

【0044】Xn+rt = αr*Xn+r(t-1) (ただし、α、Xは整数で、nはプロセッサの番号とす
る。) この式で、r=4、tは1から始まる自然数とすると、
プロセッサ31は、乱数X1+4=α4*X1、X1+4*2=α
4*X1+4、…、プロセッサ32は、乱数X2+4=α4*X
2、X2+4*2=α4*X2+4、…、プロセッサ33は、乱数
3+4=α4*X3、X3+4*2=α4*X3+4、…、プロセッ
サ34は、乱数X4+4=α4*X4、X4+4*2=α4
4+4、…、を発生する。
X n + rt = α r * X n + r (t-1) (where α and X are integers and n is the processor number) In this equation, r = 4 and t is 1 If it is a natural number starting from,
The processor 31 uses random numbers X 1 + 4 = α 4 * X 1 , X 1 + 4 * 2 = α
4 * X 1 + 4 , ..., The processor 32 uses the random number X 2 + 4 = α 4 * X
2 , X 2 + 4 * 2 = α 4 * X 2 + 4 , ..., The processor 33 uses random numbers X 3 + 4 = α 4 * X 3 , X 3 + 4 * 2 = α 4 * X 3 + 4 , ..., the processor 34 generates random numbers X 4 + 4 = α 4 * X 4 , X 4 + 4 * 2 = α 4 *
X 4 + 4 , ... Is generated.

【0045】各プロセッサは、この乱数の計算をプロセ
ッサ管理テーブル2内の乱数発生数が示す回数だけ実行
する。
Each processor executes this random number calculation the number of times indicated by the number of random numbers generated in the processor management table 2.

【0046】以上により、本発明の第1の実施例である
マルチプロセッサシステムにおける乱数発生装置の処理
が完了する。
With the above, the processing of the random number generator in the multiprocessor system according to the first embodiment of the present invention is completed.

【0047】本発明の第1の実施例であるマルチプロセ
ッサシステムにおける乱数発生装置の特徴は、プロセッ
サ管理部1が各プロセッサにおける乱数発生のための初
期値およびパラメータ群を設定してプロセッサ管理テー
ブル2に格納し、各プロセッサが該プロセッサ管理テー
ブル2に格納された乱数発生のための初期値およびパラ
メータ群に基づいて、乗算合同法により乱数を発生する
ようにしたことにある。
The feature of the random number generator in the multiprocessor system according to the first embodiment of the present invention is that the processor management unit 1 sets initial values and parameter groups for random number generation in each processor and sets the processor management table 2. And each processor generates random numbers by the multiplication congruential method based on the initial value and the parameter group for random number generation stored in the processor management table 2.

【0048】本発明の第1の実施例であるマルチプロセ
ッサシステムにおける乱数発生装置は、このような特徴
を備えたことにより、マルチプロセッサシステムにおい
て、効率良く容易に乱数を発生することができる効果を
有している。
The random number generating device in the multiprocessor system according to the first embodiment of the present invention has such an advantage that the random number generating device in the multiprocessor system can efficiently and easily generate random numbers. Have

【0049】図4を参照すると、本発明の第2の実施例
であるマルチプロセッサシステムにおける乱数発生装置
は、第1の実施例であるマルチプロセッサシステムにお
ける乱数発生装置の構成に加えて、乱数を発生するプロ
セッサ35が追加されている。
Referring to FIG. 4, the random number generator in the multiprocessor system according to the second embodiment of the present invention has a random number generator in addition to the configuration of the random number generator in the multiprocessor system according to the first embodiment. A generating processor 35 is added.

【0050】以下に、本発明の第2の実施例であるマル
チプロセッサシステムにおける乱数発生装置について、
図4〜図6、および図12〜図18を参照して詳細に説
明する。
The random number generator in the multiprocessor system according to the second embodiment of the present invention will be described below.
This will be described in detail with reference to FIGS. 4 to 6 and 12 to 18.

【0051】本実施例においては、プロセッサ管理テー
ブル2の内容が図12に示す状態である環境において、
プロセッサ35を追加する場合について説明する。
In this embodiment, in the environment where the contents of the processor management table 2 are in the state shown in FIG.
A case where the processor 35 is added will be described.

【0052】プロセッサ管理部1は、プロセッサ管理テ
ーブル2を参照し、発生数カウンタの値が最も大きい、
すなわちその時点で乱数を最も多く発生しているプロセ
ッサの番号と該プロセッサの発生数カウンタとを認識す
る。本実施例においては、プロセッサ番号“3”と発生
数カウンタの値“31”とが認識される。
The processor management unit 1 refers to the processor management table 2, and the value of the occurrence counter is the largest,
That is, the number of the processor that is generating the most random numbers at that time and the generation number counter of the processor are recognized. In the present embodiment, the processor number "3" and the occurrence number counter value "31" are recognized.

【0053】プロセッサ管理部1は、認識した発生数カ
ウンタの値に予め設定した遅延数を加えた値(以下、発
生一時停止数とする)を求め、既存のプロセッサ31〜
34に対して、発生一時停止数に発生数カウンタの値が
達した時点で乱数の発生処理を停止させる。この遅延数
は、プロセッサ管理部1が乱数発生の中断指示を出して
から実際にプロセッサが乱数発生を中断するまでに発生
する乱数の個数より大きい最小の整数値である。本実施
例においては、該遅延数は“1”であり、発生一時停止
数は“32”となる。
The processor management unit 1 obtains a value (hereinafter, referred to as an occurrence suspension number) by adding a preset delay number to the value of the recognized occurrence number counter, and determines the existing processors 31 to 31.
34, the random number generation process is stopped when the value of the generation number counter reaches the generation suspension number. This delay number is a minimum integer value that is larger than the number of random numbers generated from the processor management unit 1 issuing an instruction to interrupt the random number generation until the processor actually interrupts the random number generation. In the present embodiment, the delay number is "1" and the occurrence suspension number is "32".

【0054】次に、プロセッサ管理部1は、プロセッサ
管理テーブル2のすべてのプロセッサの発生カウンタの
値が“32”になるまで、該プロセッサ管理テーブル2
を監視する。プロセッサ管理部1は、各プロセッサの発
生数カウンタが“32”になると、該プロセッサに乱数
発生処理を停止させる。この時のプロセッサ管理テーブ
ル2の状態を図13に示す。
Next, the processor management unit 1 keeps the processor management table 2 until the occurrence counter values of all the processors in the processor management table 2 become "32".
To monitor. When the generation number counter of each processor reaches “32”, the processor management unit 1 causes the processor to stop the random number generation process. The state of the processor management table 2 at this time is shown in FIG.

【0055】プロセッサ管理部1は、この時点でプロセ
ッサ管理テーブル2の内容を変更する。すなわち、この
時点の乱数発生合計数は初期値を加えて、 4+(32×4)=132 であり、プロセッサ数が“5”になってからの各プロセ
ッサの初期値を次式に基づいて設定する。
The processor management unit 1 changes the contents of the processor management table 2 at this point. That is, the total number of random number generations at this time is 4+ (32 × 4) = 132 by adding the initial value, and the initial value of each processor after the number of processors becomes “5” is set based on the following formula. To do.

【0056】X132+n = X132*αnmodM (ただし、α、X、およびMは整数で、0≦X<M、n
はプロセッサの番号とする。) プロセッサ管理部1は、設定した初期値を図5に示すよ
うに発生乱数列格納部4に格納する。
X 132 + n = X 132 * α n mod M (where α, X, and M are integers, and 0 ≦ X <M, n
Is the processor number. ) The processor management unit 1 stores the set initial value in the generated random number sequence storage unit 4 as shown in FIG.

【0057】プロセッサ管理部1は、図14に示すよう
に、これらの初期値をプロセッサ管理テーブル2にも格
納する。
The processor management unit 1 also stores these initial values in the processor management table 2 as shown in FIG.

【0058】次に、プロセッサ管理部1は、乱数の発生
総数400と中断時の合計発生数132とに基づいて、
各プロセッサのこれからの乱数発生数を次式に基づいて
決定する。
Next, the processor management unit 1 determines, based on the total number 400 of random numbers generated and the total number 132 of times of interruption,
The number of random numbers generated from each processor is determined based on the following equation.

【0059】乱数発生数 = {(発生総数−発生済数)
/プロセッサ数}−1 したがって、 乱数発生数 = {(400−132)/5}−1 = 5
2 該計算において、除算に剰余が出た場合には、プロセッ
サ番号の小さい順に、乱数発生数に該剰余から1ずつ加
える。
Number of random numbers generated = {(total number generated-number generated)
/ Number of processors} -1 Therefore, the number of generated random numbers = {(400-132) / 5} -1 = 5
2 In the calculation, if there is a remainder in the division, one is added to the random number generation number from the remainder in ascending order of the processor number.

【0060】プロセッサ管理部1は、図15に示すよう
に、この乱数発生数をプロセッサ管理テーブル2の乱数
発生数の欄に格納する。
As shown in FIG. 15, the processor management unit 1 stores this random number generation number in the random number generation number column of the processor management table 2.

【0061】次に、プロセッサ管理部1は、各プロセッ
サが乱数生成に使用する乗算合同法の乗数を次式によっ
て決定し、図16示すように、プロセッサ管理テーブル
2の乗数の欄に格納する。
Next, the processor management unit 1 determines the multiplier of the congruential multiplication method used by each processor for random number generation according to the following equation, and stores it in the multiplier column of the processor management table 2 as shown in FIG.

【0062】乗数 = α**r (αは初期値の値、**はべき算、rはプロセッサ数で
ある。) したがって、本実施例では、乗数 = α5 である。
Multiplier = α ** r (α is an initial value, ** is a power calculation, r is the number of processors.) Therefore, in this embodiment, the multiplier is α 5 .

【0063】プロセッサ管理部1は、各プロセッサが発
生する乱数を直列にして発生乱数列格納部4へ格納する
際の結果格納位置間隔を、図17に示すように、プロセ
ッサ管理テーブル2の結果格納位置間隔の欄に格納す
る。本実施例では、プロセッサ数が5であることによ
り、結果格納位置間隔も5となる。
The processor management unit 1 stores the result storage position intervals when storing the random numbers generated by the respective processors in the generated random number sequence storage unit 4 in series, as shown in FIG. Store in the position interval column. In this embodiment, since the number of processors is 5, the result storage position interval is also 5.

【0064】プロセッサ管理部1は、図18に示すプロ
セッサ管理テーブル2内の各プロセッサの発生数カウン
タに0を格納する。
The processor management section 1 stores 0 in the occurrence number counter of each processor in the processor management table 2 shown in FIG.

【0065】次に、プロセッサ管理部1は、各プロセッ
サに対して乱数発生開始を指示する。
Next, the processor management unit 1 instructs each processor to start random number generation.

【0066】各プロセッサは、プロセッサ管理部1から
乱数の発生開始を指示されると、図18の状態のプロセ
ッサ管理テーブル2から、自プロセッサのプロセッサ番
号に対応する乗数、初期値、および乱数発生数の数値に
したがって、次式の計算を行って乱数を発生する。さら
に、各プロセッサは、該乱数を図6に示すように発生乱
数列格納部4に結果格納間隔にしたがって格納するとと
もに、プロセッサ管理テーブル2内の自プロセッサのプ
ロセッサ番号に対応する発生数カウンタの値に1加算す
る。
When each processor is instructed by the processor management unit 1 to start generating random numbers, the processor management table 2 in the state shown in FIG. 18 indicates that the multiplier corresponding to the processor number of its own processor, the initial value, and the number of random numbers generated. According to the numerical value of, the following formula is calculated to generate a random number. Further, each processor stores the random number in the generated random number sequence storage unit 4 according to the result storage interval as shown in FIG. 6, and at the same time, the value of the generation number counter corresponding to the processor number of the own processor in the processor management table 2. Add 1 to.

【0067】Xn+q+rt = αr*Xn+q+r(t-1) (ただし、α、Xは整数で、nはプロセッサの番号とす
る。) この式で、r=5、tは1から始まる自然数、qは13
2であるので、各プロセッサは、乱数Xn+132+5=α5
n+132、Xn+132+5*2=α5*Xn+132+5、…、を発生す
る。
X n + q + rt = α r * X n + q + r (t-1) (where α and X are integers and n is the number of the processor.) In this equation, r = 5 , T is a natural number starting from 1, and q is 13
Therefore, each processor has a random number X n + 132 + 5 = α 5 *
X n + 132 , X n + 132 + 5 * 2 = α 5 * X n + 132 + 5 , ...

【0068】各プロセッサは、この乱数の計算をプロセ
ッサ管理テーブル2内の乱数発生数が示す回数だけ実行
する。
Each processor executes the calculation of this random number the number of times indicated by the number of generated random numbers in the processor management table 2.

【0069】以上により、本発明の第2の実施例である
マルチプロセッサシステムにおける乱数発生装置の処理
が完了する。
With the above, the processing of the random number generator in the multiprocessor system according to the second embodiment of the present invention is completed.

【0070】本発明の第2の実施例であるマルチプロセ
ッサシステムにおける乱数発生装置の特徴は、乱数の発
生途中に新たなプロセッサを追加するために、プロセッ
サ管理部1がプロセッサ管理テーブル2に格納されてい
るパラメータにおいて、既設のプロセッサの乱数の発生
数を同一にし、その時点までに全ての既設のプロセッサ
で発生した乱数の合計数を基とした初期値と以降の乱数
の発生数をプロセッサ追加後のすべてのプロセッサに設
定し、各プロセッサが該プロセッサ管理テーブル2に格
納された乱数発生のための初期値およびパラメータ群に
基づいて、乗算合同法により乱数を発生するようにした
ことにある。
The feature of the random number generator in the multiprocessor system according to the second embodiment of the present invention is that the processor management unit 1 is stored in the processor management table 2 in order to add a new processor during the generation of random numbers. In the parameter, the number of random numbers generated by the existing processors is made the same, and the initial value based on the total number of random numbers generated by all the existing processors up to that point and the number of generated random numbers after that are added to the processor. In all the processors, and each processor generates a random number by the multiplication congruential method based on the initial value and the parameter group for random number generation stored in the processor management table 2.

【0071】本発明の第2の実施例であるマルチプロセ
ッサシステムにおける乱数発生装置は、このような特徴
を備えたことにより、マルチプロセッサシステムにおい
て、乱数発生中に乱数を発生させるプロセッサの数を変
更することができる効果を有している。
The random number generating device in the multiprocessor system according to the second embodiment of the present invention is provided with such a feature, so that the number of processors for generating random numbers is changed during random number generation in the multiprocessor system. Has the effect that can be.

【0072】[0072]

【発明の効果】以上説明したように、本発明は、マルチ
プロセッサシステムにおいて、乱数発生中に乱数を発生
させるプロセッサの数を変更することができるので、マ
ルチプロセッサシステムにおいて実行されるさまざまな
プログラム群と共存して効率良く乱数を発生することが
できる効果を有している。
As described above, according to the present invention, in a multiprocessor system, the number of processors that generate random numbers can be changed during random number generation. Therefore, various program groups executed in the multiprocessor system can be changed. It has the effect that it can coexist with and efficiently generate random numbers.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の第1の実施例におけるブロック図であ
る。
FIG. 1 is a block diagram of a first embodiment of the present invention.

【図2】本発明の第1の実施例において、発生乱数列格
納部4に初期値が格納された状態を示す図である。
FIG. 2 is a diagram showing a state in which an initial value is stored in a generated random number sequence storage unit 4 in the first exemplary embodiment of the present invention.

【図3】本発明の第1の実施例において、各プロセッサ
が発生した乱数が発生乱数列格納部4に格納される状態
を示す図である。
FIG. 3 is a diagram showing a state in which a random number generated by each processor is stored in a generated random number sequence storage unit 4 in the first exemplary embodiment of the present invention.

【図4】本発明の第2の実施例におけるブロック図であ
る。
FIG. 4 is a block diagram of a second embodiment of the present invention.

【図5】本発明の第2の実施例において、発生乱数列格
納部4に初期値が格納された状態を示す図である。
FIG. 5 is a diagram showing a state in which an initial value is stored in the generated random number sequence storage unit 4 in the second exemplary embodiment of the present invention.

【図6】本発明の第2の実施例において、各プロセッサ
が発生した乱数が発生乱数列格納部4に格納される状態
を示す図である。
FIG. 6 is a diagram showing a state in which a random number generated by each processor is stored in a generated random number sequence storage unit 4 in the second exemplary embodiment of the present invention.

【図7】本発明の第1の実施例におけるプロセッサ管理
テーブル2の内容を示す図である。
FIG. 7 is a diagram showing the contents of a processor management table 2 in the first embodiment of the present invention.

【図8】本発明の第1の実施例におけるプロセッサ管理
テーブル2の内容を示す図である。
FIG. 8 is a diagram showing the contents of a processor management table 2 in the first embodiment of the present invention.

【図9】本発明の第1の実施例におけるプロセッサ管理
テーブル2の内容を示す図である。
FIG. 9 is a diagram showing the contents of a processor management table 2 in the first embodiment of the present invention.

【図10】本発明の第1の実施例におけるプロセッサ管
理テーブル2の内容を示す図である。
FIG. 10 is a diagram showing the contents of a processor management table 2 according to the first embodiment of this invention.

【図11】本発明の第1の実施例におけるプロセッサ管
理テーブル2の内容を示す図である。
FIG. 11 is a diagram showing the contents of a processor management table 2 in the first embodiment of the present invention.

【図12】本発明の第2の実施例におけるプロセッサ管
理テーブル2の内容を示す図である。
FIG. 12 is a diagram showing the contents of a processor management table 2 in the second embodiment of the present invention.

【図13】本発明の第2の実施例におけるプロセッサ管
理テーブル2の内容を示す図である。
FIG. 13 is a diagram showing the contents of a processor management table 2 in the second embodiment of the present invention.

【図14】本発明の第2の実施例におけるプロセッサ管
理テーブル2の内容を示す図である。
FIG. 14 is a diagram showing the contents of a processor management table 2 in the second embodiment of the present invention.

【図15】本発明の第2の実施例におけるプロセッサ管
理テーブル2の内容を示す図である。
FIG. 15 is a diagram showing the contents of a processor management table 2 in the second embodiment of the present invention.

【図16】本発明の第2の実施例におけるプロセッサ管
理テーブル2の内容を示す図である。
FIG. 16 is a diagram showing the contents of a processor management table 2 in the second embodiment of the present invention.

【図17】本発明の第2の実施例におけるプロセッサ管
理テーブル2の内容を示す図である。
FIG. 17 is a diagram showing the contents of a processor management table 2 in the second embodiment of the present invention.

【図18】本発明の第2の実施例におけるプロセッサ管
理テーブル2の内容を示す図である。
FIG. 18 is a diagram showing the contents of a processor management table 2 in the second embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1 プロセッサ管理部 2 プロセッサ管理テーブル 4 発生乱数列格納部 31 プロセッサ 32 プロセッサ 33 プロセッサ 34 プロセッサ 35 プロセッサ 1 processor management unit 2 processor management table 4 generated random number sequence storage unit 31 processor 32 processor 33 processor 34 processor 35 processor

Claims (18)

【特許請求の範囲】[Claims] 【請求項1】 マルチプロセッサシステムに含まれる複
数のプロセッサの各々に対して乱数を発生するための初
期値を予め設定し、各プロセッサが該初期値に基づいて
並列に発生する乱数群が一連の乱数列になるように制御
するプロセッサ管理部を備えたことを特徴とするマルチ
プロセッサシステムにおける乱数発生装置。
1. An initial value for generating a random number is preset for each of a plurality of processors included in a multiprocessor system, and a random number group generated in parallel by each processor based on the initial value is a series of random numbers. A random number generation device in a multiprocessor system, comprising a processor management unit for controlling a random number sequence.
【請求項2】 前記プロセッサ管理部は、さらに、前記
複数のプロセッサによる乱数発生中に、乱数を発生させ
るプロセッサを追加し、追加したプロセッサを含めた各
プロセッサに対して乱数を発生するための前記初期値を
再設定し、該各プロセッサが再設定された初期値に基づ
いて並列に発生する乱数群が一連の乱数列になるように
制御することを特徴とする請求項1記載のマルチプロセ
ッサシステムにおける乱数発生装置。
2. The processor management unit further adds a processor that generates a random number during random number generation by the plurality of processors, and generates a random number for each processor including the added processor. 2. The multiprocessor system according to claim 1, wherein an initial value is reset, and each processor is controlled so that a random number group generated in parallel based on the reset initial value becomes a series of random number sequences. Random number generator in.
【請求項3】 マルチプロセッサシステムに含まれる複
数のプロセッサの各々に対して乱数を発生するための初
期値と乱数発生数とを予め設定し、各プロセッサが該初
期値に基づいて並列に発生する該乱数発生数の乱数群が
一連の乱数列になるように制御するプロセッサ管理部を
備えたことを特徴とするマルチプロセッサシステムにお
ける乱数発生装置。
3. An initial value and a random number generation number for generating a random number are preset for each of a plurality of processors included in a multiprocessor system, and each processor generates in parallel based on the initial value. A random number generation device in a multiprocessor system, comprising a processor management unit that controls a random number group of the generated random number to be a series of random number sequences.
【請求項4】 前記プロセッサ管理部は、さらに、前記
複数のプロセッサによる乱数発生中に、乱数を発生させ
るプロセッサを追加し、追加したプロセッサを含めた各
プロセッサに対して乱数を発生するための前記初期値と
前記乱数発生数とを再設定し、該各プロセッサが再設定
された初期値に基づいて並列に発生する再設定された乱
数発生数の乱数群が一連の乱数列になるように制御する
ことを特徴とする請求項3記載のマルチプロセッサシス
テムにおける乱数発生装置。
4. The processor management unit further adds a processor for generating random numbers during random number generation by the plurality of processors, and generates a random number for each processor including the added processor. Resetting the initial value and the random number generation number, and controlling such that the random number group of the reset random number generation numbers generated in parallel by the respective processors based on the reset initial value becomes a series of random number sequences The random number generator in the multiprocessor system according to claim 3, wherein
【請求項5】 マルチプロセッサシステムに含まれる複
数のプロセッサが発生する乱数を格納する発生乱数列格
納部と、 前記複数のプロセッサの各々に対して乱数を発生するた
めの初期値を設定し、該初期値が一連の乱数列になるよ
うに前記発生乱数列格納部へ格納するとともに、前記マ
ルチプロセッサシステム全体での乱数の発生総数と乱数
を発生するプロセッサの数とに基づいて各プロセッサの
乱数発生数を設定し、さらに、各プロセッサが前記初期
値に基づいて並列に発生する該乱数発生数の乱数群が一
連の乱数列になるように制御し、発生された乱数を前記
発生乱数列格納部に格納されている該初期値の後に格納
するプロセッサ管理部とを備えたことを特徴とするマル
チプロセッサシステムにおける乱数発生装置。
5. A random number sequence storage unit for storing random numbers generated by a plurality of processors included in a multiprocessor system, and an initial value for generating a random number for each of the plurality of processors, The initial value is stored in the generated random number sequence storage unit so as to be a series of random number sequences, and the random number generation of each processor is performed based on the total number of random numbers generated in the entire multiprocessor system and the number of processors generating random numbers. The number is set, and further, each processor is controlled so that the random number group of the random number generated in parallel based on the initial value becomes a series of random number sequences, and the generated random numbers are stored in the generated random number sequence storage unit. And a processor management unit that stores the initial value after the initial value stored in the random number generator in the multiprocessor system.
【請求項6】 さらに前記プロセッサ管理部は、前記複
数のプロセッサによる乱数発生中に、乱数を発生させる
プロセッサを追加し、追加したプロセッサを含めた各プ
ロセッサに対して乱数を発生するための初期値を再設定
し、該初期値が一連の乱数列になるように前記発生乱数
列格納部へ格納するとともに、前記マルチプロセッサシ
ステム全体での乱数の発生総数と乱数を発生するプロセ
ッサの数とに基づいて各プロセッサの乱数発生数を設定
し、さらに、各プロセッサが前記再設定された初期値に
基づいて並列に発生する再設定された乱数発生数の乱数
群が一連の乱数列になるように制御し、発生された乱数
を前記発生乱数列格納部に格納されている該初期値の後
に格納することを特徴とする請求項5記載のマルチプロ
セッサシステムにおける乱数発生装置。
6. The processor management unit further adds a processor for generating a random number during random number generation by the plurality of processors, and an initial value for generating a random number for each processor including the added processor. Based on the total number of random numbers generated in the multiprocessor system and the number of processors generating random numbers, while storing the generated random number sequence storage unit so that the initial value becomes a series of random number sequences. The number of random numbers generated by each processor, and further control that the random number group of the number of reset random numbers generated in parallel by each processor based on the reset initial value becomes a series of random numbers. The multiprocessor system according to claim 5, wherein the generated random number is stored after the initial value stored in the generated random number sequence storage unit. Random number generator.
【請求項7】 さらに前記プロセッサ管理部は、前記複
数のプロセッサによる乱数発生中に乱数を発生させるプ
ロセッサを追加する場合、既設のプロセッサの内、最多
の乱数を発生したプロセッサが発生した乱数の数に任意
の値を加算した数まで、既設のすべてのプロセッサが乱
数を発生するように制御するとともに、既設のすべての
プロセッサが発生済みの乱数の個数に基づいて、各プロ
セッサが乱数を発生するための初期値を再設定し、該初
期値が一連の乱数列になるように前記発生乱数列格納部
へ格納し、前記マルチプロセッサシステム全体での乱数
の発生総数、発生済みの乱数の個数、および乱数を発生
するプロセッサの数とに基づいて各プロセッサの乱数発
生数を設定し、さらに、各プロセッサが前記再設定され
た初期値と発生済みの乱数の数とに基づいて並列に発生
する再設定された乱数発生数の乱数群が、一連の乱数列
になるように制御し、発生された乱数を前記発生乱数列
格納部に格納されている該初期値の後に格納することを
特徴とする請求項5記載のマルチプロセッサシステムに
おける乱数発生装置。
7. The number of random numbers generated by the processor that generates the largest number of random numbers among the existing processors when the processor management unit adds a processor that generates random numbers during random number generation by the plurality of processors. Since all existing processors are controlled to generate random numbers up to the number obtained by adding an arbitrary value to, each existing processor generates random numbers based on the number of generated random numbers. Reset the initial value of, and store in the generated random number sequence storage unit so that the initial value becomes a series of random number sequences, the total number of random numbers generated in the entire multiprocessor system, the number of generated random numbers, and Set the number of random numbers to be generated for each processor based on the number of processors that generate random numbers, and further set each processor to the reset initial value and already generated The random number group of the reset random number generation number that is generated in parallel based on the number of random numbers is controlled so as to be a series of random number sequences, and the generated random numbers are stored in the generated random number sequence storage unit. The random number generator in the multiprocessor system according to claim 5, wherein the random number generator stores the random number after the initial value.
【請求項8】 マルチプロセッサシステムに含まれる複
数のプロセッサが発生する乱数を格納する発生乱数列格
納部と、 前記複数のプロセッサの各々に対して、 Xn = X*αnmodM ただし、α、X、およびMは
整数で、0≦X<M、nはプロセッサの番号とする式を
利用して、乱数を発生するための初期値を設定し、該初
期値が一連の乱数列になるように前記発生乱数列格納部
へ格納するとともに、 前記マルチプロセッサシステム全体での乱数の発生総数
と乱数を発生するプロセッサの数とに基づいて、乱数発
生数 = (発生総数/プロセッサ数)−1とする式を利
用して、各プロセッサの乱数発生数を設定し、 さらに、各プロセッサが前記初期値に基づいて並列に発
生する該乱数発生数の乱数群が、 Xn+rt = αr*Xn+r(t-1) ただし、Xは整数、αは
初期値、rはプロセッサ数、nはプロセッサの番号、t
は自然数で、1≦t≦乱数発生数 とする式を利用し
て、一連の乱数列になるように制御し、発生された乱数
を前記発生乱数列格納部に格納されている該初期値の後
に格納するプロセッサ管理部とを備えたことを特徴とす
るマルチプロセッサシステムにおける乱数発生装置。
8. A generated random number sequence storage unit for storing random numbers generated by a plurality of processors included in a multiprocessor system, and for each of the plurality of processors, X n = X * α n modM where α, X and M are integers, 0 ≦ X <M, and n is the number of the processor, and an initial value for generating a random number is set by using an equation so that the initial value becomes a series of random numbers. And the number of random numbers generated in the entire multiprocessor system based on the total number of random numbers generated in the multiprocessor system and the number of processors that generate random numbers = (total number of generated / number of processors) -1 Is used to set the random number generation number of each processor, and the random number group of the random number generation numbers generated by each processor in parallel based on the initial value is X n + rt = α r * X n + r (t-1) However, Is an integer, alpha is the initial value, r is the number of processors, n represents the number of processors, t
Is a natural number, and is controlled so as to be a series of random number sequences by using an expression of 1 ≦ t ≦ random number generation number, and the generated random numbers are stored in the generated random number sequence storage unit. A random number generation device in a multiprocessor system, comprising: a processor management unit to be stored later.
【請求項9】 さらに前記プロセッサ管理部は、前記複
数のプロセッサによる乱数発生中に乱数を発生させるプ
ロセッサを追加する場合、既設のプロセッサの内、最多
の乱数を発生したプロセッサが発生した乱数の数に任意
の値を加算した数まで、既設のすべてのプロセッサが乱
数を発生するように制御するとともに、 既設のすべてのプロセッサが発生済みの乱数の個数に基
づいて、 Xq+n = Xq*αnmodM ただし、α、X、および
Mは整数で、0≦X<M、nはプロセッサの番号、qは
既設のすべてのプロセッサが発生した乱数の合計 とす
る式を利用して、各プロセッサが乱数を発生するための
初期値を再設定し、該初期値が一連の乱数列になるよう
に前記発生乱数列格納部へ格納し、 前記マルチプロセッサシステム全体での乱数の発生総
数、発生済みの乱数の個数、および乱数を発生するプロ
セッサの数とに基づいて、乱数発生数 = {(乱数の発
生総数−発生済みの乱数の個数)/プロセッサの数}−
1 とする式を利用して、各プロセッサの乱数発生数を
設定し、 さらに、各プロセッサが前記再設定された初期値と発生
済みの乱数の数とに基づいて並列に発生する再設定され
た乱数発生数の乱数群が、 Xn+q+rt = αr*Xn+q+r(t-1) ただし、Xは整数、
αは初期値、rはプロセッサ数、nはプロセッサの番
号、qは既設のすべてのプロセッサが発生した乱数の合
計、tは自然数で、1≦t≦乱数発生数 とする式を利
用して、一連の乱数列になるように制御し、発生された
乱数を前記発生乱数列格納部に格納されている該初期値
の後に格納することを特徴とする請求項8記載のマルチ
プロセッサシステムにおける乱数発生装置。
9. The number of random numbers generated by the processor that has generated the largest number of random numbers among the existing processors when the processor management unit adds a processor that generates random numbers during random number generation by the plurality of processors. All the existing processors are controlled to generate random numbers up to the number obtained by adding an arbitrary value to, and X q + n = X q * based on the number of random numbers generated by all the existing processors. α n mod M where α, X, and M are integers, 0 ≦ X <M, n is the processor number, and q is the sum of random numbers generated by all existing processors. Resets an initial value for generating a random number, stores the initial value in the generated random number sequence storage unit so that the initial value becomes a series of random number sequences, and generates a random number in the entire multiprocessor system. Based on the total number of raw numbers, the number of generated random numbers, and the number of processors that generate random numbers, the number of generated random numbers = {(total number of generated random numbers-number of generated random numbers) / number of processors}-
The number of random numbers generated by each processor is set by using the expression 1 and each of the processors is reset in parallel, based on the reset initial value and the number of generated random numbers. The random number group of the number of generated random numbers is X n + q + rt = α r * X n + q + r (t-1) , where X is an integer,
α is an initial value, r is the number of processors, n is the number of the processor, q is the sum of random numbers generated by all existing processors, t is a natural number, and 1 ≦ t ≦ random number generation number 9. The random number generation in a multiprocessor system according to claim 8, wherein the random number is controlled so as to be a series of random number sequences, and the generated random numbers are stored after the initial value stored in the generated random number sequence storage unit. apparatus.
【請求項10】 マルチプロセッサシステムに含まれる
複数のプロセッサの各々に対して乱数を発生するための
初期値を予め設定し、各プロセッサが該初期値に基づい
て並列に発生する乱数群が一連の乱数列になるように制
御することを特徴とするマルチプロセッサシステムにお
ける乱数発生方法。
10. An initial value for generating a random number is preset for each of a plurality of processors included in a multiprocessor system, and a random number group generated in parallel by each processor based on the initial value is a series of random numbers. A method for generating random numbers in a multiprocessor system, which is characterized in that the random number sequence is controlled.
【請求項11】 さらに、前記複数のプロセッサによる
乱数発生中に、乱数を発生させるプロセッサを追加し、
追加したプロセッサを含めた各プロセッサに対して乱数
を発生するための前記初期値を再設定し、該各プロセッ
サが再設定された初期値に基づいて並列に発生する乱数
群が一連の乱数列になるように制御することを特徴とす
る請求項10記載のマルチプロセッサシステムにおける
乱数発生方法。
11. A processor for generating a random number is further added during random number generation by the plurality of processors,
The initial value for generating a random number is reset for each processor including the added processor, and a random number group generated in parallel based on the reset initial value for each processor is a series of random number sequences. 11. The random number generation method in a multiprocessor system according to claim 10, wherein the random number generation method is controlled as follows.
【請求項12】 マルチプロセッサシステムに含まれる
複数のプロセッサの各々に対して乱数を発生するための
初期値と乱数発生数とを予め設定し、各プロセッサが該
初期値に基づいて並列に発生する該乱数発生数の乱数群
が一連の乱数列になるように制御することを特徴とする
マルチプロセッサシステムにおける乱数発生方法。
12. An initial value and a random number generation number for generating a random number are preset for each of a plurality of processors included in a multiprocessor system, and each processor generates in parallel based on the initial value. A random number generation method in a multiprocessor system, characterized in that the random number group of the random number generation number is controlled to be a series of random number sequences.
【請求項13】 さらに、前記複数のプロセッサによる
乱数発生中に、乱数を発生させるプロセッサを追加し、
追加したプロセッサを含めた各プロセッサに対して乱数
を発生するための前記初期値と前記乱数発生数とを再設
定し、該各プロセッサが再設定された初期値に基づいて
並列に発生する再設定された乱数発生数の乱数群が一連
の乱数列になるように制御することを特徴とする請求項
12記載のマルチプロセッサシステムにおける乱数発生
方法。
13. A processor for generating random numbers is added during random number generation by the plurality of processors,
Resetting the initial value and the random number generation number for generating a random number for each processor including the added processor, and resetting the respective processors in parallel based on the reset initial value 13. The random number generation method in a multiprocessor system according to claim 12, wherein the random number group of the generated random number is controlled so as to be a series of random number sequences.
【請求項14】 マルチプロセッサシステムに含まれる
複数のプロセッサの各々に対して乱数を発生するための
初期値を設定し、該初期値が一連の乱数列になるように
記憶装置へ格納するとともに、 前記マルチプロセッサシステム全体での乱数の発生総数
と乱数を発生するプロセッサの数とに基づいて各プロセ
ッサの乱数発生数を設定し、 さらに、各プロセッサが前記初期値に基づいて並列に発
生する該乱数発生数の乱数群が一連の乱数列になるよう
に制御し、発生された乱数を前記記憶装置に格納されて
いる該初期値の後に格納することを特徴とするマルチプ
ロセッサシステムにおける乱数発生方法。
14. An initial value for generating a random number is set for each of a plurality of processors included in a multiprocessor system, and the initial value is stored in a storage device so as to be a series of random number sequences. The number of random numbers generated by each processor is set based on the total number of random numbers generated in the entire multiprocessor system and the number of processors generating random numbers, and the random numbers generated by each processor in parallel based on the initial value. A random number generation method in a multiprocessor system, characterized in that a random number group of generated numbers is controlled to be a series of random number sequences, and the generated random numbers are stored after the initial value stored in the storage device.
【請求項15】 さらに、前記複数のプロセッサによる
乱数発生中に、乱数を発生させるプロセッサを追加し、
追加したプロセッサを含めた各プロセッサに対して乱数
を発生するための初期値を再設定し、該初期値が一連の
乱数列になるように前記記憶装置へ格納するとともに、 前記マルチプロセッサシステム全体での乱数の発生総数
と乱数を発生するプロセッサの数とに基づいて各プロセ
ッサの乱数発生数を設定し、 さらに、各プロセッサが前記再設定された初期値に基づ
いて並列に発生する再設定された乱数発生数の乱数群が
一連の乱数列になるように制御し、発生された乱数を前
記記憶装置に格納されている該初期値の後に格納するこ
とを特徴とする請求項14記載のマルチプロセッサシス
テムにおける乱数発生方法。
15. A processor for generating a random number is further added during random number generation by the plurality of processors,
An initial value for generating a random number is reset for each processor including the added processor, and the initial value is stored in the storage device so as to be a series of random number sequences. The number of random numbers generated by each processor is set based on the total number of random numbers generated and the number of processors generating random numbers, and each processor is reset in parallel based on the reset initial value. 15. The multiprocessor according to claim 14, wherein the random number group of the generated random number is controlled so as to be a series of random number sequences, and the generated random number is stored after the initial value stored in the storage device. Random number generation method in the system.
【請求項16】 さらに、前記複数のプロセッサによる
乱数発生中に乱数を発生させるプロセッサを追加する場
合、既設のプロセッサの内、最多の乱数を発生したプロ
セッサが発生した乱数の数に任意の値を加算した数ま
で、既設のすべてのプロセッサが乱数を発生するように
制御するとともに、 既設のすべてのプロセッサが発生済みの乱数の個数に基
づいて、各プロセッサが乱数を発生するための初期値を
再設定し、該初期値が一連の乱数列になるように前記記
憶装置へ格納し、 前記マルチプロセッサシステム全体での乱数の発生総
数、発生済みの乱数の個数、および乱数を発生するプロ
セッサの数とに基づいて各プロセッサの乱数発生数を設
定し、 さらに、各プロセッサが前記再設定された初期値と発生
済みの乱数の数とに基づいて並列に発生する再設定され
た乱数発生数の乱数群が、一連の乱数列になるように制
御し、発生された乱数を前記記憶装置に格納されている
該初期値の後に格納することを特徴とする請求項14記
載のマルチプロセッサシステムにおける乱数発生方法。
16. When adding a processor that generates a random number during random number generation by the plurality of processors, an arbitrary value is set to the number of random numbers generated by the processor that generated the largest number of random numbers among the existing processors. All the existing processors are controlled to generate random numbers up to the added number, and all the existing processors reset the initial value for generating random numbers based on the number of generated random numbers. The number of random numbers generated in the entire multiprocessor system, the number of generated random numbers, and the number of processors generating random numbers, The number of random numbers generated by each processor is set based on, and each processor is parallelized based on the reset initial value and the number of generated random numbers. The random number group of the number of reset random numbers generated in is controlled so as to be a series of random number sequences, and the generated random number is stored after the initial value stored in the storage device. 15. The random number generation method in a multiprocessor system according to claim 14.
【請求項17】 マルチプロセッサシステムに含まれる
複数のプロセッサの各々に対して、 Xn = X*αnmodM ただし、α、X、およびMは
整数で、0≦X<M、nはプロセッサの番号とする式を
利用して、乱数を発生するための初期値を設定し、該初
期値が一連の乱数列になるように記憶装置へ格納すると
ともに、 前記マルチプロセッサシステム全体での乱数の発生総数
と乱数を発生するプロセッサの数とに基づいて、乱数発
生数 = (発生総数/プロセッサ数)−1とする式を利
用して、各プロセッサの乱数発生数を設定し、 さらに、各プロセッサが前記初期値に基づいて並列に発
生する該乱数発生数の乱数群が、 Xn+rt = αr*Xn+r(t-1) ただし、Xは整数、αは
初期値、rはプロセッサ数、nはプロセッサの番号、t
は自然数で、1≦t≦乱数発生数 とする式を利用し
て、一連の乱数列になるように制御し、発生された乱数
を前記記憶装置に格納されている該初期値の後に格納す
ることを特徴とするマルチプロセッサシステムにおける
乱数発生方法。
17. For each of a plurality of processors included in a multiprocessor system, X n = X * α n mod M, where α, X, and M are integers, and 0 ≦ X <M, n An initial value for generating a random number is set by using an expression that is a number, the initial value is stored in a storage device so as to be a series of random number sequences, and the random number is generated in the entire multiprocessor system. Based on the total number and the number of processors generating random numbers, the number of random number generation = (total number generation / number of processors) -1 is used to set the number of random number generation of each processor. A random number group of the random number generated in parallel based on the initial value is Xn + rt = αr * Xn + r (t-1) , where X is an integer, α is an initial value, and r is a processor. Number, n is the processor number, t
Is a natural number, and is controlled so as to be a series of random number sequences by using an equation of 1 ≦ t ≦ random number generation number, and the generated random number is stored after the initial value stored in the storage device. A method for generating random numbers in a multiprocessor system characterized by the above.
【請求項18】 さらに、前記複数のプロセッサによる
乱数発生中に乱数を発生させるプロセッサを追加する場
合、既設のプロセッサの内、最多の乱数を発生したプロ
セッサが発生した乱数の数に任意の値を加算した数ま
で、既設のすべてのプロセッサが乱数を発生するように
制御するとともに、 既設のすべてのプロセッサが発生済みの乱数の個数に基
づいて、 Xq+n = Xq*αnmodM ただし、α、X、および
Mは整数で、0≦X<M、nはプロセッサの番号、qは
既設のすべてのプロセッサが発生した乱数の合計 とす
る式を利用して、各プロセッサが乱数を発生するための
初期値を再設定し、該初期値が一連の乱数列になるよう
に前記記憶装置へ格納し、 前記マルチプロセッサシステム全体での乱数の発生総
数、発生済みの乱数の個数、および乱数を発生するプロ
セッサの数とに基づいて、乱数発生数 = {(乱数の発
生総数−発生済みの乱数の個数)/プロセッサの数}−
1 とする式を利用して、各プロセッサの乱数発生数を
設定し、 さらに、各プロセッサが前記再設定された初期値と発生
済みの乱数の数とに基づいて並列に発生する再設定され
た乱数発生数の乱数群が、 Xn+q+rt = αr*Xn+q+r(t-1) ただし、Xは整数、
αは初期値、rはプロセッサ数、nはプロセッサの番
号、qは既設のすべてのプロセッサが発生した乱数の合
計、tは自然数で、1≦t≦乱数発生数 とする式を利
用して、一連の乱数列になるように制御し、発生された
乱数を前記記憶装置に格納されている該初期値の後に格
納することを特徴とする請求項17記載のマルチプロセ
ッサシステムにおける乱数発生方法。
18. When adding a processor that generates a random number during random number generation by the plurality of processors, an arbitrary value is set to the number of random numbers generated by the processor that generated the largest number of random numbers among the existing processors. Up to the added number, all existing processors are controlled to generate random numbers, and based on the number of random numbers generated by all existing processors, X q + n = X q * α n modM where α, X, and M are integers, 0 ≦ X <M, n is the processor number, and q is a sum of random numbers generated by all existing processors, and each processor generates a random number. Reset the initial value for storing in the storage device so that the initial value becomes a series of random number sequences, the total number of random numbers generated in the entire multiprocessor system, the number of generated random numbers , And the number of processors generating random numbers, the number of random numbers generated = {(total number of generated random numbers−number of generated random numbers) / number of processors} −
The number of random numbers generated by each processor is set by using the expression 1 and each of the processors is reset in parallel, based on the reset initial value and the number of generated random numbers. The random number group of the number of generated random numbers is X n + q + rt = α r * X n + q + r (t-1) , where X is an integer,
α is an initial value, r is the number of processors, n is the number of the processor, q is the sum of random numbers generated by all existing processors, t is a natural number, and 1 ≦ t ≦ random number generation number 18. The random number generation method in a multiprocessor system according to claim 17, wherein the random number is controlled so as to be a series of random numbers, and the generated random number is stored after the initial value stored in the storage device.
JP08083416A 1995-04-11 1996-04-05 Random number generator and random number generation method in multiprocessor system Expired - Fee Related JP3123920B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP08083416A JP3123920B2 (en) 1995-04-11 1996-04-05 Random number generator and random number generation method in multiprocessor system

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP8552995 1995-04-11
JP7-85529 1995-04-11
JP08083416A JP3123920B2 (en) 1995-04-11 1996-04-05 Random number generator and random number generation method in multiprocessor system

Publications (2)

Publication Number Publication Date
JPH08339294A true JPH08339294A (en) 1996-12-24
JP3123920B2 JP3123920B2 (en) 2001-01-15

Family

ID=26424442

Family Applications (1)

Application Number Title Priority Date Filing Date
JP08083416A Expired - Fee Related JP3123920B2 (en) 1995-04-11 1996-04-05 Random number generator and random number generation method in multiprocessor system

Country Status (1)

Country Link
JP (1) JP3123920B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0973090A2 (en) * 1998-07-14 2000-01-19 Hitachi, Ltd. Random-number generating method and apparatus and storage medium therefor
JP2012014591A (en) * 2010-07-02 2012-01-19 Mizuho Dl Financial Technology Co Ltd Efficient parallel processing method of monte carlo method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0973090A2 (en) * 1998-07-14 2000-01-19 Hitachi, Ltd. Random-number generating method and apparatus and storage medium therefor
EP0973090A3 (en) * 1998-07-14 2002-01-02 Hitachi, Ltd. Random-number generating method and apparatus and storage medium therefor
US6389439B1 (en) 1998-07-14 2002-05-14 Hitachi, Ltd. Random-number generating method and apparatus and storage medium therefor
JP2012014591A (en) * 2010-07-02 2012-01-19 Mizuho Dl Financial Technology Co Ltd Efficient parallel processing method of monte carlo method

Also Published As

Publication number Publication date
JP3123920B2 (en) 2001-01-15

Similar Documents

Publication Publication Date Title
Barnes et al. Solving the job shop scheduling problem with tabu search
Potts et al. Approximation algorithms for scheduling a single machine to minimize total late work
US5793657A (en) Random number generating apparatus and random number generating method in a multiprocessor system
JPS59160267A (en) Vector processing device
Canon et al. Online scheduling of task graphs on heterogeneous platforms
JPH08339294A (en) Device and method for random number generation in multiprocessor system
JPS61246840A (en) Performance adjusting system for information processor
CN110232289A (en) The high speed point doubling method of elliptic curve cipher
JP3593439B2 (en) Image processing device
CN113391919B (en) Calculation node distribution method and device based on two-dimensional fat tree network
CN109375895B (en) Polynomial multiplication accelerating method and device, and NTRU encryption and decryption accelerating method and device
JP2015130058A (en) semiconductor device
CN104969462B (en) Inverter control device and peripheral device thereof
Takahashi Automatic tuning of computation-communication overlap for parallel 1-D FFT
KR100480242B1 (en) Fuzzy Inference Device of Digital Logic Structure
Lv et al. A Hybrid Harmony Search and Simulated Annealing Algorithm for Job Shop Scheduling Problem
JP3820698B2 (en) Frequency variable device
CN115735191A (en) Method, apparatus, device and medium for random sequence generation
JP3686261B2 (en) Computer, program conversion device, and program recording medium
JPH08212071A (en) Instruction code generation method
Gim et al. Two-machine flow-shop sequencing with sparse precedence constraints
JP2929823B2 (en) Multi-rate signal processor
JPH1049248A (en) Microcomputer
JPH07334370A (en) Fuzzy inference device
CN113014228A (en) Control method and device of cooperative robot, electronic equipment and storage medium

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071027

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081027

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees