# Linda (coordination language)

In computer science, Linda is a model of coordination and communication among several parallel processes operating upon objects stored in and retrieved from shared, virtual, associative memory. It was developed by Sudhir Ahuja at AT&T Bell Laboratories in collaboration with David Gelernter and Nicholas Carriero at Yale University in 1986.

## Model

This model is implemented as a "coordination language" in which several primitives operating on ordered sequence of typed data objects, "tuples," are added to a sequential language, such as C, and a logically global associative memory, called a tuplespace, in which processes store and retrieve tuples.

The original Linda model requires four operations that individual workers perform on the tuples and the tuplespace:

• in atomically reads and removes—consumes—a tuple from tuplespace
• rd non-destructively reads a tuplespace
• out produces a tuple, writing it into tuplespace (tuple may be duplicated in tuplespace)
• eval creates new processes to evaluate tuples, writing the result into tuplespace

## Linda-calculus

The Linda-calculus is a formalisation of the above model with the difference that in the following $\mathrm {outeval}$ subsumes both out and eval operations. The presentation of the calculus is based on Cridlig et al.

### Syntax

We abstract the concrete representation of tuples. We just assume that we have a set of tuples $t\in {\mathcal {T}}$ and we are allowed to form and apply a substitution function $\sigma$ on tuples substituting variables for terms that yields a tuple. For example, given we have a tuple $t=({\mathit {hello}},x)$ , then applying a substitution $\sigma =\{{\mathit {world}}/x\}$ on $t$ yields $({\mathit {hello}},{\mathit {world}})$ The Linda-calculus processes are defined by the following grammar.

$P,Q::=t\;|\;\mathrm {outeval} (P).Q\;|\;\mathrm {rd} (t).P\;|\;\mathrm {in} (t).P\;|\;P+Q\;|\;\mathbf {rec} X.P\;|\;X$ The syntax includes the aftermentioned Linda operations, non-deterministic choice, and recursion. The substitution function is extended to processes recursively.

### Semantics

A tuple space is represented as a multiset of the processes. We write $M\,|\,P$ for $M\cup \{P\}$ where $M$ is a multiset, $\{P\}$ a singleton multiset, and $\cup$ is the multiset union operation. The semantics is then defined as a reduction relation on a multiset $M\rightarrow M'$ as follows.

${\begin{array}{lrcll}{\text{(outeval)}}&M\,|\,\mathrm {outeval} (P).Q&\rightarrow &M\,|\,P\,|\,Q&\\{\text{(read)}}&M\,|\,\mathrm {rd} (t).P\,|\,t'&\rightarrow &M\,|\,P\sigma \,|\,t'&{\text{if exists }}\sigma {\text{ such that }}t\sigma =t'\\{\text{(input)}}&M\,|\,\mathrm {in} (t).P\,|\,t'&\rightarrow &M\,|\,P\sigma &{\text{if exists }}\sigma {\text{ such that }}t\sigma =t'\\{\text{(left choice)}}&M\,|\,P+Q&\rightarrow &M\,|\,P&\\{\text{(right choice)}}&M\,|\,P+Q&\rightarrow &M\,|\,Q&\\{\text{(recursion)}}&M\,|\,\mathbf {rec} X.P&\rightarrow &M\,|\,P\{\mathbf {rec} X.P/X\}&\\\end{array}}$ Note that (input) consumes the tuple $t'$ from the tuple space whereas (read) only reads it. The resulting operational semantics is synchronous.

## Evaluation

Compared to other parallel-processing models, Linda is more orthogonal in treating process coordination as a separate activity from computation, and it is more general in being able to subsume various levels of concurrency—uniprocessor, multi-threaded multiprocessor, or networked—under a single model. Its orthogonality allows processes computing in different languages and platforms to interoperate using the same primitives. Its generality allows a multi-threaded Linda system to be distributed across multiple computers without change.

Whereas message-passing models require tightly-coupled processes sending messages to each other in some sequence or protocol, Linda processes are decoupled from other processes, communicating only through the tuplespace; a process need have no notion of other processes except for the kinds of tuples consumed or produced (data coupling).

Researchers have proposed more primitives to support different types of communication and co-ordination between (open distributed) computer systems, and to solve particular problems arising from various uses of the model.[citation needed] Researchers have also experimented with various means of implementing the virtual shared memory for this model.[citation needed] Many of these researchers proposed larger modifications to the original Linda model, developing a family of systems known as Linda-like systems and implemented as orthogonal technology (unlike original version). An example of this is the language Ease designed by Steven Ericsson-Zenith.

## Implementations

Linda was originally implemented in C and Fortran, but has since been implemented in many programming languages, including:

Some of the more notable Linda implementations include:

• C-Linda or TCP-Linda - the earliest commercial and a widespread implementation of virtual shared memory for supercomputers and clustered systems from Scientific Computing Associates, founded by Martin Schultz.
• JavaSpaces - a Java-based tuplespace implementation that helped popularize distributed computing.
• TSpaces - a Java-based tuplespace platform from IBM.[undue weight? ]

## Criticisms

Criticisms of Linda from the multiprocessing community tend to focus on the decreased speed of operations in Linda systems as compared to Message Passing Interface (MPI) systems.[citation needed] While not without justification, these claims were largely refuted for an important class of problems. Detailed criticisms of the Linda model can also be found in Steven Ericsson-Zenith's book Process Interaction Models.

## Name

Linda is named after Linda Lovelace, an actress in the pornographic film Deep Throat, a pun on Ada's tribute to Ada Lovelace.

## Publications

• Gelernter, David; Carriero, Nicholas (1992). "Coordination Languages and their Significance". Communications of the ACM. 35 (2): 97–107. doi:10.1145/129630.129635. S2CID 7748555.
• Carriero, Nicholas; Gelernter, David; Mattson, Timothy; Sherman, Andrew (1994). "The Linda Alternative to Message-Passing systems". Parallel Computing. 20 (4): 633–655. doi:10.1016/0167-8191(94)90032-9.
• Wells, George. "Coordination Languages: Back to the Future with Linda" (PDF). Rhodes University. Archived from the original (PDF) on 2009-12-19.
• Sluga, Thomas Arkadius. "Modern C++ Implementation of the LINDA coordination language". University of Hannover. Missing or empty |url= (help)
{"ft_lang_label":"__label__en","ft_lang_prob":0.82028455,"math_prob":0.88526314,"size":7312,"snap":"2021-04-2021-17","text_gpt3_token_len":1743,"char_repetition_ratio":0.12027915,"word_repetition_ratio":0.0,"special_character_ratio":0.2375547,"punctuation_ratio":0.14913657,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97678167,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"im_url_duplicate_count":[null,8,null,null,null,null,null,8,null,8,null,null,null,8,null,8,null,8,null,5,null,null,null,null,null,null,null,8,null,8,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-01-21T19:33:04Z\",\"WARC-Record-ID\":\"<urn:uuid:4b12c411-d259-4b58-85e9-5b5e51180e25>\",\"Content-Length\":\"91308\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:19b56962-2b27-4a43-abe2-c0df5488a691>\",\"WARC-Concurrent-To\":\"<urn:uuid:881e74fd-0477-4865-9459-276740943b00>\",\"WARC-IP-Address\":\"208.80.154.224\",\"WARC-Target-URI\":\"https://en.wikipedia.org/wiki/Linda_%28coordination_language%29\",\"WARC-Payload-Digest\":\"sha1:U573M22SKBXVDN3L4P5RNSOCXDJOEP2Q\",\"WARC-Block-Digest\":\"sha1:4YTC7TVSRYP7WNVXIPYHVQ5TYYHPSGN3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-04/CC-MAIN-2021-04_segments_1610703527224.75_warc_CC-MAIN-20210121163356-20210121193356-00450.warc.gz\"}"}