<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Distributed computer system is a set of autonomous computers connected by a network of transmission channels and equipped with a distributed system software. This is a work environment for a class of tasks of common objective; the network is a communication infrastructure only. Main features of distributed systems dealt with here are: • absence of common clock for all computers -no global time provided by external service</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<affiliation key="aff0">
								<orgName type="institution">University of Economics and Computer Science Vistula</orgName>
								<address>
									<settlement>Warsaw</settlement>
								</address>
							</affiliation>
						</author>
						<author>
							<affiliation key="aff1">
								<orgName type="department">Institute of Informatics</orgName>
								<orgName type="institution">The University of Warsaw</orgName>
							</affiliation>
						</author>
						<title level="a" type="main">Distributed computer system is a set of autonomous computers connected by a network of transmission channels and equipped with a distributed system software. This is a work environment for a class of tasks of common objective; the network is a communication infrastructure only. Main features of distributed systems dealt with here are: • absence of common clock for all computers -no global time provided by external service</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">52774BAF758382E88820E2EFE6208370</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-25T03:17+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract/>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>• absence of physical memory common to each computer -message exchange by the network A schematic structure of distributed system with distributed shared memory (DSM) is illustrated in Fig. <ref type="figure">1</ref> ([Cz 2012]).</p><p>Fig. <ref type="figure">1</ref> Assumptions and denotations:</p><p>• the computers work in parallel and are numbered 1,2,...,n</p><p>• reading and writing is governed by the memory manager of each computer;</p><p>• each message is accompanied by a global timestamp -a pair of computer number and compensated local timestamp;</p><p>• there is one critical section assuring mutually exclusive usage of a resource by the computers;</p><p>• no hardware or software failure happens during performing the mutual exclusion mechanism;</p><p>• computer number i keeps a vector r i = [r i1 ,r i2 ,...,r in ] of variables r ij allocated in its physical memory; it stores a global timestamp in the component r ii when requesting for the critical section;</p><p>• computer number i stores in r ij a copy of a global timestamp stored by the computer number j in r jj when it requested for the critical section;</p><p>• initially all variables r ij contain ∞ ;</p><p>• by min(r i ) the least value of the components in r i is denoted;</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Protocol of the mutually exclusive usage of a resource by computer number i</head><p>Fig. <ref type="figure" target="#fig_0">2</ref> shows a transition graph of the protocol based on global timestamps. </p><formula xml:id="formula_0">S i ={W i , B i , Y i , R i , P i } • state of computer number i: Q i ࢠ S i • transit Q i Î Q' i :</formula><p>given by the transition graph of the protocol</p><formula xml:id="formula_1">• set of global states: S = S 1 × × × × S 2 × × × ×…× × × × S n satisfying: if [Q 1 , Q 2 , …,Q n ] ࢠ S then ¬ ¬ ¬ ¬∃ ∃ ∃ ∃i,j: (i≠ j ∧ ∧ ∧ ∧ Q i = R i ∧ ∧ ∧ ∧ Q j = R j )</formula><p>• state of the whole system:</p><formula xml:id="formula_2">Q = [Q 1 , Q 2 , …,Q n ] ࢠ S • initial state: [W 1 , W 2 ,… ,W n ] with r ij = ∞ in each local state W i • transit Q Q' there exist Q i ࢠ S i and Q' i ࢠ S i with Q i Î Q' i and if ¬ ¬ ¬ ¬Q j Î Q' j then Q j = Q' j Example [W 1 ,W 2 ,W 3 ,W 4 ] [B 1 ,B 2 ,B 3 ,W 4 ] [Y 1 ,Y 2 ,R 3 ,B 4 ] [Y 1 ,Y 2 ,R 3 ,Y 4 ] [R 1 ,Y 2 ,P 3 ,Y 4 ] [R 1 ,Y 2 ,W 3 ,Y 4 ] [P 1 ,R 2 ,W 3 ,Y 4 ] [W 1 ,R 2 ,W 3 ,Y 4 ] [W 1 ,P 2 ,W 3 ,R 4 ] [W 1 ,W 2 ,W 3 ,P 4 ] [W 1 ,W 2 ,W 3 ,W 4 ]</formula><p>Attendant circumstances of the DSM usage:</p><p>-time consumptive transmission with data marshalling/unmarshalling; -necessity of time compensation (various frequency of computer clocks);</p><p>-overlapping (concurrent) memory accesses;</p><p>-possible data replication (cache);</p><p>They bring on the following consequences and problems to be tackled:</p><p>• a message directed to a group of receivers is delivered at different moments; hence memory locations alloted to this message may hold different content at a time;</p><p>• reading a memory location may fetch content different from that assigned to this location by its latest (?) (by global time) actualization (writing);</p><p>• suspension of the system activity for a period of any memory access would solve the above problems, thus to achieve data consistency but is unacceptable by reason of dramaic decrease of system performance; locking of access operations -too restrictive!</p><p>• need of a compromise between data consistency and effectiveness;</p><p>• weakening of data consistency -when this does not violate requirements of system's main objectives; example: frequent stocked goods actualization (written) of chain-stores network may be seen (read) different in different countries; data consistency maintenance -unnecessary effort!</p><p>• degrees of resignation from consistency to enhance effectiveness -bring on the so-called models of consistency;</p><p>• consistency models are usually explained informally -not always univocally; precise understanding them by users of DSM is one of disadvantages of DSM; hence need of their formal description;</p><p>• but formal description of consistency models must be based on a formal model of computing thus: (1) on actions and states as primary units of computing (2) on interleaving or non-interleaving ("true concurrency") model of computing;</p><p>• common descriptions of consistency models in DSM admit actions read and write from/to memory (fetch and update) as primary units and, informally, non-interleaving computing model;</p><p>• but read/write actions are too coarse to formally express memory consistency in the interleaving model along with retaining efficiency provided by true concurrency model;</p><p>• partial order of read/write not always is linearizable, i.e. their arrangement in sequence with retaining result of concurrent computation not always possible;</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Example of non-linearizability</head><p>Notation: w(z,α) j , r(z,α) j -operations of writing and reading value α to/from variable (memory cell) z by computer j. Initially x = 0, y = 0. Scenario of not linearizable computing: </p><formula xml:id="formula_3">w(x,3) 1 ã r(y,0) 1 (1) r(y,0) 1 ã w(y,2) 2 (3) w(y,2) 2 ã r(x,0) 2 (2) r(x,0) 2 ã w(x,3) 1 (4)</formula><p>ã -global time precedence, -flow of write result r(y,0) 1 ã w(y,2) 2 ã r(x,0) 2 ã w(x,3) 1 ã r(y,0) 1 r(x,0) 2 ã w(x,3) 1 ã r(y,0) 1 ã w(y,2) 2 ã r(x,0) 2 contradictions!</p><p>Remarks, consequences:</p><p>• actions w(x,3) 1 , r(y,0) 1 , w(y,2) 2 , r(x,0) 2 cannot be interleaved in one sequence so that to retain result of the concurrent computation;</p><p>• scheduling protocol for linearization of accesses to DSM not always possible: serial equivalence to each computing scenario impossible;</p><p>• difficulty with formal description of consistency issues within the "true concurrency" model; expressions like "seen by processes", etc. are intuitive;</p><p>• instead of time-extensive actions read/write, let us take atomic (timeless) events of their beginnings and ends: ‫ݓ‬ ഥ(z,α) j , w(z,α) j , ‫ݎ‬ҧ (z,α) j , r(z,α) j ; finer granularity allows for applying interleaving model.</p><p>• assumption: a process completes reading and writing a cell with the same value as commenced; another process may change this value between these events.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Strict consistency</head><p>Informally: a value read from any cell (variable) is either the initial value or the one written to it prior to the reading, and between these operations no writing to this cell occured. Note: "prior" is undefined since there is no global system clock. Let: Q = q 1 q 2 …q n ࢠ IL and</p><formula xml:id="formula_4">q i = r(x,a) f ࢠ R (i = 1,2,…,n). Q is strictly consistent iff:</formula><p>-either q i is the first such event in the interleaving Q -or there exists q k = w(x,a) g ࢠ W where k &lt; i and there is no</p><formula xml:id="formula_5">q l = w(x,b) h ࢠ W such that k &lt; l &lt; i with b ≠ a.</formula><p>DSM is strictly consistent iff every interleaving generated by the DSM protocols is strictly consistent.</p><p>Example of not strictly consistent interleaving: w(x,0) 2 w(x,1) 3 r(x,0) 1 r(x,1) 2</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Memory coherence [D-S-B 1988]</head><p>S = {P 1 , P 2 ,…, P N } -system of sequential programs running in computers numbered 1,2,…,N with DSM;</p><p>V j -set of variables of program P j allocated in the local memory of computer number j; D j -set of values the variables may assume; </p><formula xml:id="formula_6">σ j : V j Î D j -</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Sequential consistency [La 1979]</head><p>Informally: (1) partial order of read/write operations always linearizable; (2) order of events in each interleaving is identical with order of their occurrences during execution in every individual program;</p><p>(3) all locations of the same variable in DSM contain identical value "seen" by every computer after its actualization (memory coherence).</p><p>Let Q j be a subsequence of an interleaving Q = q 1 q 2 …q n ࢠ IL resulted from removal of events different from events issued by program P j .</p><p>Q is sequentially consistent if for every j = 1,2,…,N, events in Q j occur in the order determined by programmer of the program P j .</p><p>DSM is sequentially consistent iff every interleaving generated by the DSM protocols is sequentially consistent and DSM is coherent.</p><formula xml:id="formula_7">U N 1 j j = = V V V V V V V V U N 1 j j = = D D D D D D D D U N 1 j j = σ = σ</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Causal consistency [H-A 1990]</head><p>Informally: causal consistency requires that every two causally dependent write actions, be "seen" (readout) in every process in the same order. That is, events q i , q j ∈ ∈ ∈ ∈ W , where q i , is a cause of effect q j , are "seen" by events q k , q l ∈ ∈ ∈ ∈R in the same process, then q k must precede q l .</p><p>Let RW = R ∪ ∪ ∪ ∪ W and ⊆ ⊆ ⊆ ⊆ RW × RW denote a causality relation defined by means of the following primary relations:</p><p>(1) iff p = q or p occurs before q in the same process;</p><p>(2) iff event q∈R terminates reading a certain value α of a variable x assigned to x by writing operation terminating with event p∈W ;</p><p>(3) iff event p∈R terminates reading a certain value α of a variable x needed for computing a value β = f(α) assigned afterwards to a variable y by writing operation terminating with event q∈W ;</p><p>(4) events p and q in (2) and (3) may occur in the same or different processes; they are called cause and effect respectively.</p><p>Causality relation is the least relation in the set RW satisfying:</p><p>(i) if or or then p q (ii) If p q and q r then p r</p><p>Events p, q are in the relation of cause and effect if p q.</p><p>Events p, q are independent (concurrent) if neither p q nor q p, write then q || p Interleaving Q = q 1 q 2 …q n ࢠ IL is causally consistent wrt. relation if for any two elements q i , q j ∈ ∈ ∈ ∈ W with q i q j the following holds:</p><p>If there are elements q k , q l ∈ ∈ ∈ ∈ R both belonging to the same process and such that and then But if for some q i , q j ∈ ∈ ∈ ∈ W with q i q j reverse succession holds then Q is causally inconsistent.</p><p>DSM is causally consistent iff every interleaving generated by the DSM protocols is causally consistent. q p process q p reading q p writing q p process q p reading q p writing k reading i q p l reading j q p l process k q p k process l q p Causal consistency and inconsistency may be represented by diagrams in Fig. <ref type="figure">3</ref> Informally: weaker than causal consistency model: if some values are written by the same process in a certain order and read ("seen") by another process, then the reading must take place in the same order as writing Formal definition is similar to causal consistency: causal dependence q i q j should be replaced with only.</p><p>Thus PRAM consistency and inconsistency may be represented by diagrams in Fig. <ref type="figure">4</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>PRAM consistency Fig.4 PRAM inconsistency</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Weak consistency [D-S-B 1986]</head><p>While aforesaid models of data consistency ensure access to DSM by respective protocols supporting a chosen model without user's intervention, efficiency of the system may sometimes justify such intervention -for the prize of transparency, one of the desirable features of distributed systems. The weak consistency model provides users with the so-called synchronization variables, counterparts of semaphores in centralized systems. Access to them takes place as in the case of sequential consistency model -in any process they occur in the order specified by the program evoking this process. The users are provided with means to create critical sections applying e.g. protocol illustrated in Fig. <ref type="figure" target="#fig_0">2</ref>. During execution of such critical section no other process may access data protected by this critical section until their actualization is finished. No data access is permitted until all previous accesses to synchronization variables are completed. </p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Fig. 2 •</head><label>2</label><figDesc>Fig.2</figDesc><graphic coords="2,78.56,394.00,435.12,236.64" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head></head><label></label><figDesc>global time position of r/w in processes relative to global time: position of r/w ensuing from values read by processes:</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head></head><label></label><figDesc>of variables used in programs with DSM D -set of values the variables may assume R -set of events of the form ‫ݎ‬ҧ (z,a) j and r(z,a) j W -set of events of the form ‫ݎ‬ҧ (z,a) j and w(z,a) j R* -set of all finite sequences of elements from R W* -set of all finite sequences of elements from W IL = R* # W* -union of all interleavings of sequences from R* i W*</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head></head><label></label><figDesc>function being a state of the local memory of computer P j ; -set of variables of the system S; -set of values the variables may assume; DSM is coherent if the union of functions: is a function σ: V Î D (global state of DSM), that is: if x = y then σ(x) = σ(y) for x, y ∈ ∈ ∈ ∈V Example: σ 1 = {(a,0), (b,1)} σ 2 = {(a,1), (b,1)}, σ 1 ∪ ∪ ∪ ∪ σ 2 = {(a,0), (a,1), (b,1)} Not coherent memory of the system S = {P 1 , P 2 }.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0"><head></head><label></label><figDesc></figDesc><graphic coords="1,126.56,437.32,342.24,205.44" type="bitmap" /></figure>
		</body>
		<back>
			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Conclusion</head><p>The sample of five mentioned models of data (or memory) consistency is probably the most common in applications. But a formalization and analysis of quite long list of these and other models might propose a challenging research topic. Apart from the discussed above, a list (not exhaustive) of consistency models contain the following: entry, release, scope, process, cache, fork, eventual, session, read-your-write, monotonic-read, monotonic-write. Every one is a sort of a "contract" between the memory management (sub)system and usage of DSM, stating that if the contracted rules are observed then the memory will behave in accordance with the rules accepted by the user.</p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Exclusive Access to Resources in Distributed Shared Memory Architecture</title>
		<author>
			<persName><forename type="first">L</forename><surname>Cz ; Czaja</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Dubois</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Scheurich</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><forename type="middle">A</forename><surname>Briggs</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Dubois</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Scheurich</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><forename type="middle">A</forename><surname>Briggs</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Lamport</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs</title>
				<imprint>
			<date type="published" when="1979">2012. 2012. 1988. La 1979. 1979</date>
			<biblScope unit="volume">119</biblScope>
			<biblScope unit="page" from="690" to="691" />
		</imprint>
	</monogr>
	<note>Fundamenta Informaticae</note>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
