JP2001256065A - Exclusive control method and computer system - Google Patents

Exclusive control method and computer system

Info

Publication number
JP2001256065A
JP2001256065A JP2000070840A JP2000070840A JP2001256065A JP 2001256065 A JP2001256065 A JP 2001256065A JP 2000070840 A JP2000070840 A JP 2000070840A JP 2000070840 A JP2000070840 A JP 2000070840A JP 2001256065 A JP2001256065 A JP 2001256065A
Authority
JP
Japan
Prior art keywords
lock
thread
release
request
monitor
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.)
Pending
Application number
JP2000070840A
Other languages
Japanese (ja)
Inventor
Masaaki Hosouchi
昌明 細内
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2000070840A priority Critical patent/JP2001256065A/en
Publication of JP2001256065A publication Critical patent/JP2001256065A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To reduce CPU overhead to be required for an exclusive control processing of shared resources in a computer system to process a small number of threads with high operation frequency and threads with low operation frequency by mixing them. SOLUTION: When release of lock is requested, a delay flag is set without releasing the lock. However, when threads waiting for release exist and when plural threads with high operation frequency exist, the lock is released. When acquisition of the lock is requested from the same thread again, a fact that the lock is acquired is discriminated by the delay flag and a thread identifier and no acquisition processing of the lock is performed. When the acquisition of the lock the release of which is delayed is requested from other thread, the lock is acquired again after releasing the lock by an interruption processing.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、計算機システムに
おける排他制御方法及び計算機システムに係り、特に、
スレッドやタスク等のプログラムの実行制御単位間の共
有資源に対するCPUのオーバヘッドを低減した排他制
御方法及びこの方法を使用した計算機システムに関す
る。
The present invention relates to an exclusive control method and a computer system in a computer system.
The present invention relates to an exclusive control method that reduces the overhead of a CPU on a shared resource between execution control units of a program such as a thread and a task, and a computer system using the method.

【0002】[0002]

【従来の技術】一般に、計算機システムの制御プログラ
ムであるオペレーティングシステムにより使用され、あ
るいは制御されるプログラムカウンタ、レジスタ等のコ
ンテキスト、スタックを個別に持つプログラムの実行制
御単位はスレッドと呼ばれている。オペレーティングシ
ステムによっては、スレッドをタスクやライトウェイト
プロセスと呼ぶ場合もある。また、アドレス空間やプロ
グラムコードから構成されるプログラムの実行制御単位
はプロセスと呼ばれている。オペレーティングシステム
によっては、プロセスをタスクやジョブと呼ぶ場合もあ
る。1つのプロセスには、通常、1つまたは複数のスレ
ッドが存在する。
2. Description of the Related Art Generally, an execution control unit of a program having a context, such as a program counter and a register, and a stack, which is used or controlled by an operating system which is a control program of a computer system, is called a thread. Depending on the operating system, a thread may be called a task or a lightweight process. An execution control unit of a program including an address space and a program code is called a process. Depending on the operating system, a process may be called a task or a job. A process typically has one or more threads.

【0003】計算機システムは、処理の実行途中に一定
時間毎に切り替えたり、複数のCPU上で同時に実行し
たりして、複数のプロセスやスレッドを並列に扱う場合
がある。通常、計算機システムは、このような場合に、
各プロセス間や各スレッド間で共有する資源の一貫性を
保証し、危険区域区間を2つ以上のプロセスやスレッド
が実行しないようにするために、排他制御処理を有して
いる。この種の排他制御に関する従来技術として、例え
ば、A.C.Shaw著「オペレーティングシステムの論理設
計」(ISBN4-8222-7077-7)、p51-p58等に記載された技術
が知られている。この従来技術は、セマフォを使用して
他のプロセスがV操作を実行するまでP操作を行ったプ
ロセス待たせるというものである。セマフォを用いた排
他制御処理は、pthread_mutex_lock()等の関数がオペレ
ーティングシステムに実装されて実行される。
In some cases, a computer system handles a plurality of processes and threads in parallel by switching at regular intervals during the execution of a process or executing the processes simultaneously on a plurality of CPUs. Usually, a computer system is used in such a case.
An exclusive control process is provided to guarantee consistency of resources shared between processes and threads and to prevent two or more processes or threads from executing a dangerous zone section. As a conventional technique relating to this kind of exclusive control, for example, a technique described in ACShaw, “Logic Design of Operating System” (ISBN4-8222-7077-7), p51-p58, and the like is known. In this conventional technique, a process that has performed a P operation is made to wait until another process executes a V operation using a semaphore. Exclusive control processing using a semaphore is executed by implementing a function such as pthread_mutex_lock () in the operating system.

【0004】また、前述と異なる方法による排他制御に
関する従来技術として、前記文献のp61-p66 に記載され
た技術が知られている。この従来技術は、セマフォを用
いて手続き本体を同時に1つのプロセスのみに実行を許
可するモニタ機能の実現する方式に関するものである。
そして、この従来技術は、ロックを取得するモニタ入口
処理と、ロックを解放するモニタ出口処理との双方にお
いて、モニタ内の手続きの相互アクセスを防止するた
め、それぞれ、mutex_lock()及びmutex_unlock()を1回
づつ呼び出し、さらに、資源を排他制御するためにも m
utex_lock()を用いるというものである。
Further, as a conventional technique relating to exclusive control by a method different from that described above, there is known a technique described in p61-p66 of the above-mentioned document. This prior art relates to a method for realizing a monitor function that permits execution of only one process at a time by using a semaphore.
Then, in this prior art, in both the monitor entrance process for acquiring the lock and the monitor exit process for releasing the lock, mutex_lock () and mutex_unlock () are used to prevent mutual access of the procedures in the monitor. One call at a time, and also for exclusive control of resources m
It uses utex_lock ().

【0005】さらに、前述のモニタ機能に関する従来技
術として、OleAgesen他著「An Efficient Meta-lock fo
r Implementing Ubiquitous Synchronization」,(Sun L
absTR-99-76)p11-p12に記載されている技術が知られて
いる。この従来技術は、mutex_lock()の代わりにCompar
e-and-SwapやSwap等の排他制御命令を用いたmetaLock()
を用いるというものである。そして、資源の排他制御
は、資源の競合が発生しない限り、ロックレコードを割
り当てることにより行われる。
[0005] Further, as a prior art related to the above-mentioned monitor function, there is disclosed in "An Efficient Meta-lock fo" by OleAgesen et al.
r Implementing Ubiquitous Synchronization '', (Sun L
absTR-99-76) The technique described in p11-p12 is known. This conventional technology uses Compar instead of mutex_lock ().
metaLock () using exclusive control instructions such as e-and-Swap and Swap
Is used. Exclusive control of resources is performed by allocating lock records unless resource conflict occurs.

【0006】[0006]

【発明が解決しようとする課題】前述した「オペレーテ
ィングシステムの論理設計」に記載された従来技術によ
るモニタ処理は、mutex 処理が必ず呼び出されるため、
CPUオーバヘッドが大きくなるという問題点を有して
いる。この理由は、mutex 処理がスレッドのスリープや
ウェイクアップ制御を行うため、Compare-and-Swapやセ
マフォ使用するものに比較するとmutex 処理が複雑とな
るためである。
In the monitor processing according to the prior art described in the above "Logical design of operating system", since the mutex processing is always called,
There is a problem that CPU overhead becomes large. The reason for this is that the mutex process performs thread sleep and wake-up control, which makes the mutex process more complicated than that using Compare-and-Swap or semaphores.

【0007】また、前述した「An Efficient Meta-lock
for Implementing Ubiquitous Synchronization」記載
の別の従来技術によるモニタ処理は、mutex を用いる場
合よりCPUオーバヘッドの少ないCompare-and-Swapを
用いているが、命令実行中に他のCPUで同時に命令が
実行されないようにシリアライゼーションを伴うCompar
e-and-Swap命令とSwap命令とが各1回づつ必ず発生する
ことになり処理負荷が大きいという問題点を有してい
る。
[0007] Also, the aforementioned "An Efficient Meta-lock"
Another conventional monitor processing described in `` for Implementing Ubiquitous Synchronization '' uses Compare-and-Swap, which has less CPU overhead than when using a mutex, but the instruction is not executed simultaneously by another CPU during instruction execution. Compar with serialization
The e-and-Swap instruction and the Swap instruction always occur once each time, and there is a problem that the processing load is large.

【0008】そして、計算機システムがマルチスレッド
やマルチプロセスの処理を行うものであれば、共有資源
の排他制御は必須であり、たとえ、ある特定のスレッド
が実行時間のほとんどを占め、他のスレッドが特定の事
象が発生したり一定時間経過したときのみしか動作しな
いようなプログラムであっても、実行時間のほとんどを
占めるスレッドは、いつ他のスレッドが動作するかわか
らないため、モニタを呼び出しロックをかけてから共有
資源をアクセスしなければならない。このように、共有
資源の競合がほとんど発生しない場合においても、各ス
レッドは、共有資源をアクセスする度にロックの取得や
解放の処理を行うが必要になる。このため、マルチスレ
ッドやマルチプロセスの処理を行う計算機システムが
は、共有資源の数が多かったり、共有資源をアクセスす
る回数が多い場合、これらの排他制御に要するCPUオ
ーバヘッドが無視できない大きさとなり、処理性能が低
下するという問題点を生じることになる。
[0008] If the computer system performs multi-thread or multi-process processing, exclusive control of shared resources is indispensable. For example, a specific thread occupies most of the execution time, and another thread is used by other threads. Even if the program runs only when a specific event occurs or after a certain period of time, the thread that occupies most of the execution time does not know when the other thread will run, so it calls the monitor and locks it. Access to shared resources. As described above, even when the contention of the shared resource hardly occurs, each thread needs to acquire or release the lock every time the thread accesses the shared resource. For this reason, a computer system that performs multi-thread or multi-process processing has a large amount of CPU overhead required for exclusive control when the number of shared resources is large or the number of times of accessing the shared resources is large, This causes a problem that the processing performance is reduced.

【0009】本発明の目的は、前述した従来技術の問題
点を解決し、ある特定のスレッドが実行時間のほとんど
を占め、スレッド切り替え発生頻度が低く共有資源の競
合がほとんど発生しない場合において特に有効な排他制
御方法及びこの方法を使用した計算機システムを提供す
ることにある。
An object of the present invention is to solve the above-mentioned problems of the prior art, and is particularly effective when a specific thread occupies most of the execution time, thread switching frequency is low, and contention for shared resources hardly occurs. And a computer system using the exclusive control method.

【0010】[0010]

【課題を解決するための手段】本発明によれば前記目的
は、複数のスレッドが並行して動作することが可能な計
算機システムにおける共有資源のスレッド間での排他制
御方法において、第1のスレッドから排他すべき共有資
源のロックの取得が要求されたときに前記ロックを取得
し、前記第1のスレッドのスレッド識別子を排他する共
有資源単位に設けられたモニタ管理構造体に記憶し、前
記ロックの解放が要求されたときにロックの解放を遅延
させ、前記モニタ管理構造体に解放遅延フラグをセット
し、再び前記ロックの取得がスレッドから要求されたと
きに前記モニタ管理構造体に記憶されたスレッド識別子
とロックの取得要求を行ったスレッドのスレッド識別子
とを比較し、ロックの取得の要求が前記第1のスレッド
からのものであるか否かを判定し、前記解放遅延フラグ
を調べてロック解放が遅延されている否かを識別し、前
記再度のロックの取得の要求が前記第1のスレッドから
のロックの取得要求であり、かつ、ロック解放が遅延さ
れている場合、前記第1のスレッドに前記ロックを継続
して使用させることにより達成される。
According to the present invention, an object of the present invention is to provide a method for exclusive control between threads of a shared resource in a computer system in which a plurality of threads can operate in parallel. The lock is acquired when a lock of the shared resource to be excluded is requested from the storage device, and the thread identifier of the first thread is stored in a monitor management structure provided in the shared resource unit to be excluded, and the lock is acquired. Release of the lock is requested when release of the lock is requested, a release delay flag is set in the monitor management structure, and the lock is stored in the monitor management structure when the acquisition of the lock is requested again by the thread. The thread identifier is compared with the thread identifier of the thread that has issued the lock acquisition request, and the lock acquisition request is from the first thread. Determining whether the lock release is delayed by examining the release delay flag, determining that the lock acquisition request is a lock acquisition request from the first thread, and This is achieved by having the first thread continue to use the lock if the lock release is delayed.

【0011】また、前記目的は、前述の排他制御方法を
計算機システムに適用することにより達成される。
The above object is achieved by applying the above-described exclusive control method to a computer system.

【0012】[0012]

【発明の実施の形態】以下、本発明による排他制御方法
及びこの方法を使用した計算機システムの実施形態を図
面により詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an embodiment of an exclusive control method according to the present invention and a computer system using this method will be described in detail with reference to the drawings.

【0013】図1は本発明の一実施形態による計算機シ
ステムのハードウェア構成の一例を示すブロック図、図
2は本発明の一実施形態による排他制御方法を実施する
処理構成を説明するブロック図、図3はモニタ管理構造
体の構成を説明する図、図4はモニタ入口処理の処理動
作を説明するフローチャート、図5はモニタ出口処理の
処理動作を説明するフローチャート、図6はロック解放
要求割り込み処理の処理動作を説明するフローチャート
である。図1〜図3において、101は中央処理装置
(CPU)、102は主記憶装置、103はスレッド、
104はユーザプログラム、105はモニタ処理、10
6は排他制御処理、107はモニタ管理構造体、108
はロックコード、110はロック取得処理、111はロ
ック解放処理、300はモニタ入口処理、400はモニ
タ出口処理、500はロック解放要求割り込み処理であ
る。
FIG. 1 is a block diagram showing an example of a hardware configuration of a computer system according to an embodiment of the present invention. FIG. 2 is a block diagram illustrating a processing configuration for implementing an exclusive control method according to an embodiment of the present invention. FIG. 3 is a view for explaining the configuration of the monitor management structure, FIG. 4 is a flowchart for explaining the processing operation of the monitor entrance processing, FIG. 5 is a flowchart for explaining the processing operation of the monitor exit processing, and FIG. 5 is a flowchart for explaining the processing operation of FIG. 1 to 3, 101 is a central processing unit (CPU), 102 is a main storage device, 103 is a thread,
104 is a user program, 105 is a monitor process, 10
6 is an exclusive control process, 107 is a monitor management structure, 108
Is a lock code, 110 is lock acquisition processing, 111 is lock release processing, 300 is monitor entry processing, 400 is monitor exit processing, and 500 is lock release request interruption processing.

【0014】本発明の一実施形態による計算機システム
は、図1に示すように、1つまたは複数のCPU101
と、主記憶装置102とを備えて構成されている。主記
憶装置102上には、スレッドの実体としてのスタック
やコンテキスト等の複数のスレッド103、スレッド1
03相互間で共有する命令コードやデータを有するユー
ザプログラム104、ユーザプログラム104内の複数
のスレッド相互間で共有可能なメモリ上の領域やファイ
ル等のオブジェクトとしての共有資源109の排他制御
を行うときに呼び出されるライブラリ関数である命令コ
ードを有するモニタ処理105、モニタ処理105から
呼び出されるmutex_lock等のオペレーティングシステム
の排他制御処理の命令コードを有する排他制御処理10
6、複数の共有資源109等が配置されている。そし
て、複数の共有資源109のそれぞれに対して1つづつ
モニタ管理構造体107とセマフォ等のロックレコード
108とが割り当てられている。
As shown in FIG. 1, a computer system according to an embodiment of the present invention includes one or more CPUs 101.
And a main storage device 102. On the main storage device 102, a plurality of threads 103 such as a stack and a context as a thread entity, a thread 1
When exclusive control is performed on the shared resource 109 as an object such as a user program 104 having an instruction code and data shared among the plurality of threads, a memory area and a file which can be shared among a plurality of threads in the user program 104 Monitor process 105 having an instruction code which is a library function called by the monitor process, and exclusive control process 10 having an instruction code of an exclusive control process of the operating system such as mutex_lock which is called from the monitor process 105.
6. A plurality of shared resources 109 are arranged. A monitor management structure 107 and a lock record 108 such as a semaphore are assigned to each of the plurality of shared resources 109 one by one.

【0015】本発明の一実施形態による排他制御方法を
実施する処理は、図2に示すように、モニタ処理105
に設けられるモニタ入口処理300、モニタロック処理
400、ロック解放要求割り込み処理500と、排他制
御処理106に設けられるロック取得処理110、ロッ
ク解放処理とにより構成される。
The processing for implementing the exclusive control method according to one embodiment of the present invention is performed by the monitor processing 105 as shown in FIG.
, A monitor entry process 300, a monitor lock process 400, a lock release request interrupt process 500, and a lock acquisition process 110 and a lock release process provided in the exclusive control process 106.

【0016】ユーザプログラム104は、共有資源10
9の使用のために共有資源109をロックする場合、共
有資源109に対応した構造体107を指定してモニタ
処理105内のモニタ入口処理300を呼び出す。モニ
タ入口処理300は、共有資源109のロック状態を調
べ、共有資源109がどのスレッドからもロックされて
いないことを確認して、モニタ管理構造体107からポ
イントされるかモニタ管理構造体107内に含まれるロ
ックレコード108を指定して、オペレーティングシス
テム内のmutex_lock()やセマフォP操作、ENQ等のロ
ック取得処理110を呼び出す。ロック取得処理110
は、これにより、ロックレコード108の内容をロック
状態に更新する。
The user program 104 stores the shared resources 10
When locking the shared resource 109 to use the resource 9, the monitor entrance process 300 in the monitor process 105 is called by designating the structure 107 corresponding to the shared resource 109. The monitor entry process 300 checks the lock state of the shared resource 109, confirms that the shared resource 109 is not locked by any thread, and determines whether the thread is pointed by the monitor management structure 107 in the monitor management structure 107. By specifying the included lock record 108, a lock acquisition process 110 such as mutex_lock (), semaphore P operation, and ENQ in the operating system is called. Lock acquisition processing 110
Updates the contents of the lock record 108 to the locked state.

【0017】また、ユーザプログラム104は、共有資
源109のロックを解放する場合、共有資源109に対
応した構造体107を指定してモニタ処理105内のモ
ニタ出口処理400を呼び出す。モニタ出口処理400
は、構造体107を参照して他のスレッドが共有資源1
09のロックの解放待ちをしているか否かを調べる。そ
して、モニタ出口処理400は、解放待ちをしていた
り、動作頻度が低いとあらかじめ定義しておいたスレッ
ド以外のスレッド数があらかじめ定めておいた数、例え
ば2以上の場合、ロックレコード108を指定してオペ
レーティングシステム内のmutex_unlock()やセマフォV
操作、DEQ等のロック解放処理111を呼び出してロ
ックを解放する。このとき、モニタ出口処理400は、
解放待ちとなっているスレッドが存在していなければ、
ロックの解放を行わず、他のスレッドがロックを要求す
るまで継続してその共有資源109のロックを保持す
る。
When releasing the lock on the shared resource 109, the user program 104 specifies the structure 107 corresponding to the shared resource 109 and calls the monitor exit process 400 in the monitor process 105. Monitor exit processing 400
Indicates that another thread refers to the structure 107 and the shared resource 1
A check is made to see if it is waiting for the release of lock 09. Then, the monitor exit process 400 specifies the lock record 108 when the number of threads other than the thread waiting for release or the thread whose operation frequency is defined in advance is a predetermined number, for example, 2 or more, is specified. And mutex_unlock () in the operating system and semaphore V
The lock is released by calling the lock release processing 111 such as operation and DEQ. At this time, the monitor exit processing 400
If there are no threads waiting to be released,
Without releasing the lock, the lock of the shared resource 109 is held continuously until another thread requests the lock.

【0018】前述したモニタ入口処理300の処理にお
いて、モニタ入口処理300は、すでに共有資源がスレ
ッドによりロックされている場合、ロックしたスレッド
がこの処理300を呼び出したユーザプログラム104
の自己スレッドであるか否かを調べ、自己スレッドであ
る場合、そのロックを継続して利用させる。また、モニ
タ入口処理300は、ロックを行っているスレッドがこ
の処理300を呼び出したユーザプログラム104以外
の他のユーザプログラムのスレッドであった場合、共有
資源109が使用中であるか、モニタ出口処理400で
ロックを解放しないまま何もしていない状態であるかを
モニタ管理構造体107を参照して調べる。モニタ入口
処理300は、共有資源109が使用されいいればロッ
ク取得処理110を呼び出してロックの解放を待つが、
使用されていなければ、ロックを保持しているスレッド
に割り込みをかけてロック解放要求処理500を実行さ
せる。ロック解放要求処理500は、ロック解放処理1
11を呼び出してそのロックを解放する。
In the above-described process of the monitor entrance process 300, when the shared resource is already locked by the thread, the monitor entrance process 300 executes the user program 104 which has called the process 300 by the locked thread.
It checks whether or not it is its own thread, and if it is its own thread, it makes the lock continue to be used. If the thread performing the lock is a thread of a user program other than the user program 104 that called the process 300, the monitor entry process 300 determines whether the shared resource 109 is in use or the monitor exit process. At 400, it is checked with reference to the monitor management structure 107 whether the lock is released and nothing is being done. The monitor entrance process 300 calls the lock acquisition process 110 if the shared resource 109 is used, and waits for the release of the lock.
If not, the thread holding the lock is interrupted to execute the lock release request processing 500. The lock release request processing 500 is a lock release processing 1
Call 11 to release the lock.

【0019】本発明の実施形態による排他制御方法は、
前述したように、モニタ出口処理400においてロック
を解放せず、モニタ入口処理300において他のスレッ
ドがその資源を使用するときまでロックの解放を遅延す
る点、モニタ出口処理400においてロックを解放する
かしないかを待ち状態にあるスレッド数により判断する
点に特徴がある。
An exclusive control method according to an embodiment of the present invention comprises:
As described above, the lock is not released in the monitor exit process 400, and the release of the lock is delayed until another thread uses the resource in the monitor entrance process 300. It is characterized in that whether or not to do so is determined based on the number of waiting threads.

【0020】モニタ管理構造体107は、図3に示すよ
うに、ロックを取得したスレッドを識別する取得元スレ
ッド識別子、解放遅延フラグ、解放待ちスレッド数、ロ
ックレコード108の識別子またはアドレス等の情報を
含んで構成されている。このモニタ管理構造体107
は、ロックレコード108の識別子を含む代わりに、ロ
ックレコード108そのものを含んで構成されていても
よい。
As shown in FIG. 3, the monitor management structure 107 stores information such as an acquisition source thread identifier for identifying the thread that has acquired the lock, a release delay flag, the number of threads waiting for release, and the identifier or address of the lock record 108. It is comprised including. This monitor management structure 107
May include the lock record 108 itself instead of including the identifier of the lock record 108.

【0021】また、CPU101内で動作している図示
しないオペレーティングシステム(OS)は、スレッド
を生成するときにスレッド数をカウントする。このと
き、OSは、動作頻度が低いと予め規定しておいたりユ
ーザプログラムで指定されたスレッドについてスレッド
数をカウントしない。これにより、動作頻度の高いスレ
ッド数のみカウントされることになる。ここで、動作頻
度が低いと予め規定しておくスレッドとは、ガベージコ
レクション等の一定時間を置いたりイベントが発生した
ときに動作し、普段は待ち状態となるスレッドである。
An operating system (OS) (not shown) operating in the CPU 101 counts the number of threads when generating a thread. At this time, the OS does not count the number of threads for threads specified in advance that the operation frequency is low or specified by the user program. As a result, only the number of threads whose operation frequency is high is counted. Here, a thread that is specified in advance as having a low operation frequency is a thread that operates when a certain period of time such as garbage collection or the like occurs or an event occurs, and is usually in a waiting state.

【0022】次に、図4に示すフローを参照してモニタ
入口処理300の処理動作について説明する。
Next, the processing operation of the monitor entrance processing 300 will be described with reference to the flow shown in FIG.

【0023】(1)モニタ入口処理300は、ユーザプ
ログラム104から呼び出されると、指定されたモニタ
管理構造体107に記録されているスレッド識別子と、
動作中のスレッドの識別子とを比較し、取得元のスレッ
ドがモニタの所有者、すなわち、モニタ入口処理300
を呼び出したユーザプログラム104の自己スレッドで
あるか否かを調べる(ステップ301)。
(1) When the monitor entry process 300 is called from the user program 104, the thread identifier recorded in the designated monitor management structure 107 is
The identifier of the running thread is compared with the identifier of the running thread, and the thread from which the thread is acquired is the owner of the monitor, that is, the monitor entry process 300
It is checked whether the thread is the self thread of the user program 104 that has called (step 301).

【0024】(2)ステップ301で、取得元のスレッ
ドが自己スレッドであると判定された場合、構造体10
7の中の解放遅延フラグを参照し、ロックが解放されな
いままであるか否かを解放遅延フラグにより調べ、解放
遅延フラグがONであれば、取得元のスレッドが継続し
てそのロックを利用して共有資源109を利用可能であ
るので、ロックが利用されていることを他のスレッドに
判別させるために解放遅延フラグをリセットしてモニタ
入口処理を終了する。この場合、解放遅延されたロック
を継続して使用することができるため、排他制御処理1
06が呼び出されることはない(ステップ302、30
3)。
(2) If it is determined in step 301 that the acquisition source thread is the self thread, the structure 10
7, the release delay flag is checked to determine whether or not the lock remains unreleased. If the release delay flag is ON, the thread that acquired the lock continues to use the lock. Since the shared resource 109 can be used, the release delay flag is reset to cause another thread to determine that the lock is being used, and the monitor entrance process ends. In this case, since the lock delayed in release can be used continuously, exclusive control processing 1
06 is not called (steps 302, 30)
3).

【0025】(3)ステップ301でスレッド識別子が
一致していなかった、すなわち、取得元スレッドが自己
スレッドでなかった場合、あるいは、ステップ302で
解放遅延フラグがONでなかった場合、モニタ入口処理
300は、モニタ管理構造体107に指定されているロ
ックレコードを指定してロック取得処理109を呼び出
してロックを取得する。このときのロック取得処理は、
ロックが取得されないときに待ち状態になるpthread_lo
ck()のような関数ではなく、ロックが取得されないとき
にエラーリターンする pthread_trylock()のような関数
を呼び出すことにより実行される(ステップ304)。
(3) If the thread identifiers do not match in step 301, that is, if the acquisition source thread is not the own thread, or if the release delay flag is not ON in step 302, the monitor entry process 300 Specifies the lock record specified in the monitor management structure 107 and calls the lock acquisition processing 109 to acquire a lock. The lock acquisition process at this time is
Pthread_lo which waits when lock is not acquired
This is executed by calling a function such as pthread_trylock () which returns an error when a lock is not acquired, instead of a function such as ck () (step 304).

【0026】(4)ロックが取得できなかったか否かを
エラーコードにより調べ、エラー状態でなくロックが取
得できていれば、自己スレッドの識別子をモニタ管理構
造体107に記録しモニタ入口処理を終了する。このケ
ースは、初めてロックを取得したり、スレッド数が多い
ためモニタ出口処理でロックが解放された状態のときに
実行される(ステップ305、306)。
(4) An error code is used to check whether the lock could not be obtained. If the lock was obtained instead of an error state, the identifier of the self thread is recorded in the monitor management structure 107, and the monitor entry process ends. I do. This case is executed when the lock is acquired for the first time, or when the lock is released by the monitor exit process due to the large number of threads (steps 305 and 306).

【0027】(5)ステップ305でロック取得が失敗
したと判断された場合、モニタ管理構造体107に記録
されているスレッド識別子と動作中のスレッドの識別子
とを比較し、モニタの所有者が自己スレッドであるか調
べ、取得元のスレッドが自己スレッドである場合、取得
元のスレッドが継続してそのロックを利用して共有資源
109を利用可能であるので、このままモニタ入口処理
を終了する(ステップ307)。
(5) If it is determined in step 305 that the lock acquisition has failed, the thread identifier recorded in the monitor management structure 107 is compared with the identifier of the operating thread, and the owner of the monitor determines It is checked whether the acquired thread is a thread, and if the acquisition source thread is a self thread, the acquisition source thread can continue to use the shared resource 109 by using the lock, so the monitor entrance process is terminated as it is (step 307).

【0028】(6)ステップ307で取得元のスレッド
が自己スレッドでないと判定された場合、解放待ちスレ
ッド数をカウントアップし、解放遅延フラグがONであ
るか否かを調べ、解放遅延フラグがONであれば、他の
スレッドがロックを解放遅延したままであるため、解放
を遅延したスレッドに対して割り込みをかけてロック解
放要求割り込み処理500を起動してロックを解放させ
る(ステップ308〜310)。
(6) If it is determined in step 307 that the acquisition source thread is not the own thread, the number of threads waiting to be released is counted up, and it is checked whether or not the release delay flag is ON. If so, the other thread is still releasing the lock, so that the thread that has delayed the release is interrupted to activate the lock release request interrupt processing 500 to release the lock (steps 308 to 310). .

【0029】(7)ステップ309で解放遅延フラグが
ONでなかった場合、あるいは、ステップ310の処理
で他のスレッドにロックを解放させた後、pthread_lock
()等の関数を呼び出してロック取得処理109を実行さ
せ、他のスレッドがロックを解放するまで待ち状態にな
る(ステップ311)。
(7) If the release delay flag is not ON in step 309, or after the other thread releases the lock in the processing of step 310, pthread_lock
A function such as () is called to execute the lock acquisition process 109, and the process waits until another thread releases the lock (step 311).

【0030】(8)待ち状態が解除されたときはロック
が取得されているので、解放待ちスレッド数を減算した
のち、自己スレッドの識別子をモニタ管理構造体107
に記録してモニタ入口処理を終了する(ステップ31
2、313)。
(8) When the waiting state is released, the lock has been acquired, so that after subtracting the number of threads waiting to be released, the identifier of the self thread is assigned to the monitor management structure 107.
And the monitor entrance process ends (step 31).
2, 313).

【0031】前述したステップ302及びステップ30
3、ステップ309における解放遅延フラグの比較及び
代入処理は、比較と代入とを同時に行うことによって、
命令実行中に他のCPUが実行されないように制御を行
うCompare&Swap命令等の命令を用いて同時に行うべきで
ある。その理由は、ステップ302とステップ303と
の間に別のスレッドでステップ309が実行されてしま
うと、ステップ302を実行したスレッドが、ロックが
継続利用できるものとして処理を行うが、その後ステッ
プ310が実行されてしまい、ロックが解放されてしま
うからである。
Steps 302 and 30 described above
3. The comparison and assignment processing of the release delay flag in step 309 is performed by performing the comparison and assignment simultaneously.
It should be performed at the same time using an instruction such as a Compare & Swap instruction that performs control so that another CPU is not executed during execution of the instruction. The reason is that if step 309 is executed by another thread between step 302 and step 303, the thread executing step 302 performs the processing assuming that the lock can be continuously used. It is executed and the lock is released.

【0032】次に、図5に示すフローを参照してモニタ
出口処理400の処理動作について説明する。
Next, the processing operation of the monitor exit processing 400 will be described with reference to the flow shown in FIG.

【0033】(1)モニタ出口処理400は、まず、ロ
ックの解放を要求したスレッドのロックの解放遅延フラ
グをセットし、ロックの解放待ちをしているスレッドが
あるか否かを解放待ちスレッド数が“0”より大きいか
否かにより調べる(ステップ401、402)。
(1) The monitor exit process 400 first sets the lock release delay flag of the thread that has requested the lock release, and determines whether or not there is a thread waiting to release the lock. Is checked based on whether is larger than "0" (steps 401 and 402).

【0034】(2)ステップ402でロックの解放待ち
をしているスレッドがない場合、動作頻度の高いスレッ
ド数のカウンタを参照し、そのユーザスレッド数が予め
定めておいた数、例えば1を超えているか否かを調べ、
超えていなければこのままモニタ出口処理を終了する
(ステップ403)。
(2) If there is no thread waiting to release the lock in step 402, the counter of the number of threads with high operation frequency is referred to, and the number of user threads exceeds a predetermined number, for example, 1. Check whether it is
If not exceeded, the monitor exit process is terminated (step 403).

【0035】(3)ステップ402でロックの解放待ち
をしているスレッドがあった場合、あるいは、ステップ
403で動作頻度の高いユーザスレッド数が予め定めて
おいた数より多い場合、ロック解放割り込み処理500
の起動回数を削減するためにステップ401でセットし
た解放遅延フラグをリセットする(ステップ404)。
(3) If there is a thread waiting to release the lock in step 402, or if the number of user threads whose operation frequency is high in step 403 is larger than a predetermined number, the lock release interrupt processing 500
The release delay flag set in step 401 is reset in order to reduce the number of times of activation (step 404).

【0036】(4)その後、モニタ出口処理400は、
モニタ管理構造体107の取得元スレッドのスレッド識
別子をリセットしてロックを解放する(ステップ40
5、406)。
(4) Thereafter, the monitor exit processing 400
The thread identifier of the thread from which the monitor management structure 107 is obtained is reset to release the lock (step 40).
5, 406).

【0037】前述の処理により、ロックの解放待ちをし
ているスレッドがない場合、あるいは、動作頻度の高い
ユーザスレッド数が予め定めておいた数に達していない
場合、ロックが解放されることがなく、解放遅延フラグ
が設定されたままの状態となる。
According to the above-described processing, if there is no thread waiting to release the lock, or if the number of user threads having a high frequency of operation does not reach a predetermined number, the lock may be released. And the release delay flag remains set.

【0038】また、前述の処理フローにおいて、解放遅
延フラグを先にセットしてからリセットする理由は、誤
ってロックが保持されたままになるのを防ぐためであ
る。すなわち、あるスレッドがモニタ入口処理300の
ステップ308を実行する前に、別のスレッドがモニタ
出口処理400のステップ402を実行し、モニタ出口
処理400で解放遅延フラグが設定される前にモニタ入
口処理300でステップ309が実行されてしまうと、
ロック解放要求割り込み処理500が起動されないまま
ロックが保持された状態になり、モニタ入口処理300
を呼び出したスレッドは永遠に待ち状態になる。このよ
うなことは、解放遅延フラグの設定をステップ402の
前に実行しておくことにより防止することができる。
The reason why the release delay flag is set first and then reset in the above-described processing flow is to prevent the lock from being held erroneously. That is, before one thread executes step 308 of the monitor entry process 300, another thread executes step 402 of the monitor exit process 400, and before the release delay flag is set by the monitor exit process 400, the monitor entry process starts. When step 309 is executed in 300,
The lock release request interrupt processing 500 is not activated and the lock is held, and the monitor entry processing 300
The thread that called is forever waiting. Such a situation can be prevented by setting the release delay flag before step 402.

【0039】次に、図6に示すフローを参照してロック
解放要求割り込み処理500の処理動作について説明す
る。
Next, the processing operation of the lock release request interrupt processing 500 will be described with reference to the flow shown in FIG.

【0040】(1)ロック解放要求割り込み処理500
は、起動されると、まず、ロック解放遅延フラグを参照
してロック解放遅延フラグがONであるか否かをチェッ
クし、ONでない場合そのまま処理を終了する(ステッ
プ501)。
(1) Lock release request interrupt processing 500
Is activated, first, it is checked whether or not the lock release delay flag is ON by referring to the lock release delay flag, and if it is not ON, the process is terminated as it is (step 501).

【0041】(2)ステップ501でロック解放遅延フ
ラグがONであった場合、解放遅延フラグをリセット
し、ロック解放処理110を呼び出してロックを解放す
る(ステップ502、503)。
(2) If the lock release delay flag is ON in step 501, the release delay flag is reset, and the lock release processing 110 is called to release the lock (steps 502 and 503).

【0042】前述したように、解放遅延フラグがONで
あるときのみ解放遅延フラグをリセットしてロック解放
処理110を呼び出すことにより、ロック解放処理11
0が何度も呼び出されることを防止することができる。
As described above, only when the release delay flag is ON, by resetting the release delay flag and calling the lock release processing 110, the lock release processing 11 is executed.
0 can be prevented from being called many times.

【0043】なお、前述した処理において、ステップ5
01とステップ502とは、処理300のステップ30
2及びステップ303の場合と同様に、Compare&Swap等
の命令を用いて1命令で実行される。但し、ロック解放
処理110が何度呼び出されても支障をきたさない場合
は、ステップ501とステップ502とはなくてもよ
い。
In the above-described processing, step 5
01 and step 502 correspond to step 30 of process 300.
As in the case of step 2 and step 303, execution is performed by one instruction using an instruction such as Compare & Swap. However, if there is no problem even if the lock release process 110 is called any number of times, steps 501 and 502 need not be performed.

【0044】前述した本発明の実施形態による排他制御
方法によれば、ロックを取得したスレッド以外のスレッ
ドが資源をアクセスするまで、ロックを取得したスレッ
ドがロックを継続して保持するため、同一スレッド内で
モニタ入口処理とロック出口処理とを繰り返し行って
も、ロック取得処理やロック解放処理を呼び出さずにす
むため、ロック取得やロック解放の回数を減少させるこ
とができ、ロック処理に要するCPUのオーバヘッドを
削減することができる。本発明の実施形態は、特に、動
作頻度の高いスレッドが1つしか存在せずスレッドスイ
ッチの発生頻度が低い場合に有効である。
According to the exclusive control method according to the embodiment of the present invention described above, the thread that has acquired the lock keeps holding the lock until a thread other than the thread that has acquired the lock accesses the resource. Even if the monitor entrance process and the lock exit process are repeatedly performed in the same time, the lock acquisition process and the lock release process do not need to be called, so that the number of times of lock acquisition and lock release can be reduced, and the CPU required for the lock process can be reduced. Overhead can be reduced. The embodiment of the present invention is particularly effective when only one thread having a high operation frequency exists and the frequency of occurrence of the thread switch is low.

【0045】また、前述した本発明の実施形態は、予想
される動作頻度によりスレッドを分類し、動作頻度の高
いスレッド数をカウントし動作頻度の高いスレッド数が
多い場合、ロック解放要求時にそのロックを解放するた
め、ロック解放要求割り込みが多発することを防止する
ことができる。
In the above-described embodiment of the present invention, the threads are classified according to the expected operation frequency, the number of frequently operated threads is counted, and if the number of frequently operated threads is large, the lock is released when a lock release request is made. , It is possible to prevent the lock release request interrupt from occurring frequently.

【0046】さらに、本発明の実施形態による排他制御
方法を計算機システムに適用することにより、高性能な
計算機システムを構成することができる。
Further, by applying the exclusive control method according to the embodiment of the present invention to a computer system, a high-performance computer system can be configured.

【0047】[0047]

【発明の効果】以上説明したように本発明によれば、あ
る特定のスレッドが実行時間のほとんどを占め、スレッ
ド切り替え発生頻度が低く共有資源の競合がほとんど発
生しない場合において特に有効で、ロック処理に要する
CPUのオーバヘッドを削減することができる高性能な
排他制御方法及びこの方法を使用した計算機システムを
提供することができる。
As described above, according to the present invention, the lock processing is particularly effective when a specific thread occupies most of the execution time, the frequency of thread switching is low, and contention for shared resources hardly occurs. , A high-performance exclusive control method capable of reducing the overhead of the CPU required for the above, and a computer system using this method can be provided.

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

【図1】本発明の一実施形態による計算機システムのハ
ードウェア構成の一例を示すブロック図である。
FIG. 1 is a block diagram illustrating an example of a hardware configuration of a computer system according to an embodiment of the present invention.

【図2】本発明の一実施形態による排他制御方法を実施
する処理構成を説明するブロック図である。
FIG. 2 is a block diagram illustrating a processing configuration for implementing an exclusive control method according to an embodiment of the present invention.

【図3】モニタ管理構造体の構成を説明する図である。FIG. 3 is a diagram illustrating a configuration of a monitor management structure.

【図4】モニタ入口処理の処理動作を説明するフローチ
ャートである。
FIG. 4 is a flowchart illustrating a processing operation of a monitor entrance processing.

【図5】モニタ出口処理の処理動作を説明するフローチ
ャートである。
FIG. 5 is a flowchart illustrating a processing operation of a monitor exit process.

【図6】ロック解放要求割り込み処理の処理動作を説明
するフローチャートである。
FIG. 6 is a flowchart illustrating a processing operation of lock release request interrupt processing.

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

101 中央処理装置(CPU) 102 主記憶装置 103 スレッド 104 ユーザプログラム 105 モニタ処理 106 排他制御処理 107 モニタ管理構造体 108 ロックコード 110 ロック取得処理 111 ロック開放処理 300 モニタ入口処理 400 モニタ出口処理 500 ロック開放要求割り込み処理 101 Central Processing Unit (CPU) 102 Main Storage Device 103 Thread 104 User Program 105 Monitor Process 106 Exclusive Control Process 107 Monitor Management Structure 108 Lock Code 110 Lock Acquisition Process 111 Lock Release Process 300 Monitor Entrance Process 400 Monitor Exit Process 500 Lock Release Request interrupt processing

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 複数のスレッドが並行して動作すること
が可能な計算機システムにおける共有資源のスレッド間
での排他制御方法において、第1のスレッドから排他す
べき共有資源のロックの取得が要求されたときに前記ロ
ックを取得し、前記第1のスレッドのスレッド識別子を
排他する共有資源単位に設けられたモニタ管理構造体に
記憶し、前記ロックの解放が要求されたときにロックの
解放を遅延させ、前記モニタ管理構造体に解放遅延フラ
グをセットし、再び前記ロックの取得がスレッドから要
求されたときに前記モニタ管理構造体に記憶されたスレ
ッド識別子とロックの取得要求を行ったスレッドのスレ
ッド識別子とを比較し、ロックの取得の要求が前記第1
のスレッドからのものであるか否かを判定し、前記解放
遅延フラグを調べてロック解放が遅延されている否かを
識別し、前記再度のロックの取得の要求が前記第1のス
レッドからのロックの取得要求であり、かつ、ロック解
放が遅延されている場合、前記第1のスレッドに前記ロ
ックを継続して使用させることを特徴とする排他制御方
法。
An exclusive control method for a shared resource among threads in a computer system in which a plurality of threads can operate in parallel requires a first thread to acquire a lock on a shared resource to be excluded. When the lock is acquired, the thread identifier of the first thread is stored in a monitor management structure provided in a shared resource unit for exclusive use, and the release of the lock is delayed when the release of the lock is requested. Setting a release delay flag in the monitor management structure, and when the acquisition of the lock is again requested from the thread, the thread identifier stored in the monitor management structure and the thread of the thread that issued the lock acquisition request The request for acquisition of the lock is compared with the first
It is determined whether or not the lock release is delayed from the first thread by checking the release delay flag to determine whether or not the lock release is delayed. An exclusive control method characterized by causing the first thread to continue using the lock when the lock acquisition request is issued and the lock release is delayed.
【請求項2】 前記再度のロックの取得の要求が前記第
1のスレッドからのロックの取得要求でなく、他の第2
のスレッドからの要求であり、かつ、ロック解放が遅延
されている場合、ロックを取得した前記第1のスレッド
に割り込みを起こしてロックを解放させることを特徴と
する請求項1記載の排他制御方法。
2. The method according to claim 1, wherein the request to acquire the lock again is not a request to acquire a lock from the first thread, but another request to acquire a lock.
2. The exclusive control method according to claim 1, wherein, if the request is issued from the first thread and the lock release is delayed, an interrupt is issued to the first thread that has acquired the lock to release the lock. .
【請求項3】 前記解放遅延フラグのセットは、スレッ
ドを動作頻度の高いスレッドと動作頻度の低いスレッド
とに区別して、動作頻度の高いスレッド数をカウントし
て保持しておき、動作頻度の高いスレッド数があらかじ
め定められた数以下の場合に行われることを特徴とする
請求項1記載の排他制御方法。
3. The release delay flag set includes distinguishing a thread into a thread with a high operation frequency and a thread with a low operation frequency, counting and holding the number of threads with a high operation frequency, 2. The exclusive control method according to claim 1, wherein the method is performed when the number of threads is equal to or less than a predetermined number.
【請求項4】 複数のスレッドが並行して動作すること
が可能な計算機システムにおいて、第1のスレッドから
排他すべき共有資源のロックの取得が要求されたときに
前記ロックを取得する手段と、前記第1のスレッドのス
レッド識別子を排他する共有資源単位に設けられたモニ
タ管理構造体に記憶する手段と、前記ロックの解放が要
求されたときにロックの解放を遅延させ、前記モニタ管
理構造体に解放遅延フラグをセットする手段と、再び前
記ロックの取得がスレッドから要求されたときに前記モ
ニタ管理構造体に記憶されたスレッド識別子とロックの
取得要求を行ったスレッドのスレッド識別子とを比較す
る手段と、ロックの取得の要求が前記第1のスレッドか
らのものであるか否かを判定する手段と、前記解放遅延
フラグを調べてロック解放が遅延されている否かを識別
する手段と、前記再度のロックの取得の要求が前記第1
のスレッドからのロックの取得要求であり、かつ、ロッ
ク解放が遅延されている場合、前記第1のスレッドに前
記ロックを継続して使用させる手段とを備えることを特
徴とする計算機システム。
4. In a computer system in which a plurality of threads can operate in parallel, means for acquiring a lock on a shared resource to be excluded from the first thread when the first thread requests the acquisition of the lock, Means for storing a thread identifier of the first thread in a monitor management structure provided in an exclusive shared resource unit, and delaying the release of the lock when the release of the lock is requested, the monitor management structure Means for setting a release delay flag to the thread, and comparing the thread identifier stored in the monitor management structure with the thread identifier of the thread which has issued the lock acquisition request when the lock is again requested by the thread. Means for determining whether or not the request to acquire the lock is from the first thread; and Means for identifying whether or not the lock release has been delayed; and
Means for causing the first thread to continue using the lock when the lock acquisition request is issued from the other thread and the lock release is delayed.
【請求項5】 前記再度のロックの取得の要求が前記第
1のスレッドからのロックの取得要求でなく、他の第2
のスレッドからの要求であり、かつ、ロック解放が遅延
されている場合、ロックを取得した前記第1のスレッド
に割り込みを起こしてロックを解放させる手段をさらに
備えることを特徴とする請求項4記載の計算機システ
ム。
5. The request for acquiring a lock again is not a request for acquiring a lock from the first thread, but another request for acquiring a lock.
5. The system according to claim 4, further comprising: means for interrupting the first thread that has acquired the lock to release the lock when the request is from the first thread and the lock release is delayed. Computer system.
JP2000070840A 2000-03-14 2000-03-14 Exclusive control method and computer system Pending JP2001256065A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000070840A JP2001256065A (en) 2000-03-14 2000-03-14 Exclusive control method and computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000070840A JP2001256065A (en) 2000-03-14 2000-03-14 Exclusive control method and computer system

Publications (1)

Publication Number Publication Date
JP2001256065A true JP2001256065A (en) 2001-09-21

Family

ID=18589510

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000070840A Pending JP2001256065A (en) 2000-03-14 2000-03-14 Exclusive control method and computer system

Country Status (1)

Country Link
JP (1) JP2001256065A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100902977B1 (en) 2006-05-06 2009-06-15 엔비디아 코포레이션 Hardware sharing system and method
JP2010524054A (en) * 2007-03-30 2010-07-15 インターナショナル・ビジネス・マシーンズ・コーポレーション Method, system, and computer program therefor for managing memory access in an emulated processing environment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100902977B1 (en) 2006-05-06 2009-06-15 엔비디아 코포레이션 Hardware sharing system and method
JP2010524054A (en) * 2007-03-30 2010-07-15 インターナショナル・ビジネス・マシーンズ・コーポレーション Method, system, and computer program therefor for managing memory access in an emulated processing environment
JP4738548B2 (en) * 2007-03-30 2011-08-03 インターナショナル・ビジネス・マシーンズ・コーポレーション Method, system, and computer program therefor for managing memory access in an emulated processing environment

Similar Documents

Publication Publication Date Title
US5524247A (en) System for scheduling programming units to a resource based on status variables indicating a lock or lock-wait state thereof
US7650605B2 (en) Method and apparatus for implementing atomicity of memory operations in dynamic multi-streaming processors
JP3575593B2 (en) Object lock management method and apparatus
JPH07191944A (en) System and method for prevention of deadlock in instruction to many resources by multiporcessor
KR100976280B1 (en) Multi processor and multi thread safe message queue with hardware assistance
US5893157A (en) Blocking symbol control in a computer system to serialize accessing a data resource by simultaneous processor requests
US11221891B2 (en) Generic concurrency restriction
US20070067770A1 (en) System and method for reduced overhead in multithreaded programs
CA2165493A1 (en) Method and apparatus for crash safe enforcement of mutually exclusive access to shared resources in a multitasking computer system
US20090059951A1 (en) Program control device
WO2011096163A1 (en) Information processing system, exclusive control method, and program for exclusive control
JP2001265611A (en) Computer system, memory management method, storage medium and program transmitter
JP3546694B2 (en) Multi-thread computer system and multi-thread execution control method
US5708808A (en) Method and apparatus for concurrency with critical regions
Takada et al. A novel approach to multiprogrammed multiprocessor synchronization for real-time kernels
EP1299801B1 (en) Method and apparatus for implementing atomicity of memory operations in dynamic multi-streaming processors
US20100037086A1 (en) Robust critical section design in multithreaded applications
Lehey Improving the FreeBSD SMP Implementation.
JP7346649B2 (en) Synchronous control system and method
JP2001256065A (en) Exclusive control method and computer system
US7689992B2 (en) Sharing lock mechanism between protocol layers
JPH0855092A (en) Processor system and its control method
JPH01297760A (en) System for lock control and task control in multiprocessor
JPH07319716A (en) Exclusive control system for resources of computer system
US7788529B2 (en) Method for safely interrupting blocked work in a server