JP6333371B2 - Method for implementing bit arrays in cache lines - Google Patents

Method for implementing bit arrays in cache lines Download PDF

Info

Publication number
JP6333371B2
JP6333371B2 JP2016524921A JP2016524921A JP6333371B2 JP 6333371 B2 JP6333371 B2 JP 6333371B2 JP 2016524921 A JP2016524921 A JP 2016524921A JP 2016524921 A JP2016524921 A JP 2016524921A JP 6333371 B2 JP6333371 B2 JP 6333371B2
Authority
JP
Japan
Prior art keywords
bit
request
value
bits
array
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.)
Active
Application number
JP2016524921A
Other languages
Japanese (ja)
Other versions
JP2016526739A (en
Inventor
シュタインマッハ−ブロウ、ブルクハルト
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.)
International Business Machines Corp
Original Assignee
International Business Machines 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 International Business Machines Corp filed Critical International Business Machines Corp
Publication of JP2016526739A publication Critical patent/JP2016526739A/en
Application granted granted Critical
Publication of JP6333371B2 publication Critical patent/JP6333371B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory
    • G06F9/30043LOAD or STORE instructions; Clear instruction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0893Caches characterised by their organisation or structure
    • G06F12/0895Caches characterised by their organisation or structure of parts of caches, e.g. directory or tag array
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3824Operand accessing
    • G06F9/3834Maintaining memory consistency
    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3851Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution from multiple instruction streams, e.g. multistreaming
    • 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

Description

本発明は、コンピューティング・システムに関し、より詳細には、キャッシュ線中でビット配列を実装するための方法に関する。   The present invention relates to computing systems, and more particularly to a method for implementing bit arrays in cache lines.

多くのマルチスレッド化されたコンピュータ・システムは、種々の規模の会社にとって、より重要な技術の1つになる。これらは、コンピューティング・ハードウェア・プラットフォームの計算効率およびフレキシビリティを高める。マルチスレッド化されたコンピュータ・システム上でのマルチスレッド化された操作は、ビット配列の個々のビットに対して論理演算を実施する、ビット単位の原子的メモリ操作(AMO: Atomic MemoryOperations)を含むことがある。このようなAMOは、ストアのような操作であるstoreAND、storeOR、storeXOR、および、ロードのような操作であるfetchAND、fetchOR、fetchXORを含む。   Many multithreaded computer systems become one of the more important technologies for companies of various sizes. These increase the computational efficiency and flexibility of computing hardware platforms. Multithreaded operations on multithreaded computer systems include bit-wise atomic memory operations (AMO) that perform logical operations on individual bits of the bit array. There is. Such AMOs include storeAND, storeOR, storeXOR, which are store-like operations, and fetchAND, fetchOR, and fetchXOR, which are load-like operations.

本発明の実施形態の目的は、改善された方法、コンピュータ・システム、およびコンピュータ・プログラム製品を提供することである。この目的は、独立請求項の主題によって解決される。従属請求項に、有利な実施形態が記載される。   An object of embodiments of the present invention is to provide improved methods, computer systems, and computer program products. This object is solved by the subject matter of the independent claims. Advantageous embodiments are described in the dependent claims.

本明細書において使用されるような原子的メモリ操作(AMO)は、共有データに対するリード−モディファイ−ライト(read-modify-write)操作を指す。AMOは、あるスレッドのリード−モディファイ−ライト操作が別のスレッドによる干渉なしで実施されるという意味で、原子的である。言い換えれば、スレッドまたはプロセッサが共有データにアクセスする(例えば同時にアクセスする)場合、各リードまたはライトまたはAMOアクセスは、別のアクセスからの干渉なしで、原子的に実施される。   Atomic memory operation (AMO) as used herein refers to a read-modify-write operation on shared data. AMO is atomic in the sense that a read-modify-write operation of one thread is performed without interference by another thread. In other words, when a thread or processor accesses shared data (eg, accesses simultaneously), each read or write or AMO access is performed atomically without interference from another access.

一態様では、本発明は、メモリ・ストレージとコントローラとを備えるメモリ・システムのキャッシュ線中でビット配列を実装するための方法に関する。   In one aspect, the invention relates to a method for implementing a bit array in a cache line of a memory system comprising a memory storage and a controller.

方法は、キャッシュ線中でビット配列を構成するステップを含み、ビット配列はビットの配列を含み、構成するステップはさらに、ビット配列中の各ビットの値を定義するステップを含む。方法はまた、コントローラによってビット配列に対する操作の要求を受け取るステップを含み、要求は、メモリ・ストレージ中におけるキャッシュ線の場所と、要求を指定する情報とを示す。方法はまた、コントローラ(206)によって、この情報を使用して、ビット配列に対する1つまたは複数のアクションを操作について識別するステップを含み、1つまたは複数のアクションは、コントローラ中でエンコードされる。方法はまた、要求を受け取るのに応答して、1つまたは複数のエンコードされたアクションを実行することによって要求を実施するステップを含む。   The method includes configuring a bit array in the cache line, the bit array including an array of bits, and the configuring step further includes defining a value for each bit in the bit array. The method also includes receiving a request for an operation on the bit array by the controller, the request indicating a location of the cache line in the memory storage and information specifying the request. The method also includes the step of using the information by the controller (206) to identify one or more actions on the bit array for operation, wherein the one or more actions are encoded in the controller. The method also includes performing the request by performing one or more encoded actions in response to receiving the request.

ビット配列は、個々のビットを記憶するデータ構造である。すなわち、各配列要素は、単一のビットに対応する。ビット配列の各要素は、2つの値0と1のうちの一方を記憶する。ビット配列の各要素は、固有のインデックスによって識別される。通常、E個の要素を含むビット配列には、インデックス値0〜(E−1)が使用される。   A bit array is a data structure that stores individual bits. That is, each array element corresponds to a single bit. Each element of the bit array stores one of two values 0 and 1. Each element of the bit array is identified by a unique index. Normally, index values 0 to (E-1) are used for bit arrays including E elements.

ビット配列を実装することは、ビット配列の個々のビットならびに一群のビットに対してビット単位の論理演算を実施するために、キャッシュ線の少なくとも一部にアクセスするのを可能にすることができる。例えば、ビット配列の各ビットは、メモリ・システムを備えるコンピュータ・システムのリソースのインスタンスを表すことができる。このビット配列に対する操作は、例えば、ユーザ(例えばスレッド)が、対応する1つまたは複数のビットの値を1にセットすることによって原子的にこの1つまたは複数のリソース・インスタンスの「所有者」になるのを可能にすることができる。   Implementing a bit array can allow access to at least a portion of a cache line to perform bitwise logical operations on individual bits as well as a group of bits in the bit array. For example, each bit of the bit array can represent an instance of a computer system resource comprising a memory system. An operation on this bit array is, for example, that the user (eg, thread) atomically “owns” the one or more resource instances by setting the value of the corresponding one or more bits to 1. Can be made possible.

例えば、ビット配列の各ビットは、複数のスレッドによって共有されるロックのセット中のロックを表すことができる。このビット配列に対する操作は、例えば、スレッドが、高性能に、かつ低プログラミング労力で、複数のロックを原子的に獲得するのを可能にすることができる。   For example, each bit in the bit array can represent a lock in a set of locks shared by multiple threads. Operations on this bit array can, for example, allow a thread to atomically acquire multiple locks with high performance and low programming effort.

例えば、ビット配列の各ビットの1または0の値は、優先キュー中の特定の要素の有無を表すことができる。このような優先キューは、E個までの固有の要素を有し、各要素は、ビット配列の各インデックスに対応するように、0〜E−1の番号が付いた固有の優先順位を有する。   For example, a 1 or 0 value for each bit in the bit array can indicate the presence or absence of a particular element in the priority queue. Such a priority queue has up to E unique elements, each element having a unique priority numbered from 0 to E-1, corresponding to each index of the bit array.

これらの特徴は、同時スレッドの場合には特に、従来の方法と比較して、ビット配列に対するより高いレートの操作を可能にできるので有利であろう。これは、ビット配列に対する操作が、他のデータ構造に対する従来の操作よりも速い単純な操作となり得るという事実によるものであろう。   These features may be advantageous, especially in the case of simultaneous threads, as it allows for higher rate operations on bit arrays compared to conventional methods. This may be due to the fact that operations on bit arrays can be simple operations that are faster than conventional operations on other data structures.

これらの特徴は、ビット配列を、複数のスレッドによって同時データ構造として使用するのを可能にすることができる。例えば、要求された操作は、AMOとすることができる。受け取られた要求は、ビット配列に対する操作を求める、複数のスレッドからコントローラによって受け取られた複数の同時要求のうちの1つとすることができる。受け取られた同時要求は、順次実施されるものとすることができる。コントローラは、このような複数の同時スレッドを実施および管理するように適合されたものとすることができる。コントローラは、メモリ・アクセス要求を受け入れる受信機と、返答を返す送信機とを備えることができ、それぞれは、複数の同時スレッドのメモリ・アクセスに応じるために、先入れ先出しバッファ(FIFO)を備えることができる。   These features can allow the bit array to be used as a simultaneous data structure by multiple threads. For example, the requested operation can be AMO. The received request can be one of a plurality of simultaneous requests received by the controller from a plurality of threads seeking operations on the bit array. The received simultaneous requests may be performed sequentially. The controller can be adapted to implement and manage such multiple simultaneous threads. The controller can include a receiver that accepts memory access requests and a transmitter that returns a response, each of which includes a first in first out buffer (FIFO) to accommodate memory access of multiple simultaneous threads. it can.

これらの特徴は、例えば、この要求など、ビット配列にアクセスする要求を複数のスレッドが同時に発行するマルチスレッド化されたアプリケーションで、複数のユーザまたはスレッドがビット配列を利用するための単一のインタフェースを提供することができる。   These features include a single interface for multiple users or threads to use bit arrays in multithreaded applications where multiple threads issue requests to access the bit arrays simultaneously, such as this request, for example. Can be provided.

別の利点は、メモリ・システムが、従来の原子的メモリ操作を超えた新しい原子的メモリ操作を実装してビット配列を使用できることであろう。例えば、AMOは、プロセッサ・ストアまたはロード命令の変形とすることができる。   Another advantage would be that the memory system can implement bit arrays using new atomic memory operations that go beyond traditional atomic memory operations. For example, the AMO can be a variation of a processor store or load instruction.

要求される操作は、キャッシュ線のアドレスのみを必要とすればよく、ビット配列の要素のアドレスを必要としない。   The requested operation only needs the address of the cache line, not the address of the element of the bit array.

一実施形態によれば、要求は、「最初の0−ビットをフェッチしてセットする」要求を含む。要求を実施するステップは、ビット配列の各ビットをインデックス0から順次読み取るアクションと、値0を有する最初のビットが見つかった場合に、見つかった最初のビットのインデックスを返して、見つかった最初のビットの値を1にセットし、そうでない場合に、事前定義済みの失敗値を返すアクションと、のうちの1つまたは複数を実施するステップを含む。   According to one embodiment, the request includes a “fetch and set first 0-bit” request. The step of performing the request consists of the action of sequentially reading each bit of the bit array from index 0, and if the first bit with value 0 is found, returns the index of the first bit found and the first bit found Performing the action of one or more of: setting the value of to 1 and otherwise returning a predefined failure value.

0−ビットという用語は、値0を有するビットを指す。1−ビットという用語は、値1を有するビットを指す。   The term 0-bit refers to a bit having the value 0. The term 1-bit refers to a bit having the value 1.

E個の要素を含むビット配列の場合、「最初の0−ビットをフェッチしてセットする」要求は、0〜E−1のうちのインデックス値を返す。ビット配列中に0−ビットが存在しない場合は、事前定義済みの失敗値は、有効なインデックスに対応しないものとすることができる。例えば、失敗値は、E、すなわちビット配列のビット数であってよい。   For a bit array containing E elements, a request to “fetch and set first 0-bit” returns an index value from 0 to E-1. If there are no 0-bits in the bit array, the predefined failure value may not correspond to a valid index. For example, the failure value may be E, ie the number of bits in the bit array.

他のビット単位AMOによってキャッシュ線にアクセスすることもできる。例えば、storeAND()のようなビット単位AMOが、128バイト・キャッシュ線内の8バイト・ワードをアドレス指定して修正する。例えば、スレッドが、「最初の0−ビットをフェッチしてセットする」要求を発行して、値0を有する最初のビットのインデックスに対応するリソースを得る。スレッドは、リソースを使用した後、キャッシュ線中の適切なワードに対してstoreAND()操作を発行して、このビットを値0にセットし、したがってリソースを再び利用可能にする。このように、ビット配列を、メモリ・ページ、inode、ディスク・セクタなどの割振りに使用することができる。   The cache line can also be accessed by another bit unit AMO. For example, a bit-wise AMO such as storeAND () addresses and modifies an 8-byte word in a 128-byte cache line. For example, a thread issues a “fetch and set first 0-bit” request to obtain the resource corresponding to the index of the first bit having the value 0. After the thread uses the resource, it issues a storeAND () operation on the appropriate word in the cache line to set this bit to the value 0, thus making the resource available again. In this way, the bit arrangement can be used for allocation of memory pages, inodes, disk sectors, and the like.

一実施形態によれば、要求は、「最後の0−ビットをフェッチしてセットする」要求を含み、ビット配列はE個の要素を含む。要求を実施するステップは、ビット配列の各ビットをインデックスE−1から順次読み取るアクションと、ビット配列の、値0を有する最後のビットが見つかった場合に、最後のビットのインデックスを返して、この最後のビットの値を1にセットし、そうでない場合に、事前定義済みの失敗値を返すアクションと、のうちの1つまたは複数を実施するステップを含む。   According to one embodiment, the request includes a “fetch and set last 0-bit” request and the bit array includes E elements. The step of performing the request returns the action of reading each bit of the bit array sequentially from the index E-1, and if the last bit of the bit array having the value 0 is found, returns the index of the last bit, Performing the action of one or more of setting the value of the last bit to 1 and otherwise returning a predefined failure value.

一実施形態によれば、要求は、「1−ビットをカウントする」要求を含む。要求を実施するステップは、ビット配列の各ビットを読み取るアクションと、値1を有するビットの数をカウントするアクションと、カウントの結果を返すアクションと、のうちの1つまたは複数を実施するステップを含む。例えば、このような要求は、ポピュレーション・カウント要求としても知られる。   According to one embodiment, the request includes a “count 1-bit” request. The step of performing the request includes performing one or more of an action of reading each bit of the bit array, an action of counting the number of bits having a value of 1, and an action of returning the result of the count. Including. For example, such a request is also known as a population count request.

一実施形態によれば、要求は、「孤立した0−ビットをフェッチしてセットする」要求を含む。要求を実施するステップは、ビット配列を読み取って、0値を有するビットの、0個以上の連続的なシーケンスを決定するアクションと、見つかったシーケンスが0個の場合に、事前定義済みの失敗値を返し、そうでない場合に、1つまたは複数の連続的なシーケンスをそれらのビット数に基づいてランク付けし、1つまたは複数の連続的なシーケンスのうちで最小数のビットを有する連続的なシーケンスのビットを選択し、選択されたビットのインデックスを返し、選択されたビットの値を1にセットするアクションと、のうちの1つまたは複数を実施するステップを含む。   According to one embodiment, the request includes a “fetch and set orphaned 0-bit” request. The step of performing the request is to read the bit array and determine an action sequence to determine zero or more consecutive sequences of bits having a zero value, and a predefined failure value if zero sequences are found. , Otherwise rank one or more consecutive sequences based on their number of bits, and have the least number of bits in one or more consecutive sequences Selecting a bit of the sequence, returning an index of the selected bit, setting the value of the selected bit to 1 and performing one or more of the following.

これは、他の同時操作によって使用されるかもしれない可能な最長の0の連続を保存することができるので、有利であろう。これは、ビット配列が、メモリ・ページやディスク・ブロックなど、何らかのリソースの連続的なインスタンスを表すときに、有利であろう。この場合、0の連続を保存することで、何らかの将来のリソース獲得のために連続的な利用可能なリソースが保存される。このような将来の獲得では、「N個の連続的な0−ビットをフェッチしてセットする」要求をビット配列に対して使用することができる。   This may be advantageous because it can store the longest possible zero sequence that may be used by other concurrent operations. This may be advantageous when the bit array represents a continuous instance of some resource, such as a memory page or disk block. In this case, by saving a sequence of zeros, a continuously available resource is saved for some future resource acquisition. In such future acquisitions, a request to "fetch and set N consecutive 0-bits" can be used for the bit array.

一実施形態によれば、要求は、「最初の1−ビットをフェッチする」要求を含む。要求を実施するステップは、ビット配列の各ビットをインデックス0から順次読み取るアクションと、値1を有する最初のビットが見つかった場合に、見つかった最初のビットのインデックスを返し、そうでない場合に、事前定義済みの失敗値を返すアクションと、のうちの1つまたは複数を実施するステップを含む。例えば、「最初の1−ビットをフェッチする」要求を使用して、ビット配列に基づく優先キュー中で優先順位の最も高い要素を識別することができる。   According to one embodiment, the request includes a “fetch the first 1-bit” request. The step of performing the request returns the action of reading each bit of the bit array sequentially from index 0, and if the first bit with the value 1 is found, returns the index of the first bit found; Performing one or more of an action that returns a predefined failure value. For example, a “fetch the first 1-bit” request can be used to identify the highest priority element in a priority queue based on bit ordering.

一実施形態によれば、要求は、「最初の1−ビットをフェッチしてクリアする」要求を含む。要求を実施するステップは、ビット配列の各ビットをインデックス0から順次読み取るアクションと、値1を有する最初のビットが見つかった場合に、見つかった最初のビットのインデックスを返して、見つかった最初のビットの値を0にセットし、そうでない場合に、事前定義済みの失敗値を返すアクションと、のうちの1つまたは複数を実施するステップを含む。例えば、「最初の1−ビットをフェッチしてクリアする」要求を使用して、ビット配列に基づく優先キュー中で優先順位の最も高い要素を識別して除去することができる。   According to one embodiment, the request includes a “fetch and clear first 1-bit” request. The step of performing the request consists of the action of sequentially reading each bit of the bit array from index 0 and, if the first bit with value 1 is found, returns the index of the first bit found and the first bit found Performing the action of one or more of: setting the value of to zero and otherwise returning a predefined failure value. For example, a request to “fetch and clear the first 1-bit” can be used to identify and remove the highest priority element in the priority queue based on the bit array.

一実施形態によれば、要求は、「最後の1−ビットをフェッチしてクリアする」要求を含み、ビット配列はE個の要素を含む。要求を実施するステップは、ビット配列の各ビットをインデックスE−1から順次読み取るアクションと、ビット配列の、値1を有する最後のビットが見つかった場合に、最後のビットのインデックスを返して、最後のビットの値を0にセットし、そうでない場合に、事前定義済みの失敗値を返すアクションと、のうちの1つまたは複数を実施するステップを含む。例えば、「最後の1−ビットをフェッチしてクリアする」要求を使用して、ビット配列に基づく優先キュー中で優先順位の最も低い要素を識別して除去することができる。   According to one embodiment, the request includes a “fetch and clear last 1-bit” request and the bit array includes E elements. The step of performing the request includes the action of sequentially reading each bit of the bit array from the index E-1, and if the last bit of the bit array having the value 1 is found, returns the index of the last bit and Performing one or more of the following actions: setting the value of a bit of the to zero to zero, otherwise returning a predefined failure value. For example, a “fetch the last 1-bit and clear” request can be used to identify and remove the lowest priority element in the priority queue based on the bit array.

一実施形態によれば、要求は、「N番目の1−ビットをフェッチする」要求を含み、要求は、Nの値を提供する。要求を実施するステップは、ビット配列の各ビットをインデックス0から順次読み取るアクションと、値1を有するビットのN番目の発生が見つかった場合に、見つかったN番目の1−ビットのインデックスを返し、そうでない場合に、事前定義済みの失敗値を返すアクションと、のうちの1つまたは複数を実施するステップを含む。例えば、要求がNに対して値1を提供する場合は、要求は、「最初の1−ビットをフェッチする」要求と等価である。例えば、4つのスレッドがあるシナリオでは、「N番目の1−ビットをフェッチする」要求により、各スレッドが、優先キュー中の4つの上位要素の1つを識別することができる。   According to one embodiment, the request includes a “fetch the Nth 1-bit” request, and the request provides a value of N. The step of performing the request returns the action of reading each bit of the bit array sequentially from index 0 and the Nth 1-bit index found if the Nth occurrence of a bit having value 1 is found; If not, it includes the step of performing one or more of an action that returns a predefined failure value. For example, if the request provides a value of 1 for N, the request is equivalent to a “fetch the first 1-bit” request. For example, in a scenario where there are four threads, a request to “fetch the Nth 1-bit” allows each thread to identify one of the four upper elements in the priority queue.

一実施形態によれば、要求は、「N番目の1−ビットをフェッチしてクリアする」要求を含み、要求は、Nの値を提供する。要求を実施するステップは、ビット配列の各ビットをインデックス0から順次読み取るアクションと、値1を有するビットのN番目の発生が見つかった場合に、見つかったN番目の1−ビットのインデックスを返して、見つかったビットの値を0にセットし、そうでない場合に、事前定義済みの失敗値を返すアクションと、のうちの1つまたは複数を実施するステップを含む。例えば、性能の異なる2つのスレッドが優先キュー中の要素を処理する場合、速いスレッドおよび遅いスレッドが、Nに対して値1および2をそれぞれ提供すれば、アプリケーション性能目標が最もよく満たされるであろう。   According to one embodiment, the request includes a “fetch and clear Nth 1-bit” request, and the request provides a value of N. The step of performing the request returns the action of reading each bit of the bit array sequentially from index 0 and the Nth 1-bit index found if the Nth occurrence of a bit having the value 1 is found. Performing one or more of the following actions: setting the value of the found bit to 0, otherwise returning a predefined failure value. For example, if two threads with different performance process elements in the priority queue, the application performance goal is best met if the fast and slow threads provide values 1 and 2 for N, respectively. Let's go.

一実施形態によれば、要求は、「孤立した1−ビットをフェッチしてクリアする」要求を含む。要求を実施するステップは、ビット配列を読み取って、1の値を有するビットの、0個以上の連続的なシーケンス決定するアクションと、見つかったシーケンスが0個の場合に、事前定義済みの失敗値を返し、そうでない場合に、1つまたは複数の連続的なシーケンスをそれらのビット数に基づいてランク付けし、最小数のビットを有する連続的なシーケンスのビットを選択し、選択されたビットのインデックスを返し、選択されたビットの値を0にセットするアクションと、のうちの1つまたは複数を実施するステップを含む。   According to one embodiment, the request includes a “fetch and clear isolated 1-bit” request. The step of performing the request is to read the bit array and determine an action of determining zero or more consecutive sequences of bits having a value of 1 and a predefined failure value if no sequence is found. Otherwise, rank one or more consecutive sequences based on their number of bits, select the bits of the consecutive sequence with the least number of bits, and Returning the index and setting the value of the selected bit to 0 and performing one or more of the following.

一実施形態によれば、要求は、「N個の連続的な0−ビットをフェッチしてセットする」要求を含む。要求を実施するステップは、ビット配列を読み取って、0の値を有するN個のビットの、0個以上の連続的なシーケンスを決定するアクションと、見つかったシーケンスが0個の場合に、事前定義済みの失敗値を返し、そうでない場合に、1つまたは複数の連続的なシーケンスのうちで事前定義済みの条件を満たすシーケンスを選択し、選択されたシーケンスの最初のビットのインデックスを返し、選択されたN個のビットを値1にセットするアクションと、のうちの1つまたは複数を実施するステップを含む。   According to one embodiment, the request includes a “fetch and set N consecutive 0-bits” request. The step of performing the request is to read the bit array and predetermine if the action to determine zero or more consecutive sequences of N bits having a value of zero and if no sequences are found. Select a sequence that satisfies a predefined condition among one or more consecutive sequences, return the index of the first bit of the selected sequence, and select Setting the set N bits to a value of 1 and performing one or more of the steps.

これは、例えば、スレッドがN個のリソースのシーケンスの所有権を原子的に獲得するのを可能にすることができる。ビット配列中にN個の連続的な0−ビットが存在しない場合は、事前定義済みの失敗値が返されてよい。このようなリソース・シーケンスは、メモリ・ページ、inode、ディスク・セクタなどの割振りの際に使用することができる。   This can, for example, allow a thread to atomically take ownership of a sequence of N resources. If N consecutive 0-bits are not present in the bit array, a predefined failure value may be returned. Such a resource sequence can be used when allocating memory pages, inodes, disk sectors, and the like.

一実施形態によれば、事前定義済みの条件は、シーケンスがビット配列の最初のN個の連続的なビットを含むこと、を含む。一実施形態によれば、ビット配列を循環バッファとして扱うことができ、したがって、N個のビットの連続的なシーケンスは、ビット配列の始めの連続的なシーケンスと、ビット配列の終わりの連続的なシーケンスとからなるものとすることができる。   According to one embodiment, the predefined condition includes that the sequence includes the first N consecutive bits of the bit array. According to one embodiment, the bit array can be treated as a circular buffer, so that a continuous sequence of N bits is a continuous sequence at the beginning of the bit array and a continuous sequence at the end of the bit array. And a sequence.

一実施形態によれば、要求は、「N個の指定された0−ビットをフェッチしてセットする」要求を含む。要求を実施するステップは、ビット配列を読み取って、指定されたインデックスにある指定されたビットを突き止めるアクションと、指定されたビットの少なくとも1つのビットが値1を有する場合に、事前定義済みの失敗値を返すアクションと、指定されたビットの各々が値0を有する場合に、指定された各ビットを値1にセットして、事前定義済みの成功値を返すアクションと、のうちの1つまたは複数を実施するステップを含む。これは、スレッドが複数のロックを原子的に得るのを可能にすることができる。   According to one embodiment, the request includes a “fetch and set N specified 0-bits” request. The step of executing the request is to read the bit array to locate the specified bit at the specified index, and a predefined failure if at least one bit of the specified bit has the value 1. One of an action that returns a value and an action that sets each specified bit to a value 1 and returns a predefined success value if each of the specified bits has a value of 0, or Performing a plurality of steps. This can allow a thread to obtain multiple locks atomically.

「N個の指定された0−ビットをフェッチしてセットする」要求では、要求の中の1つまたは複数の値が、要求される0−ビットのインデックスを効率的に指定することができる。例えば、256個までの要素を含むビット配列の場合、要求は8バイト値を提供することができ、8バイトの各々はビット・インデックスを指定する。8ビット未満を指定するには、バイトのいくつかは同じインデックスを指定する。言い換えれば、S個の0−ビットを指定するには、8バイトは、S個の固有のインデックスを指定する。例えば、1024個までの要素を有するビット配列の場合、要求は64ビット値を提供することができ、最下位の60ビットは、それぞれ10ビットの6つのフィールドとして扱われ、6つのフィールドの各々はビット・インデックスを指定する。   In a “fetch and set N specified 0-bits” request, one or more values in the request can efficiently specify the required 0-bit index. For example, for a bit array containing up to 256 elements, the request can provide an 8-byte value, each of which specifies a bit index. To specify less than 8 bits, some of the bytes specify the same index. In other words, to specify S 0-bits, 8 bytes specify S unique indexes. For example, for a bit array with up to 1024 elements, the request can provide a 64-bit value, with the least significant 60 bits treated as 6 fields of 10 bits each, each of the 6 fields being Specifies the bit index.

本発明の「指定されたN個の0−ビットをフェッチしてセットする」要求は、各プロセスまたはスレッドがロックの共有セットからの複数のロックを保持しなければならない場合の、細分性ロッキング(granular locking)の問題に対処する。この場合、セット中のロックの数は、ビット配列中のビットの数Eまでであり、セット中の各ロックには、0〜E−1の番号が付いているものとすることができる。本発明がなければ、細分性ロッキングは、微妙なロック依存性を生み出す可能性がある。この微妙さは、プログラマが知らずにデッドロックを導入することになる機会を増大させる可能性がある。したがって、本発明がなければ、ロックは、比較的入念な(オーバヘッド)ソフトウェア・サポートと、アプリケーション・プログラミングが厳格な約定を完全に厳守することとによってのみ、構成可能である(例えば、原子的にアイテムXをテーブルAから削除してXをテーブルBに挿入するために、複数の同時ロックを管理する)。   The “fetch and set designated N 0-bits” request of the present invention allows granular locking (where each process or thread must hold multiple locks from a shared set of locks). Address the issue of granular locking. In this case, the number of locks in the set is up to the number E of bits in the bit array, and each lock in the set can be numbered from 0 to E-1. Without the present invention, granular locking can create subtle lock dependencies. This subtlety can increase the opportunity for programmers to introduce deadlocks without their knowledge. Thus, in the absence of the present invention, locks can only be configured with relatively careful software support and full adherence to strict commitments by application programming (eg, atomically Managing multiple simultaneous locks to delete item X from table A and insert X into table B).

それぞれロックされるべき、セットのオブジェクトの数がEよりも多い場合は、各オブジェクトを0とE−1との間の数にハッシュして、より粗いロック細分性の性能コストでビット配列の使用を可能にすることができる。   If there are more than E objects in the set, each to be locked, hash each object to a number between 0 and E-1, and use the bit array at the performance cost of coarser lock granularity Can be made possible.

例えば、ビット配列は、メモリ・システムの2つ以上のキャッシュ線中で実装されてよく、2つ以上のキャッシュ線は、隣接するキャッシュ線である。ビット配列に対する操作の要求は、2つ以上の隣接するキャッシュ線と、メモリ・システム中における2つ以上のキャッシュ線のうちの第1のキャッシュ線の場所とを示すことができる。   For example, the bit arrangement may be implemented in two or more cache lines of a memory system, where two or more cache lines are adjacent cache lines. A request for an operation on the bit array can indicate two or more adjacent cache lines and the location of the first of the two or more cache lines in the memory system.

別の態様では、本発明は、前述の実施形態のうちのいずれか1つの方法の方法ステップを実施するためのコンピュータ実行可能命令を含むコンピュータ・プログラム製品に関する。   In another aspect, the present invention relates to a computer program product comprising computer executable instructions for performing the method steps of any one of the preceding embodiments.

別の態様では、本発明は、キャッシュ線中でビット配列を実装するためのシステムに関し、このシステムは、メモリ・ストレージおよびコントローラを備える。このシステムは、キャッシュ線中でビット配列を構成するように構成され、ビット配列はビットの配列を含み、構成することはさらに、ビット配列中の各ビットの値を定義することを含む。このシステムはまた、コントローラによってビット配列に対する操作の要求を受け取るように構成され、要求は、メモリ・ストレージ中におけるキャッシュ線の場所と、要求を指定する情報とを示す。このシステムはまた、この情報を使用して、ビット配列に対する1つまたは複数のアクションを操作について識別するように構成され、1つまたは複数のアクションは、コントローラ中でエンコードされる。このシステムはまた、要求を受け取るのに応答して、1つまたは複数のエンコードされたアクションを実行することによって要求を実施するように構成される。   In another aspect, the invention relates to a system for implementing a bit array in a cache line, the system comprising a memory storage and a controller. The system is configured to configure a bit array in the cache line, the bit array including an array of bits, and further including defining a value for each bit in the bit array. The system is also configured to receive a request for an operation on a bit array by a controller, the request indicating a cache line location in memory storage and information specifying the request. The system is also configured to use this information to identify one or more actions on the bit array for operation, and the one or more actions are encoded in the controller. The system is also configured to implement the request by performing one or more encoded actions in response to receiving the request.

メモリ・システムは、キャッシュ階層中のレベルであってよく、したがって、コントローラが要求を実施すると、その結果、キャッシュ階層中のより低いレベルへのメモリ・システム・アクセスとなり、それによりメタデータおよび要素がメモリ・キャッシュ中で確立されるものとすることができる。メモリ・システムは2つ以上の部分に分離していてよく、ある部分におけるコントローラが、その部分におけるメモリを使用して動的配列データ構造を操作することができる。キャッシュ・レベルは2つ以上のユニットとして複製されてよく、コントローラは、キャッシュ・ユニット内の、基礎をなすキャッシュまたはメモリ・レベルの任意の部分にアクセスすることができる。   The memory system may be at a level in the cache hierarchy, so when a controller fulfills a request, the result is a memory system access to a lower level in the cache hierarchy, so that metadata and elements are It can be established in a memory cache. The memory system may be separated into two or more parts, and a controller in one part can use the memory in that part to manipulate the dynamic array data structure. The cache level may be replicated as two or more units, and the controller can access any portion of the underlying cache or memory level within the cache unit.

本明細書において使用されるように、「コンピュータ可読ストレージ媒体」は、コンピューティング・デバイスのプロセッサによって実行可能な命令を記憶できる任意の有形ストレージ媒体を包含する。コンピュータ可読ストレージ媒体は、コンピュータ可読の非一時的なストレージ媒体と呼ばれる場合がある。コンピュータ可読ストレージ媒体はまた、有形のコンピュータ可読媒体と呼ばれる場合もある。いくつかの実施形態では、コンピュータ可読ストレージ媒体はまた、コンピューティング・デバイスのプロセッサによってアクセス可能なデータを記憶することが可能であってよい。コンピュータ可読ストレージ媒体の例は、以下のものに限定されないが、フロッピー(R)・ディスク、磁気ハード・ディスク・ドライブ、固体ハード・ディスク、フラッシュ・メモリ、USBサム・ドライブ、ランダム・アクセス・メモリ(RAM)、読取専用メモリ(ROM)、光ディスク、光磁気ディスク、および、プロセッサのレジスタ・ファイルを含む。光ディスクの例は、コンパクト・ディスク(CD)およびディジタル多用途ディスク(DVD)、例えば、CD−ROM、CD−RW、CD−R、DVD−ROM、DVD−RW、またはDVD−Rディスクを含む。コンピュータ可読ストレージ媒体という用語はまた、ネットワークまたは通信リンクを介してコンピュータによってアクセス可能な様々なタイプの記録媒体を指す。例えば、モデム、インターネット、またはローカル・エリア・ネットワークを介して、データを取り出すことができる。コンピュータ可読媒体に組み入れられたコンピュータ実行可能コードは、以下のものに限定されないが、ワイヤレス、ワイヤ線、光ファイバ・ケーブル、RFなど、またはこれらの任意の適切な組合せを含めた、任意の適切な媒体を使用して送信することができる。   As used herein, a “computer-readable storage medium” includes any tangible storage medium that can store instructions executable by a processor of a computing device. A computer-readable storage medium may be referred to as a computer-readable non-transitory storage medium. A computer-readable storage medium may also be referred to as a tangible computer-readable medium. In some embodiments, the computer readable storage medium may also be capable of storing data accessible by the processor of the computing device. Examples of computer readable storage media include, but are not limited to, floppy disk, magnetic hard disk drive, solid state hard disk, flash memory, USB thumb drive, random access memory ( RAM), read only memory (ROM), optical disk, magneto-optical disk, and processor register file. Examples of optical disks include compact disks (CD) and digital versatile disks (DVD), such as CD-ROM, CD-RW, CD-R, DVD-ROM, DVD-RW, or DVD-R disk. The term computer readable storage medium also refers to various types of recording media that are accessible by a computer over a network or communication link. For example, data can be retrieved via a modem, the Internet, or a local area network. Computer-executable code incorporated in a computer-readable medium is any suitable including, but not limited to, wireless, wireline, fiber optic cable, RF, etc., or any suitable combination thereof. It can be transmitted using a medium.

コンピュータ可読信号媒体は、例えばベースバンド中でまたは搬送波の一部として、コンピュータ実行可能コードが組み入れられた、伝搬データ信号を含むことができる。このような伝搬信号は、以下のものに限定されないが、電磁、光学、またはこれらの任意の適切な組合せを含めた、様々な形のいずれかをとることができる。コンピュータ可読信号媒体は、コンピュータ可読ストレージ媒体でない任意のコンピュータ可読媒体であって、命令実行システム、装置、またはデバイスによって使用されるプログラムまたはそれらに関連して使用されるプログラムを通信、伝搬、または搬送できる任意のコンピュータ可読媒体とすることができる。   A computer-readable signal medium may include a propagated data signal with computer-executable code incorporated therein, such as in baseband or as part of a carrier wave. Such propagated signals can take any of a variety of forms including, but not limited to, electromagnetic, optical, or any suitable combination thereof. A computer readable signal medium is any computer readable medium that is not a computer readable storage medium, and communicates, propagates or conveys a program used by or in connection with an instruction execution system, apparatus or device. Any computer-readable medium capable.

「コンピュータ・メモリ」または「メモリ」は、コンピュータ可読ストレージ媒体の例である。コンピュータ・メモリは、プロセッサから直接にアクセス可能な任意のメモリである。「コンピュータ・ストレージ」または「ストレージ」は、コンピュータ可読ストレージ媒体のさらに他の例である。コンピュータ・ストレージは、任意の不揮発性コンピュータ可読ストレージ媒体である。いくつかの実施形態では、コンピュータ・ストレージはコンピュータ・メモリでもある場合があり、またはその逆の場合もある。   “Computer memory” or “memory” is an example of computer-readable storage media. Computer memory is any memory that is directly accessible from the processor. “Computer storage” or “storage” is yet another example of a computer-readable storage medium. Computer storage is any non-volatile computer readable storage medium. In some embodiments, the computer storage may also be computer memory or vice versa.

本明細書において、「プロセッサ」は、プログラムまたは機械実行可能命令またはコンピュータ実行可能コードを実行できる、電子コンポーネントを包含する。「プロセッサ」を備えるコンピューティング・デバイスに言及する場合、これは、複数のプロセッサまたは処理コアを備える可能性があると解釈されるべきである。プロセッサは、例えば、マルチコア・プロセッサとすることができる。プロセッサはまた、単一のコンピュータ・システム内にあるかまたは複数のコンピュータ・システム間で分散された、プロセッサの集合を指す場合がある。コンピューティング・デバイスという用語もまた、1つまたは複数のプロセッサをそれぞれが備える複数のコンピューティング・デバイスの集合またはネットワークを指す可能性があると解釈されるべきである。コンピュータ実行可能コードは、同じコンピューティング・デバイス内にある場合のある、さらには複数のコンピューティング・デバイスにわたって分散されている場合のある、複数のプロセッサによって実行されることがある。   As used herein, “processor” includes electronic components capable of executing programs or machine-executable instructions or computer-executable code. When referring to a computing device comprising a “processor”, this should be interpreted as possibly comprising multiple processors or processing cores. The processor can be, for example, a multi-core processor. A processor may also refer to a collection of processors within a single computer system or distributed among multiple computer systems. The term computing device should also be construed to refer to a collection or network of computing devices, each comprising one or more processors. Computer-executable code may be executed by multiple processors, which may be within the same computing device or even distributed across multiple computing devices.

コンピュータ実行可能コードは、本発明の一態様をプロセッサに実施させる機械実行可能命令またはプログラムを含むことができる。本発明の態様に関する動作を行うためのコンピュータ実行可能コードは、Java(R)、Smalltalk(R)、C++などのオブジェクト指向プログラミング言語、および、「C」プログラミング言語や類似のプログラミング言語などの従来の手続き型プログラミング言語を含めた、1つまたは複数のプログラミング言語の任意の組合せで書かれて、機械実行可能命令にコンパイルされてよい。いくつかの事例では、コンピュータ実行可能コードは、高水準言語の形であるかまたは事前コンパイルされた形であるものとすることができ、機械実行可能命令をオンザフライで生成するインタープリタと共に使用されてよい。   Computer-executable code may include machine-executable instructions or programs that cause a processor to implement an aspect of the present invention. Computer-executable code for performing operations relating to aspects of the present invention includes conventional object-oriented programming languages such as Java®, Smalltalk®, C ++, and the like, such as “C” programming language and similar programming languages. It may be written in any combination of one or more programming languages, including procedural programming languages, and compiled into machine-executable instructions. In some cases, the computer-executable code may be in the form of a high-level language or in a pre-compiled form and may be used with an interpreter that generates machine-executable instructions on the fly. .

コンピュータ実行可能コードは、完全にユーザのコンピュータ上で実行されるか、スタンドアロン・ソフトウェア・パッケージとして部分的にユーザのコンピュータ上で実行されるか、部分的にユーザのコンピュータ上で実行され部分的にリモート・コンピュータ上で実行されるか、または完全にリモート・コンピュータもしくはサーバ上で実行される場合がある。後者のシナリオでは、リモート・コンピュータは、ローカル・エリア・ネットワーク(LAN)もしくはワイド・エリア・ネットワーク(WAN)を含めた任意のタイプのネットワークを介してユーザのコンピュータに接続されてもよく、または、接続は、外部コンピュータに対して(例えば、インターネット・サービス・プロバイダを使用してインターネットを介して)行われてもよい。   The computer executable code may be executed entirely on the user's computer, partially as a stand-alone software package, partially executed on the user's computer, or partially executed on the user's computer and partially It may be executed on a remote computer or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or The connection may be made to an external computer (eg, via the internet using an internet service provider).

本発明の実施形態による方法、装置(システム)、およびコンピュータ・プログラム製品の、フローチャート、説明、またはブロック図、あるいはそれらの全てに関して、本発明の態様を述べる。適切なときは、フローチャート、説明、またはブロック図、あるいはそれらの全ての、各ブロック、またはブロックの一部を、コンピュータ実行可能コードの形のコンピュータ・プログラム命令によって実装できることは理解されるであろう。さらに、相互排他的でないときは、異なるフローチャート、説明、またはブロック図、あるいはそれらの全ての中のブロックを組み合わせてもよいことも理解されたい。これらのコンピュータ・プログラム命令は、コンピュータまたは他のプログラム可能データ処理装置のプロセッサを介して実行される命令が、フローチャートまたはブロック図あるいはその両方の1つまたは複数のブロック中で指定される機能/行為を実装するための手段をもたらすように、汎用コンピュータ、専用コンピュータ、または他のプログラム可能データ処理装置のプロセッサに提供されて、マシンを生み出すことができる。   Aspects of the invention are described with reference to flowchart illustrations, block diagrams, or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be appreciated that where appropriate, the flowcharts, descriptions, or block diagrams, or all of them, each block, or portion of a block, can be implemented by computer program instructions in the form of computer-executable code. . Further, it should be understood that when not mutually exclusive, different flowcharts, descriptions, or block diagrams, or blocks within all of them may be combined. These computer program instructions are functions / acts in which instructions executed via a processor of a computer or other programmable data processing device are specified in one or more blocks of a flowchart and / or block diagram. Can be provided to the processor of a general purpose computer, special purpose computer, or other programmable data processing device to create a machine.

これらのコンピュータ・プログラム命令はまた、コンピュータ可読媒体に記憶された命令が、フローチャートまたはブロック図あるいはその両方の1つまたは複数のブロック中で指定される機能/行為を実装する命令を含む製造品を生み出すように、コンピュータ可読媒体に記憶され、コンピュータ、他のプログラム可能データ処理装置、または他のデバイスに、特定の方式で機能するよう指示することができる。   These computer program instructions also include an article of manufacture in which instructions stored on a computer readable medium implement instructions / functions specified in one or more blocks of a flowchart and / or block diagram. As created, it can be stored on a computer readable medium and directed to a computer, other programmable data processing device, or other device to function in a particular manner.

コンピュータ・プログラム命令はまた、コンピュータまたは他のプログラム可能装置上で実行される命令が、フローチャートまたはブロック図あるいはその両方の1つまたは複数のブロック中で指定される機能/行為を実装するためのプロセスを提供するように、コンピュータ実装プロセスを生み出すべく、コンピュータ、他のプログラム可能データ処理装置、または他のデバイスにロードされ、コンピュータ、他のプログラム可能装置、または他のデバイス上で一連の動作ステップを実施させることができる。   A computer program instruction is also a process for implementing functions / acts in which instructions executed on a computer or other programmable device are specified in one or more blocks of a flowchart and / or block diagram. To produce a computer-implemented process, loaded into a computer, other programmable data processing device, or other device and having a series of operational steps on the computer, other programmable device, or other device Can be implemented.

当業者には理解されるであろうが、本発明の態様は、装置、方法、またはコンピュータ・プログラム製品として具現化することができる。したがって、本発明の態様は、完全にハードウェアの実施形態、完全にソフトウェアの実施形態(ファームウェア、常駐ソフトウェア、マイクロコードなどを含む)、または、ソフトウェアとハードウェアの態様を組み合わせた実施形態の形をとることができ、これらは全て、本明細書では「回路」、「モジュール」、または「システム」と一般に呼ばれる場合がある。さらに、本発明の態様は、コンピュータ実行可能コードを組み入れた1つまたは複数のコンピュータ可読媒体において具現化されるコンピュータ・プログラム製品の形をとることもできる。   As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as an apparatus, method, or computer program product. Accordingly, aspects of the present invention may be in the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, microcode, etc.), or an embodiment combining software and hardware aspects. All of which may be generally referred to herein as “circuits”, “modules”, or “systems”. Furthermore, aspects of the invention may take the form of a computer program product embodied in one or more computer readable media incorporating computer executable code.

前述の実施形態の1つまたは複数は、組み合わせられた実施形態が相互排他的でない限り、組み合わせることができることを理解されたい。   It should be understood that one or more of the foregoing embodiments can be combined as long as the combined embodiments are not mutually exclusive.

以下、図面を参照しながら、本発明の好ましい実施形態について、単なる例としてより詳細に述べる。   Hereinafter, preferred embodiments of the present invention will be described in more detail by way of example only with reference to the drawings.

メモリ中のキャッシュ線中でビット配列を実装するための方法を実行するように動作可能なシステム・アーキテクチャを示す図である。FIG. 2 illustrates a system architecture operable to perform a method for implementing a bit array in a cache line in a memory. メモリ・システムの例示的なブロック図である。1 is an exemplary block diagram of a memory system. ビット配列に対する操作のシーケンスを示す図である。It is a figure which shows the sequence of operation with respect to a bit arrangement | sequence. メモリ中のキャッシュ線中でビット配列を実装するための方法のフローチャートである。3 is a flowchart of a method for implementing a bit array in a cache line in a memory.

以下では、図中で同様の番号が付された要素は、同様の要素を示すか、または等価な機能を実施する要素を示すかのいずれかである。機能が等価である場合、前に論じられた要素が必ずしも後の図でも論じられるとは限らない。   In the following, like-numbered elements in the figures either indicate similar elements or elements that perform equivalent functions. Where functions are equivalent, previously discussed elements are not necessarily discussed in later figures.

図1に、コンピューティング・システム100中のコンピュータ・システム(またはサーバ)112が、汎用コンピューティング・デバイスの形で示されている。コンピュータ・システム112のコンポーネントは、以下のものに限定されないが、1つまたは複数のプロセッサまたは処理ユニット116と、メモリ・システム128と、メモリ・システム128を含めた様々なシステム・コンポーネントをプロセッサ116に結合するバス118とを含むことができる。   In FIG. 1, a computer system (or server) 112 in computing system 100 is shown in the form of a general purpose computing device. The components of computer system 112 are not limited to the following, but include one or more processors or processing units 116, memory system 128, and various system components including memory system 128 to processor 116. And a bus 118 to be coupled.

コンピュータ・システム112は通常、様々なコンピュータ・システム可読媒体を備える。このような媒体は、コンピュータ・システム112によってアクセス可能な任意の利用可能な媒体とすることができ、揮発性と不揮発性の媒体、取外し可能と非取外し可能の媒体の両方を含む。   Computer system 112 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer system 112 and includes both volatile and non-volatile media, removable and non-removable media.

メモリ・システム128は、ランダム・アクセス・メモリ(RAM)またはキャッシュ・メモリあるいはその両方など、揮発性メモリの形のコンピュータ・システム可読媒体を含むことができる。メモリ・システムは、1つまたは複数のアクティブ・バッファ付きメモリ・デバイスを含むことができる。アクティブ・バッファ付きデバイスは、複数のメモリ要素(例えばチップ)を備えることができる。アクティブ・バッファ付きメモリ・デバイスは、3次元(「3D」)メモリ・デバイスを形成するメモリの層を含むことができ、この場合、チップの個々の列が、処理ユニット116と通信するヴォールト(vault)を形成する。アクティブ・バッファ付きメモリ・デバイスは、複数の処理要素によって同時にアクセスできる区分を含むことができ、これらの区分は、ヴォールトを含めた(ただしこれに限定されない)、任意の適切なメモリ・セグメントとすることができる。   The memory system 128 may include a computer system readable medium in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The memory system can include one or more active buffered memory devices. An active buffered device may comprise multiple memory elements (eg, chips). An active buffered memory device may include layers of memory that form a three-dimensional (“3D”) memory device, where individual columns of chips communicate with a vault. ). An active buffered memory device can include partitions that can be accessed simultaneously by multiple processing elements, and these partitions can be any suitable memory segment, including but not limited to a vault. be able to.

処理ユニット116は、アプリケーションを実装するために、動的配列データ構造および関連するメタデータを利用して、メモリ・システムに要求を発行することができる。   The processing unit 116 can issue requests to the memory system utilizing the dynamic array data structure and associated metadata to implement the application.

コンピュータ・システム112はまた、キーボード、ポインティング・デバイス、ディスプレイ124など、1つもしくは複数の外部デバイス114;ユーザがコンピュータ・システム112と対話できるようにする1つもしくは複数のデバイス;または、コンピュータ・システム112が1つもしくは複数の他のコンピューティング・デバイスと通信できるようにする任意のデバイス(例えば、ネットワーク・カード、モデムなど)、あるはそれらの全てと、通信することができる。このような通信は、I/Oインタフェース122を介して行うことができる。さらに、コンピュータ・システム112は、ローカル・エリア・ネットワーク(LAN)、一般ワイド・エリア・ネットワーク(WAN)、または公衆ネットワーク(例えばインターネット)、あるいはそれらの全てなど、1つまたは複数のネットワークと、ネットワーク・アダプタ120を介して通信することができる。図示のように、ネットワーク・アダプタ120は、バス118を介して、コンピュータ・システム/サーバ112の他のコンポーネントと通信する。   The computer system 112 may also include one or more external devices 114, such as a keyboard, pointing device, display 124; one or more devices that allow a user to interact with the computer system 112; or the computer system Any device that enables 112 to communicate with one or more other computing devices (eg, a network card, modem, etc.) or all of them can be communicated. Such communication can be performed via the I / O interface 122. Further, the computer system 112 may include one or more networks, such as a local area network (LAN), a general wide area network (WAN), a public network (eg, the Internet), or all of them, and a network It can communicate via the adapter 120. As shown, network adapter 120 communicates with other components of computer system / server 112 via bus 118.

図2に、メモリ・システム128の例示的なブロック図を詳細に示す。メモリ・システム128は、コントローラ206およびメモリ・ストレージ208を備える。メモリ・ストレージ208は、例えば、キャッシュまたはランダム・アクセス・メモリ(RAM)など、任意の適切な物理メモリとすることができる。   FIG. 2 shows an exemplary block diagram of the memory system 128 in detail. The memory system 128 includes a controller 206 and a memory storage 208. The memory storage 208 may be any suitable physical memory, such as, for example, a cache or random access memory (RAM).

コントローラ206は、バス118と通信するように構成された、要求210の受信機214、および返答212の送信機216を備え、受信機214および送信機216はそれぞれ、先入れ先出しバッファを備える。コントローラ206は、要求210に応答して、ストレージ208へのリード・アクセスおよびライト・アクセスを実施し、返答212を返すことができる。   The controller 206 includes a receiver 214 for request 210 and a transmitter 216 for reply 212 configured to communicate with the bus 118, each of which includes a first in first out buffer. In response to request 210, controller 206 can perform read and write access to storage 208 and return a response 212.

メモリ・ストレージ208は、1つまたは複数のキャッシュ線211を備える。キャッシュ線211へは、ビット配列としてアクセスすることができ、ビット配列はビット値0または1を含むことができる。ビット配列がキャッシュ線211中で実装されてよく、これは例えば、ビット単位の操作を使用してキャッシュ線の少なくとも一部にアクセスするために、キャッシュ線のこの少なくとも一部を構成することによって、行われる。   The memory storage 208 includes one or more cache lines 211. The cache line 211 can be accessed as a bit array, which can contain a bit value 0 or 1. A bit array may be implemented in the cache line 211, for example by configuring this at least part of the cache line to access at least part of the cache line using bitwise operations, Done.

述べたメモリ・システムの構造は、例えば、要求210など、キャッシュ線にアクセスする要求を複数のスレッドが同時に発行するマルチスレッド化されたアプリケーションで、複数のユーザまたはスレッドがビット配列を利用するための単一のインタフェースを提供することができる。   The described memory system structure is for multi-threaded applications in which multiple threads issue a request to access a cache line, such as request 210, for multiple users or threads to use bit arrays. A single interface can be provided.

ビット配列221に対する操作の要求210は、コントローラ206によって、この操作要求に対応するアクションを実行することで実施される。これらのアクションは、コントローラ中でエンコードされる。   The operation request 210 for the bit array 221 is implemented by the controller 206 executing an action corresponding to the operation request. These actions are encoded in the controller.

要求元またはユーザからの要求210は、コントローラ206の受信機214によってバス118から受け取られる。要求元は、アプリケーションを実行しているスレッド、例えば、AMOを実行しているスレッドとすることができる。要求210は、メモリ中におけるキャッシュ線の場所を示す。   Request 210 from the requestor or user is received from bus 118 by receiver 214 of controller 206. The request source may be a thread executing an application, for example, a thread executing AMO. Request 210 indicates the location of the cache line in memory.

要求210は、ビット配列の全ての要素を0にセットするかまたは全ての要素を1にセットする操作要求など、ビット配列318に対する操作を求める任意の適切な要求とすることができる。これは、ビット配列の初期化を可能にすることができる。要求は、1にセットされたビットの数、最初の1−ビット、中間の1−ビット、または最初の遷移ビット(すなわち、先行0が1に変化するかまたはその逆のとき)を返す操作要求を含むことができる。要求はさらに、最初のブリップ(blip)全体を返してクリアする操作要求を含むことができる。例えば、配列00001101の場合、位置4および長さ2が返され、結果的な配列は00000001となる。中間の1−ビットは、配列中で前後に同数の1−ビットがあるビットを指す。   Request 210 can be any suitable request for an operation on bit array 318, such as an operation request that sets all elements of a bit array to 0 or sets all elements to 1. This can allow initialization of the bit array. The request is an operation request that returns the number of bits set to 1, the first 1-bit, the middle 1-bit, or the first transition bit (ie when leading 0 changes to 1 or vice versa). Can be included. The request may further include an operation request that returns and clears the entire first blip. For example, for array 00001101, position 4 and length 2 are returned, and the resulting array is 00000001. The middle 1-bit indicates a bit having the same number of 1-bits before and after in the array.

通信218で、コントローラ206によって、ビット配列318のビットまたはビット・グループにアクセスすることができ、このアクセスは要求210の中の操作に基づく。要求210が「最初の0−ビットをフェッチする」要求である例では、通信218で読み取られた、値0を有する最初のビットの値が、コントローラ206によって返答212中でユーザに送信される。   In communication 218, a bit or group of bits of bit array 318 can be accessed by controller 206 based on the operation in request 210. In an example where the request 210 is a “fetch first 0-bit” request, the value of the first bit having a value of 0 read in communication 218 is sent by the controller 206 to the user in a reply 212.

図3に、ビット配列(例えば211)に対する操作のシーケンスを説明する図を示す。ビット配列318.1は、固定数のビットを含む。記述を簡単にするために、ビット配列318.1はキャッシュ線の最初の24ビットを含むものとして示す。ビット位置は、行333に示すように、左から右にラベル付けされている。   FIG. 3 shows a diagram for explaining an operation sequence for a bit arrangement (for example, 211). Bit array 318.1 includes a fixed number of bits. For ease of description, bit array 318.1 is shown as including the first 24 bits of the cache line. Bit positions are labeled from left to right as shown in row 333.

操作は、同時要求として、要求されてメモリ・システムのコントローラ(例えば206)によって受け取られてよく、以下のように順次、処理されてよい(例えば1つずつ)。操作の順序は任意とすることができる。   The operations may be requested and received by the memory system controller (eg, 206) as simultaneous requests and may be processed sequentially (eg, one by one) as follows. The order of operations can be arbitrary.

シーケンスの操作301は、ビット配列318.1中で値0を有する最初のビットのインデックスを返してからこのビットを値1にセットするための、fetchAndSetFirst0Bit(cacheLineAddress)に対応する。このために、コントローラ206は、値0を有する最初のビット(すなわちインデックス00)が見つかるまで、ビット配列を、インデックス00を有するビットから順次読み取ることができる。次いで、コントローラは、インデックス00を返すことができる。次に、コントローラは、ビット00の値を1にセットし、この結果、ビット配列318.2となる。   Sequence operation 301 corresponds to fetchAndSetFirst0Bit (cacheLineAddress) to set the bit to value 1 after returning the index of the first bit having value 0 in bit array 318.1. To this end, the controller 206 can sequentially read the bit array from the bit having the index 00 until the first bit having the value 0 (ie, index 00) is found. The controller can then return index 00. Next, the controller sets the value of bit 00 to 1, resulting in bit array 318.2.

シーケンスの操作303もまた、ビット配列318.2中で値0を有する最初のビットのインデックスを返してからこのビットを値1にセットするための、fetchAndSetFirst0Bit(cacheLineAddress)に対応する。このために、コントローラ206は、値0を有する最初のビット(すなわちインデックス03)が見つかるまで、ビット配列を、インデックス00を有するビットから順次読み取ることができる。次いで、コントローラは、インデックス03を返すことができる。次に、コントローラは、ビット00の値を1にセットし、この結果、ビット配列318.3となる。   Sequence operation 303 also corresponds to fetchAndSetFirst0Bit (cacheLineAddress) to return the index of the first bit having value 0 in bit array 318.2 and then set this bit to value 1. To this end, the controller 206 can sequentially read the bit array from the bit having the index 00 until the first bit having the value 0 (ie, index 03) is found. The controller can then return index 03. Next, the controller sets the value of bit 00 to 1, resulting in a bit array 318.3.

シーケンスの操作305は、ビット配列318.3中の連続的な2つの0−ビットの最初のセットの最初のビットのインデックスを返してから、この2つのビットを値1にセットするための、fetchAndSetFirstNcontiguous0Bits(cacheLineAddress,2)に対応する。このために、コントローラ206は、値0をそれぞれが有する最初の連続的な2つのビット(すなわちインデックス06、07)が見つかるまで、ビット配列318.3を、インデックス00を有するビットから順次読み取ることができる。次いで、コントローラは、インデックス06を返すことができ、2つのビット06および07の値を1にセットし、この結果、ビット配列318.4となる。   Sequence operation 305 returns the index of the first bit of the first set of two consecutive 0-bits in bit array 318.3, and then fetchAndSetFirstNcontiguous0Bits to set these two bits to the value 1. Corresponds to (cacheLineAddress, 2). To this end, the controller 206 reads the bit array 318.3 sequentially from the bit having the index 00 until the first two consecutive bits each having the value 0 (ie, index 06, 07) are found. it can. The controller can then return index 06, setting the values of the two bits 06 and 07 to 1, resulting in bit array 318.4.

シーケンスの操作307は、ビット配列318.4中の連続的な4つの0−ビットの最初のセットの最初のビットのインデックスを返してから、この4つのビットを値1にセットするための、fetchAndSetFirstNcontiguous0Bits(cacheLineAddress,4)に対応する。このために、コントローラ206は、値0をそれぞれが有する最初の連続的な4つのビット(すなわちインデックス11〜14)が見つかるまで、ビット配列318.4を、インデックス00を有するビットから順次読み取ることができる。次いで、コントローラは、インデックス11を返すことができ、4つのビット11〜14の値を1にセットし、この結果、ビット配列318.5となる。   Sequence operation 307 returns the index of the first bit of the first set of four consecutive 0-bits in bit array 318.4 and then fetchAndSetFirstNcontiguous0Bits to set these four bits to the value 1. Corresponds to (cacheLineAddress, 4). To this end, the controller 206 reads the bit array 318.4 sequentially from the bit having the index 00 until the first four consecutive bits each having the value 0 (ie, the indices 11-14) are found. it can. The controller can then return index 11 and set the value of the four bits 11-14 to 1, resulting in the bit array 318.5.

シーケンスの操作309は、fetchAndSetNgiven0Bits(cacheLineAddress,3,x04090F)に対応する。第2の引数3は、3つのビットを0から1に変更できることを示す。第3の引数0x040911は、3つの所望のビットのインデックスが0x04、0x09、0x11==17であることを示す。次いで、コントローラは、ビット配列318.5からこれらの3つのビットの各々の値を読み取り、各ビットが値0を有するかどうか判定することができる。コントローラは、1を返して成功を示すことができ、3つのビットの各々の値を1にセットすることができ、この結果、ビット配列318.6となる。   The sequence operation 309 corresponds to fetchAndSetNgiven0Bits (cacheLineAddress, 3, x04090F). The second argument 3 indicates that the three bits can be changed from 0 to 1. The third argument 0x040911 indicates that the indices of the three desired bits are 0x04, 0x09, 0x11 == 17. The controller can then read the value of each of these three bits from the bit array 318.5 and determine whether each bit has the value 0. The controller can return 1 to indicate success, and set the value of each of the three bits to 1, resulting in a bit array 318.6.

シーケンスの操作311は、fetchAndSetNgiven0Bits(cacheLineAddress,2,x0108)に対応する。第2の引数2は、2つのビットを0から1に変更できることを示す。第3の引数0x0108は、2つの所望のビットのインデックス0x01、0x08を示す。次いで、コントローラは、ビット配列318.6からこれらの2つのビットの各々の値を読み取り、各ビットが値0を有するかどうか判定することができる。この場合、2つのビットのうちの一方が値1を有する。コントローラは、ビット配列318.6の内容を変更せずに、事前定義済みの失敗値0を返して要求失敗を示すことができる。   The sequence operation 311 corresponds to fetchAndSetNgiven0Bits (cacheLineAddress, 2, x0108). The second argument 2 indicates that the two bits can be changed from 0 to 1. The third argument 0x0108 indicates two desired bit indices 0x01, 0x08. The controller can then read the value of each of these two bits from the bit array 318.6 and determine whether each bit has the value 0. In this case, one of the two bits has the value 1. The controller can return a predefined failure value 0 to indicate a request failure without changing the contents of the bit array 318.6.

図4は、図1に示すメモリ・システムなどのメモリ・システムを操作して、キャッシュ線中で、例えばメモリ・システム中の単一のキャッシュ線中で、ビット配列を実装するための、例示的な方法およびシステムのフローチャートである。   FIG. 4 is an illustrative example for operating a memory system, such as the memory system shown in FIG. 1, to implement a bit array in a cache line, eg, a single cache line in a memory system. 1 is a flowchart of a method and system.

ステップ401で、キャッシュ線の少なくとも一部にビット配列としてアクセスできるように、キャッシュ線がメモリ中で構成される。例えば、1024個の要素を含むビット配列として、キャッシュ線にアクセスすることができる。   In step 401, the cache line is configured in memory so that at least a portion of the cache line can be accessed as a bit array. For example, the cache line can be accessed as a bit array including 1024 elements.

ステップ403で、ユーザまたは要求元からの、ビット配列に対する操作の要求が、コントローラによって受け取られる。要求210は、操作に関するキャッシュ線のアドレス場所を提供する。要求を発行した要求元は、プロセッサ上で実行されているスレッドや、バッファ付きメモリ・スタックに含まれる処理要素や、ネットワーク・インタフェース・ロジックを経由してネットワークを介して通信するスレッドなど、任意の適切なユーザとすることができる。   In step 403, a request for an operation on the bit array from a user or requester is received by the controller. Request 210 provides the cache line address location for the operation. The requester that issued the request can be any thread, such as a thread running on a processor, a processing element in a buffered memory stack, or a thread communicating over a network via network interface logic. It can be an appropriate user.

ステップ405で、コントローラは、この情報を使用して、ビット配列に対する1つまたは複数のアクションを、操作について識別する。1つまたは複数のアクションは、コントローラ中でエンコードされる。複数のアクションがコントローラ中でエンコードされてよい。1つまたは複数のアクションを識別するステップは、複数のアクションから1つまたは複数のアクションを選択するステップを含むことができる。   At step 405, the controller uses this information to identify one or more actions on the bit array for the operation. One or more actions are encoded in the controller. Multiple actions may be encoded in the controller. Identifying the one or more actions can include selecting one or more actions from the plurality of actions.

ステップ407で、コントローラは、1つまたは複数のアクションを実行して要求を実施する。例えば、要求は、ビット配列中で値0を有する最初のビットのインデックスを返してからこのビットを値1にセットするための、「最初の0−ビットをフェッチしてセットする」要求を含むことができる。   At step 407, the controller performs one or more actions to implement the request. For example, the request may include a “fetch and set first 0-bit” request to return the index of the first bit having the value 0 in the bit array and then set this bit to the value 1. Can do.

図示のように、ステップ407に続いて、コントローラは、次の要求210に応じるために待機し、ブロック403に戻る。   As shown, following step 407, the controller waits to respond to the next request 210 and returns to block 403.

最初の構成ステップ401は、最初の構成中に1回実施すればよく、ステップ403〜407は、操作を求める各要求がコントローラ206によって応じられるときに繰り返すことができる。   The initial configuration step 401 may be performed once during the initial configuration, and steps 403-407 can be repeated as each request for operation is answered by the controller 206.

100 コンピューティング・システム
112 サーバ
114 外部デバイス
116 プロセッサ
120 ネットワーク・アダプタ
122 I/Oインタフェース
124 ディスプレイ
128 メモリ・システム
206 コントローラ
208 メモリ・ストレージ
210 要求
211 キャッシュ線
212 返答
213 メタデータ・フィールド
214 受信機
215 要素フィールド
216 送信機
218 通信
220 通信
301 操作
303 操作
305 操作
307 操作
309 操作
311 操作
333 行
401 ステップ
403 ステップ
405 ステップ
407 ステップ
100 Computing System 112 Server 114 External Device 116 Processor 120 Network Adapter 122 I / O Interface 124 Display 128 Memory System 206 Controller 208 Memory Storage 210 Request 211 Cache Line 212 Reply 213 Metadata Field 214 Receiver 215 Element Field 216 Transmitter 218 Communication 220 Communication 301 Operation 303 Operation 305 Operation 307 Operation 309 Operation 311 Operation 333 Line 401 Step 403 Step 405 Step 407 Step

Claims (15)

メモリ・ストレージとコントローラとを備えるメモリ・システムのキャッシュ線中でビット配列を実装するための方法であって、
− 前記キャッシュ線中で前記ビット配列を構成するステップであって、前記ビット配列がビットの配列を含み、前記構成するステップがさらに、前記ビット配列中の各ビットの値を定義するステップを含む、前記構成するステップと、
− 前記コントローラによって前記ビット配列に対する操作の要求を受け取るステップであって、前記要求が、前記メモリ・ストレージ中における前記キャッシュ線の場所と、前記要求を指定する情報とを示す、前記受け取るステップと、
− 前記コントローラによって前記情報を使用して前記ビット配列に対する1つまたは複数のアクションを前記操作について識別するステップであって、前記1つまたは複数のアクションが前記コントローラ中でエンコードされる、前記識別するステップと、
− 前記要求を受け取るのに応答して、前記1つまたは複数のエンコードされたアクションを実行することによって前記要求を実施するステップと、を含む方法。
A method for implementing a bit array in a cache line of a memory system comprising a memory storage and a controller, comprising:
-Configuring the bit array in the cache line, wherein the bit array includes an array of bits, the configuring step further comprising defining a value for each bit in the bit array; The step of configuring;
Receiving a request for an operation on the bit array by the controller, the request indicating a location of the cache line in the memory storage and information specifying the request;
-Identifying for the operation one or more actions on the bit array using the information by the controller, wherein the one or more actions are encoded in the controller Steps,
Implementing the request by performing the one or more encoded actions in response to receiving the request.
前記要求が「最初の0−ビットをフェッチしてセットする」要求を含み、前記要求を実施する前記ステップが、
− 前記ビット配列の各ビットをインデックス0から順次読み取るアクションと、
− 値0を有する最初のビットが見つかった場合に、前記見つかった最初のビットのインデックスを返して、前記見つかった最初のビットの前記値を1にセットし、そうでない場合に、事前定義済みの失敗値を返すアクションと、のうちの1つまたは複数を実施するステップを含む、請求項1に記載の方法。
The request includes a “fetch and set first 0-bit” request, and the step of implementing the request comprises:
-An action of sequentially reading each bit of the bit array from index 0;
-If the first bit with the value 0 is found, return the index of the first bit found and set the value of the first bit found to 1; The method of claim 1, comprising performing one or more of an action that returns a failure value.
前記要求が「最後の0−ビットをフェッチしてセットする」要求を含み、前記ビット配列がE個の要素を含み、前記要求を実施する前記ステップが、
− 前記ビット配列の各ビットをインデックスE−1から順次読み取るアクションと、
− 前記ビット配列の、値0を有する最後のビットが見つかった場合に、前記最後のビットのインデックスを返して、前記最後のビットの前記値を1にセットし、そうでない場合に、事前定義済みの失敗値を返すアクションと、のうちの1つまたは複数を実施するステップを含む、請求項1または2に記載の方法。
The request includes a “fetch and set last 0-bit” request, the bit array includes E elements, and the step of implementing the request comprises:
-An action of sequentially reading each bit of the bit array from the index E-1,
-If the last bit of the bit array with the value 0 is found, return the index of the last bit and set the value of the last bit to 1, otherwise predefined A method according to claim 1 or 2, comprising the step of performing one or more of the following:
前記要求が「孤立した0−ビットをフェッチしてセットする」要求を含み、前記要求を実施する前記ステップが、
− 前記ビット配列を読み取って、0値を有するビットの、0個以上の連続的なシーケンスを決定するアクションと、
− 見つかったシーケンスが0個の場合に、事前定義済みの失敗値を返し、そうでない場合に、
・ 前記1つまたは複数の連続的なシーケンスをそれらのビット数に基づいてランク付けし、
・ 前記1つまたは複数の連続的なシーケンスのうちで最小数のビットを有する連続的なシーケンスのビットを選択し、
・ 前記選択されたビットのインデックスを返し、
・ 前記選択されたビットの前記値を1にセットするアクションと、のうちの1つまたは複数を実施するステップを含む、請求項1または2に記載の方法。
The request includes a “fetch and set orphaned 0-bit” request, and the step of implementing the request comprises:
-An action to read the bit array and determine zero or more consecutive sequences of bits having a zero value;
-Returns a predefined failure value if there are zero sequences found, otherwise
Ranking the one or more consecutive sequences based on their number of bits;
Selecting a bit of a continuous sequence having a minimum number of bits of the one or more consecutive sequences;
Return the index of the selected bit;
3. The method of claim 1 or 2, comprising performing one or more of the actions of setting the value of the selected bit to 1.
前記要求が「最初の1−ビットをフェッチしてクリアする」要求を含み、前記要求を実施する前記ステップが、
− 前記ビット配列の各ビットをインデックス0から順次読み取るアクションと、
− 値1を有する最初のビットが見つかった場合に、前記見つかった最初のビットのインデックスを返して、前記見つかった最初のビットの値を0にセットし、そうでない場合に、事前定義済みの失敗値を返すアクションと、のうちの1つまたは複数を実施するステップを含む、請求項1または2に記載の方法。
The request includes a “fetch and clear first 1-bit” request, and the step of implementing the request comprises:
-An action of sequentially reading each bit of the bit array from index 0;
-If the first bit with the value 1 is found, return the index of the first bit found and set the value of the first bit found to 0, otherwise a predefined failure 3. The method of claim 1 or 2, comprising performing one or more of an action that returns a value.
前記要求が「最後の1−ビットをフェッチしてクリアする」要求を含み、前記ビット配列がE個の要素を含み、前記要求を実施する前記ステップが、
− 前記ビット配列の各ビットをインデックスE−1から順次読み取るアクションと、
− 前記ビット配列の、値1を有する最後のビットが見つかった場合に、前記最後のビットのインデックスを返して、前記最後のビットの値を0にセットし、そうでない場合に、事前定義済みの失敗値を返すアクションと、のうちの1つまたは複数を実施するステップを含む、請求項1または2に記載の方法。
The request includes a “fetch and clear last 1-bit” request, the bit array includes E elements, and the step of implementing the request comprises:
-An action of sequentially reading each bit of the bit array from the index E-1,
-If the last bit of the bit array with the value 1 is found, return the index of the last bit and set the value of the last bit to 0, otherwise the predefined bit 3. The method of claim 1 or 2, comprising performing one or more of an action that returns a failure value.
前記要求が「孤立した1−ビットをフェッチしてクリアする」要求を含み、前記要求を実施する前記ステップが、
− 前記ビット配列を読み取って、1の値を有するビットの、0個以上の連続的なシーケンス決定するアクションと、
− 見つかったシーケンスが0個の場合に、事前定義済みの失敗値を返し、そうでない場合に、
・ 前記1つまたは複数の連続的なシーケンスをそれらのビット数に基づいてランク付けし、
・ 最小数のビットを有する連続的なシーケンスのビットを選択し、
・ 前記選択されたビットのインデックスを返し、
・ 前記選択されたビットの値を0にセットするアクションと、のうちの1つまたは複数を実施するステップを含む、請求項1または2に記載の方法。
The request includes a “fetch and clear orphaned 1-bit” request, and the step of implementing the request comprises:
-An action to read the bit array and determine zero or more consecutive sequences of bits having a value of 1;
-Returns a predefined failure value if there are zero sequences found, otherwise
Ranking the one or more consecutive sequences based on their number of bits;
Select a continuous sequence of bits with the least number of bits;
Return the index of the selected bit;
3. The method of claim 1 or 2, comprising performing one or more of the actions of setting the value of the selected bit to 0.
前記要求が「N個の連続的な0−ビットをフェッチしてセットする」要求を含み、前記要求を実施する前記ステップが、
− 前記ビット配列を読み取って、0の値を有するN個のビットの、0個以上の連続的なシーケンスを決定するアクションと、
− 見つかったシーケンスが0個の場合に、事前定義済みの失敗値を返し、そうでない場合に、
・ 前記1つまたは複数の組合せのうちで事前定義済みの条件を満たすシーケンスを選択し、
・ 前記選択されたN個のビットのシーケンスの最初のビットのインデックスを返し、
・ 前記選択されたN個のビットの値を1にセットするアクションと、のうちの1つまたは複数を実施するステップを含む、請求項1または2に記載の方法。
The request includes a “fetch and set N consecutive 0-bits” request, and the step of implementing the request comprises:
-An action of reading said bit array to determine zero or more consecutive sequences of N bits having a value of zero;
-Returns a predefined failure value if there are zero sequences found, otherwise
Selecting a sequence satisfying a predefined condition from the one or more combinations,
Return the index of the first bit of the selected sequence of N bits;
3. The method according to claim 1 or 2, comprising performing one or more of the actions of setting the value of the selected N bits to 1.
前記シーケンスが前記ビット配列の最初のN個の連続的なビットを含むことを、前記事前定義済みの条件が含む、請求項8に記載の方法。   9. The method of claim 8, wherein the predefined condition includes that the sequence includes the first N consecutive bits of the bit array. 前記要求が「N個の指定された0−ビットをフェッチしてセットする」要求を含み、前記要求を実施する前記ステップが、
− 前記ビット配列を読み取って、指定されたインデックスにある前記指定されたビットを突き止めるアクションと、
− 前記指定されたビットの少なくとも1つのビットが値1を有する場合に、事前定義済みの失敗値を返すアクションと、
− 前記指定されたビットの各々が値0を有する場合に、指定された各ビットを値1にセットして、事前定義済みの成功値を返すアクションと、のうちの1つまたは複数を実施するステップを含む、請求項1または2に記載の方法。
The request includes a “fetch and set N specified 0-bits” request, and the step of implementing the request comprises:
-Reading the bit array to locate the specified bit at the specified index;
-An action that returns a predefined failure value if at least one of the specified bits has the value 1;
Performing one or more of the actions of setting each designated bit to a value 1 and returning a predefined success value if each of the designated bits has a value 0 The method according to claim 1, comprising a step.
前記要求が「1−ビットをカウントする」要求を含み、前記要求を実施する前記ステップが、
− 前記ビット配列の各ビットを読み取るアクションと、
− 値1を有するビットの数をカウントするアクションと、
− 前記カウントの結果を返すアクションと、のうちの1つまたは複数を実施するステップを含む、請求項1または2に記載の方法。
The request includes a “count 1-bit” request, and the step of implementing the request comprises:
-An action to read each bit of the bit array;
-An action of counting the number of bits having the value 1;
The method according to claim 1 or 2, comprising performing one or more of the following actions: returning the count result.
前記要求が「最初の1−ビットをフェッチする」要求を含み、前記要求を実施する前記ステップが、
− 前記ビット配列の各ビットをインデックス0から順次読み取るアクションと、
− 値1を有する最初のビットが見つかった場合に、前記見つかった最初のビットのインデックスを返し、そうでない場合に、事前定義済みの失敗値を返すアクションと、のうちの1つまたは複数を実施するステップを含む、請求項1または2に記載の方法。
The request includes a “fetch the first 1-bit” request, and the step of implementing the request comprises:
-An action of sequentially reading each bit of the bit array from index 0;
Perform one or more of the following actions: return the index of the first bit found if the first bit with value 1 is found, otherwise return a predefined failure value The method according to claim 1 or 2, comprising the step of:
前記要求が「N番目の1−ビットをフェッチする」要求を含み、前記要求がNの値を提供し、前記要求を実施する前記ステップが、
− 前記ビット配列の各ビットをインデックス0から順次読み取るアクションと、
− 値1を有するビットのN番目の発生が見つかった場合に、前記見つかったN番目の1−ビットのインデックスを返し、そうでない場合に、事前定義済みの失敗値を返すアクションと、のうちの1つまたは複数を実施するステップを含む、請求項1または2に記載の方法。
The request includes a “fetch the Nth 1-bit” request, the request provides a value of N, and the step of implementing the request comprises:
-An action of sequentially reading each bit of the bit array from index 0;
Returning an index of the Nth 1-bit found when the Nth occurrence of a bit having a value of 1 is found, and returning a predefined failure value otherwise; 3. A method according to claim 1 or 2, comprising performing one or more.
請求項1ないし13のいずれか一項に記載の方法の方法ステップをコンピュータに実行させるプログラム。   A program that causes a computer to execute the method steps of the method according to any one of claims 1 to 13. キャッシュ線中でビット配列を実装するためのシステムであって、メモリ・ストレージおよびコントローラを備え、
− 前記キャッシュ線中で前記ビット配列を構成することであって、前記ビット配列がビットの配列を含み、前記構成することがさらに、前記ビット配列中の各ビットの値を定義することを含む、前記構成することと、
− 前記コントローラによって前記ビット配列に対する操作の要求を受け取ることであって、前記要求が、前記メモリ・ストレージ中における前記キャッシュ線の場所と、前記要求を指定する情報とを示す、前記受け取ることと、
− 前記情報を使用して前記ビット配列に対する1つまたは複数のアクションを前記操作について識別することであって、前記1つまたは複数のアクションが前記コントローラ中でエンコードされる、前記識別することと、
− 前記要求を受け取るのに応答して、前記1つまたは複数のエンコードされたアクションを実行することによって前記要求を実施することと、を行うように構成されたシステム。
A system for implementing a bit array in a cache line, comprising a memory storage and a controller,
-Configuring the bit array in the cache line, the bit array including an array of bits, the configuring further comprising defining a value for each bit in the bit array; Configuring the above;
Receiving a request for an operation on the bit array by the controller, the request indicating a location of the cache line in the memory storage and information specifying the request;
Using the information to identify one or more actions on the bit array for the operation, wherein the one or more actions are encoded in the controller;
A system configured to perform the request by performing the one or more encoded actions in response to receiving the request.
JP2016524921A 2013-07-11 2014-07-01 Method for implementing bit arrays in cache lines Active JP6333371B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
GB1312446.6 2013-07-11
GB1312446.6A GB2516092A (en) 2013-07-11 2013-07-11 Method and system for implementing a bit array in a cache line
PCT/IB2014/062757 WO2015004571A1 (en) 2013-07-11 2014-07-01 Method and system for implementing a bit array in a cache line

Publications (2)

Publication Number Publication Date
JP2016526739A JP2016526739A (en) 2016-09-05
JP6333371B2 true JP6333371B2 (en) 2018-05-30

Family

ID=49081142

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016524921A Active JP6333371B2 (en) 2013-07-11 2014-07-01 Method for implementing bit arrays in cache lines

Country Status (5)

Country Link
JP (1) JP6333371B2 (en)
CN (1) CN105378686B (en)
DE (1) DE112014003212T5 (en)
GB (2) GB2516092A (en)
WO (1) WO2015004571A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107427290B (en) 2015-03-26 2021-04-16 捷锐士股份有限公司 Biopsy device for performing biopsy
CN111108485B (en) * 2017-08-08 2023-11-24 大陆汽车科技有限公司 Method of operating a cache

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03172947A (en) * 1989-11-13 1991-07-26 Matra Design Semiconductor Inc Microcomputer system
WO2001063240A2 (en) * 2000-02-25 2001-08-30 Sun Microsystems, Inc. Maintaining high snoop traffic throughput and preventing cache data eviction during an atomic operation
US7127559B2 (en) * 2001-07-10 2006-10-24 Micron Technology, Inc. Caching of dynamic arrays
JP2003030051A (en) * 2001-07-19 2003-01-31 Sony Corp Data processor and data access method
US6836823B2 (en) * 2001-11-05 2004-12-28 Src Computers, Inc. Bandwidth enhancement for uncached devices
CN101689143B (en) * 2007-06-20 2012-07-04 富士通株式会社 Cache control device and control method
CN100478918C (en) * 2007-10-31 2009-04-15 中国人民解放军国防科学技术大学 Segmental high speed cache design method in microprocessor and segmental high speed cache
US8296524B2 (en) * 2009-06-26 2012-10-23 Oracle America, Inc. Supporting efficient spin-locks and other types of synchronization in a cache-coherent multiprocessor system
US8543769B2 (en) * 2009-07-27 2013-09-24 International Business Machines Corporation Fine grained cache allocation
US8566524B2 (en) * 2009-08-31 2013-10-22 International Business Machines Corporation Transactional memory system with efficient cache support
US9507647B2 (en) * 2010-01-08 2016-11-29 Globalfoundries Inc. Cache as point of coherence in multiprocessor system
US20120185672A1 (en) * 2011-01-18 2012-07-19 International Business Machines Corporation Local-only synchronizing operations

Also Published As

Publication number Publication date
DE112014003212T5 (en) 2016-04-28
GB2530962B (en) 2020-04-22
GB201601479D0 (en) 2016-03-09
CN105378686B (en) 2018-05-29
GB201312446D0 (en) 2013-08-28
GB2516092A (en) 2015-01-14
JP2016526739A (en) 2016-09-05
GB2530962A (en) 2016-04-06
CN105378686A (en) 2016-03-02
WO2015004571A1 (en) 2015-01-15

Similar Documents

Publication Publication Date Title
US9411659B2 (en) Data processing method used in distributed system
US20130227194A1 (en) Active non-volatile memory post-processing
US8606791B2 (en) Concurrently accessed hash table
US20100332765A1 (en) Hierarchical bloom filters for facilitating concurrency control
US11204813B2 (en) System and method for multidimensional search with a resource pool in a computing environment
TWI537962B (en) Memory controlled data movement and timing
US20140331235A1 (en) Resource allocation apparatus and method
DE102013114072A1 (en) System and method for hardware scheduling of indexed barriers
CN106570113B (en) Mass vector slice data cloud storage method and system
US20140143519A1 (en) Store operation with conditional push
JP6853714B2 (en) How to store data in a data storage system that provides a zero-competition parallel data stack
US20140074904A1 (en) Data-intensive computer architecture
US10872394B2 (en) Frequent pattern mining method and apparatus
US10289723B1 (en) Distributed union all queries
US10275480B1 (en) Immediately-consistent lock-free indexing for distributed applications
JP6333371B2 (en) Method for implementing bit arrays in cache lines
US9588985B2 (en) Reducing blocking instances in parallel processing systems performing operations on trees
US9552298B2 (en) Smart pre-fetch for sequential access on BTree
US10303687B2 (en) Concurrent processing of data sources
US20130080481A1 (en) Extreme large space allocation
JP6333370B2 (en) Method for implementing dynamic array data structures in cache lines
US20170344488A1 (en) Sharing data structures between processes by semi-invasive hybrid approach
EP3696688B1 (en) Locking based on categorical memory allocation
CN107102898B (en) Memory management and data structure construction method and device based on NUMA (non Uniform memory Access) architecture
KR101969219B1 (en) Method and apparatus for frequent pattern mining

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170609

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180403

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180424

R150 Certificate of patent or registration of utility model

Ref document number: 6333371

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150