Changeset 5384793


Ignore:
Timestamp:
Jun 30, 2023, 4:55:01 PM (18 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
1ae3ac46
Parents:
fb4b283
Message:

use FIFO abbrev in channel chapter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/colby_parsons_MMAth/text/channels.tex

    rfb4b283 r5384793  
    99This model is an alternative to shared-memory concurrency, where threads communicate directly by changing shared state.
    1010
    11 Channels were first introduced by Kahn~\cite{Kahn74} and extended by Hoare~\cite{Hoare78} (CSP).
     11Channels were first introduced by Kahn~\cite{Kahn74} and extended by Hoare~\cite{CSP} (CSP).
    1212Both papers present a pseudo (unimplemented) concurrent language where processes communicate using input/output channels to send data.
    1313Both languages are highly restrictive.
     
    4747
    4848In 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.
     49For example, the buffer can be \gls{lifo}, \gls{fifo}, or prioritized with respect to insertion and removal.
    5050However, like MX, a buffer should ensure every value is eventually removed after some reasonable bounded time (no long-term starvation).
    5151The simplest way to prevent starvation is to implement the buffer as a queue, either with a cyclic array or linked nodes.
     
    5353\section{First-Come First-Served}
    5454As pointed out, a bounded buffer requires MX among multiple producers or consumers.
    55 This MX should be fair among threads, independent of the FIFO buffer being fair among values.
     55This MX should be fair among threads, independent of the \gls{fifo} buffer being fair among values.
    5656Fairness among threads is called \gls{fcfs} and was defined by Lamport~\cite[p.~454]{Lamport74}.
    5757\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.
     
    6868Currently, only the Go programming language provides user-level threading where the primary communication mechanism is channels.
    6969Experiments 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-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.
     70With 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.
    7171Performance of channels can be improved by sharding the underlying buffer \cite{Dice11}.
    72 However, the FIFO property is lost, which is undesirable for user-facing channels.
     72However, the \gls{fifo} property is lost, which is undesirable for user-facing channels.
    7373Therefore, the low-level channel implementation in \CFA is largely copied from the Go implementation, but adapted to the \CFA type and runtime systems.
    7474As 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.