<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.formulasearchengine.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=18.111.105.211</id>
	<title>formulasearchengine - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.formulasearchengine.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=18.111.105.211"/>
	<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/wiki/Special:Contributions/18.111.105.211"/>
	<updated>2026-08-15T20:06:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.47.0-wmf.7</generator>
	<entry>
		<id>https://en.formulasearchengine.com/w/index.php?title=Endoreversible_thermodynamics&amp;diff=24214</id>
		<title>Endoreversible thermodynamics</title>
		<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/w/index.php?title=Endoreversible_thermodynamics&amp;diff=24214"/>
		<updated>2013-02-18T13:28:21Z</updated>

		<summary type="html">&lt;p&gt;18.111.105.211: more punctuation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Multiple issues|cleanup=May 2009|notability=May 2009|unreferenced =May 2009|&lt;br /&gt;
{{Expert-subject|Computer science|date=May 2009}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Suzuki-Kasami algorithm&#039;&#039;&#039;&amp;lt;ref&amp;gt;Ichiro Suzuki, Tadao Kasami, &#039;&#039;A distributed mutual exclusion algorithm&#039;&#039;, ACM Transactions on Computer Systems, Volume 3 Issue 4, Nov. 1985 (pages 344 - 349)&amp;lt;/ref&amp;gt; is a [[access token|token]]-based [[algorithm]] for achieving mutual exclusion in [[distributed systems]]. The process holding the token is the only process able to enter its critical section.&lt;br /&gt;
&lt;br /&gt;
If a process wants to enter its critical section and it does not have the token, it broadcasts a request message to all other processes in the system. The process that has the token, if it is not currently in a critical section, will then send the token to the requesting process. The algorithm makes use of increasing Request Numbers to allow messages to arrive out-of-order. &lt;br /&gt;
&lt;br /&gt;
== Algorithm description ==&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; be the number of processes. Each process is identified by an integer in &amp;lt;math&amp;gt;1, ..., n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Data structures ===&lt;br /&gt;
&lt;br /&gt;
Each process &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; maintains one data structure:&lt;br /&gt;
&lt;br /&gt;
* an array &amp;lt;math&amp;gt;RN_i[n]&amp;lt;/math&amp;gt; (for Request Number), where &amp;lt;math&amp;gt;RN_i[j]&amp;lt;/math&amp;gt; stores the last Request Number received from &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The token contains two data structures:&lt;br /&gt;
&lt;br /&gt;
* an array &amp;lt;math&amp;gt;LN[n]&amp;lt;/math&amp;gt; (for Last request Number), where &amp;lt;math&amp;gt;LN[j]&amp;lt;/math&amp;gt; stores the most recent Request Number of process &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; for which the token was successfully granted&lt;br /&gt;
* a queue Q, storing the ID of processes waiting for the token&lt;br /&gt;
&lt;br /&gt;
=== Algorithm ===&lt;br /&gt;
&lt;br /&gt;
==== Requesting the critical section (CS) ====&lt;br /&gt;
&lt;br /&gt;
When process &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; wants to enter the CS, if it does not have the token, it:&lt;br /&gt;
&lt;br /&gt;
* increments its sequence number &amp;lt;math&amp;gt;RN_i[i]&amp;lt;/math&amp;gt;&lt;br /&gt;
* sends a request message containing new sequence number to all processes in the system&lt;br /&gt;
&lt;br /&gt;
==== Releasing the CS ====&lt;br /&gt;
&lt;br /&gt;
When process &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; leaves the CS, it:&lt;br /&gt;
&lt;br /&gt;
* sets &amp;lt;math&amp;gt;LN[i]&amp;lt;/math&amp;gt; of the token equal to &amp;lt;math&amp;gt;RN_i[i]&amp;lt;/math&amp;gt;. This indicates that its request &amp;lt;math&amp;gt;RN_i[i]&amp;lt;/math&amp;gt; has been executed&lt;br /&gt;
* for every process &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; not in the token queue &amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt;, it appends &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;RN_i[k] = LN[k] + 1&amp;lt;/math&amp;gt;. This indicates that process &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; has an outstanding request&lt;br /&gt;
* if the token queue &amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt; is nonempty after this update, it pops a process ID &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt; and sends the token to &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;&lt;br /&gt;
* otherwise, it keeps the token&lt;br /&gt;
&lt;br /&gt;
==== Receiving a request ====&lt;br /&gt;
&lt;br /&gt;
When process &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; receives a request from &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; with sequence number &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;, it:&lt;br /&gt;
&lt;br /&gt;
* sets &amp;lt;math&amp;gt;RN_i[j]&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;max(RN_i[j], s)&amp;lt;/math&amp;gt; (if &amp;lt;math&amp;gt;s &amp;lt; RN_i[j]&amp;lt;/math&amp;gt;, the message is outdated)&lt;br /&gt;
* if process &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; has the token and is not in CS, and if &amp;lt;math&amp;gt;RN_i[j] == LN[j] + 1&amp;lt;/math&amp;gt; (indicating an outstanding request), it sends the token to process &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Executing the CS ====&lt;br /&gt;
&lt;br /&gt;
A process enters the CS when it has acquired the token.&lt;br /&gt;
&lt;br /&gt;
== Notes on the algorithm ==&lt;br /&gt;
&lt;br /&gt;
* Only the site currently holding the token can access the CS&lt;br /&gt;
:* All processes involved in the assignment of the CS&lt;br /&gt;
* [[Hypertext Transfer Protocol|Request]] messages sent to all [[Node (networking)|nodes]]&lt;br /&gt;
:* Not based on [[Lamport timestamps|Lamport’s logical clock]]&lt;br /&gt;
:* The algorithm uses sequence numbers instead&lt;br /&gt;
* Used to keep track of outdated requests&lt;br /&gt;
* They advance independently on each site&lt;br /&gt;
&lt;br /&gt;
The main design issues of the algorithm:&lt;br /&gt;
* Telling outdated requests from current ones&lt;br /&gt;
* Determining which site is going to get the token next&lt;br /&gt;
&lt;br /&gt;
Data structures used to deal with these two aspects:&lt;br /&gt;
* Each site Si has an array RNi[1..N] to store the sequence&lt;br /&gt;
* Number of the latest requests received from other sites&lt;br /&gt;
&lt;br /&gt;
The token contains two data structures:&lt;br /&gt;
* The token array LN[1..N] keeps track of the request executed most recently on each site&lt;br /&gt;
* The token queue Q is a queue of requesting sites&lt;br /&gt;
&lt;br /&gt;
=== Requesting the CS ===&lt;br /&gt;
* If the site does not have the token, then it increases its sequence number RNi[i] and sends a request(i, sn) message to all other sites (sn= RNi[i])&lt;br /&gt;
* When a site Sj receives this message, it sets RNj[i] to max(RNj[i], sn). If Sj has the idle token, them it sends the token to Si if RNj[i] = LN[i]+1&lt;br /&gt;
&lt;br /&gt;
=== Executing the CS ===&lt;br /&gt;
* Site Si executes the CS when it has received the token&lt;br /&gt;
&lt;br /&gt;
=== Releasing the CS ===&lt;br /&gt;
* When done with the CS, site Si sets LN[i] = RNi[i]&lt;br /&gt;
* For every site Sj whose ID is not in the token queue, it appends its ID to the token queue if RNi[j] =LN[j]+1&lt;br /&gt;
* If the queue is not empty, it extracts the ID at the head of the queue and sends the token to that site&lt;br /&gt;
&lt;br /&gt;
=== Performance ===&lt;br /&gt;
* either 0 or n messages for CS invocation (no messages if process holds the token; otherwise &amp;lt;math&amp;gt;N - 1&amp;lt;/math&amp;gt; requests and &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; reply)&lt;br /&gt;
* Synchronization delay is 0 or N&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Distributed algorithms]]&lt;/div&gt;</summary>
		<author><name>18.111.105.211</name></author>
	</entry>
</feed>