Changeset 5384793
- Timestamp:
- Jun 30, 2023, 4:55:01 PM (18 months ago)
- Branches:
- master
- Children:
- 1ae3ac46
- Parents:
- fb4b283
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/colby_parsons_MMAth/text/channels.tex
rfb4b283 r5384793 9 9 This model is an alternative to shared-memory concurrency, where threads communicate directly by changing shared state. 10 10 11 Channels were first introduced by Kahn~\cite{Kahn74} and extended by Hoare~\cite{ Hoare78} (CSP).11 Channels were first introduced by Kahn~\cite{Kahn74} and extended by Hoare~\cite{CSP} (CSP). 12 12 Both papers present a pseudo (unimplemented) concurrent language where processes communicate using input/output channels to send data. 13 13 Both languages are highly restrictive. … … 47 47 48 48 In general, the order values are processed by the consumer does not affect the correctness of the producer-consumer problem. 49 For example, the buffer can be LIFO, FIFO, or prioritized with respect to insertion and removal.49 For example, the buffer can be \gls{lifo}, \gls{fifo}, or prioritized with respect to insertion and removal. 50 50 However, like MX, a buffer should ensure every value is eventually removed after some reasonable bounded time (no long-term starvation). 51 51 The simplest way to prevent starvation is to implement the buffer as a queue, either with a cyclic array or linked nodes. … … 53 53 \section{First-Come First-Served} 54 54 As pointed out, a bounded buffer requires MX among multiple producers or consumers. 55 This MX should be fair among threads, independent of the FIFObuffer being fair among values.55 This MX should be fair among threads, independent of the \gls{fifo} buffer being fair among values. 56 56 Fairness among threads is called \gls{fcfs} and was defined by Lamport~\cite[p.~454]{Lamport74}. 57 57 \gls{fcfs} is defined in relation to a doorway~\cite[p.~330]{Lamport86II}, which is the point at which an ordering among threads can be established. … … 68 68 Currently, only the Go programming language provides user-level threading where the primary communication mechanism is channels. 69 69 Experiments were conducted that varied the producer-consumer algorithm and lock type used inside the channel. 70 With the exception of non-\gls{fcfs} or non- FIFOalgorithms, no algorithm or lock usage in the channel implementation was found to be consistently more performant that Go's choice of algorithm and lock implementation.70 With the exception of non-\gls{fcfs} or non-\gls{fifo} algorithms, no algorithm or lock usage in the channel implementation was found to be consistently more performant that Go's choice of algorithm and lock implementation. 71 71 Performance of channels can be improved by sharding the underlying buffer \cite{Dice11}. 72 However, the FIFOproperty is lost, which is undesirable for user-facing channels.72 However, the \gls{fifo} property is lost, which is undesirable for user-facing channels. 73 73 Therefore, the low-level channel implementation in \CFA is largely copied from the Go implementation, but adapted to the \CFA type and runtime systems. 74 74 As such the research contributions added by \CFA's channel implementation lie in the realm of safety and productivity features.
Note: See TracChangeset
for help on using the changeset viewer.