Ignore:
Timestamp:
May 8, 2023, 4:53:10 PM (13 months ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
84018e0
Parents:
c0527f8
Message:

added various small edits and resolved some action items

File:
1 edited

Legend:

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

    rc0527f8 r2d831a1  
    1313Both languages are highly restrictive.
    1414Kahn's language restricts a reading process to only wait for data on a single channel at a time and different writing processes cannot send data on the same channel.
    15 Hoare's language restricts ...
     15Hoare's language restricts channels such that both the sender and receiver need to explicitly name the process that is destination of a channel send or the source of a channel receive.
     16These channel semantics remove the ability to have an anonymous sender or receiver and additionally all channel operations in CSP are synchronous (no buffering).
    1617Channels as a programming language feature has been popularized in recent years by the language Go, which encourages the use of channels as its fundamental concurrent feature.
    17 Go's restrictions are ...
     18Go's restrictions are ... \CAP{The only restrictions in Go but not CFA that I can think of are the closing semantics and the functionality of select vs. waituntil. Is that worth mentioning here or should it be discussed later?}
    1819\CFA channels do not have these restrictions.
    1920
     
    2324In the problem, threads interact with a buffer in two ways: producing threads insert values into the buffer and consuming threads remove values from the buffer.
    2425In general, a buffer needs protection to ensure a producer only inserts into a non-full buffer and a consumer only removes from a non-empty buffer (synchronization).
    25 As well, a buffer needs protection at each end resulting from concurrent access by multiple producers or consumers attempt to insert or remove simultaneously (MX).
     26As well, a buffer needs protection from concurrent access by multiple producers or consumers attempt to insert or remove simultaneously (MX).
    2627
    2728Channels come in three flavours of buffers:
     
    3435Infinite sized (unbounded) implies the communication is asynchronous, \ie the producer never waits but the consumer waits when the buffer is empty.
    3536Since memory is finite, all unbounded buffers are ultimately bounded;
    36 this restrict must be part of its implementation.
     37this restriction must be part of its implementation.
    3738\end{enumerate}
    3839
     
    4344
    4445\section{First-Come First-Served}
    45 As pointed out, a bounded buffer requires MX among multiple producers or consumers at either end of the buffer.
     46As pointed out, a bounded buffer requires MX among multiple producers or consumers.
    4647This MX should be fair among threads, independent of the FIFO buffer being fair among values.
    4748Fairness among threads is called \gls{fcfs} and was defined by Lamport~\cite[p.~454]{Lamport74}.
     
    6465
    6566\PAB{Discuss the Go channel implementation. Need to tie in FIFO buffer and FCFS locking.}
     67
    6668In this work, all channels are implemented with bounded buffers, so there is no zero-sized buffering.
     69\CAP{I do have zero size channels implemented, however I don't focus on them since I think they are uninteresting as they are just a thin layer over binary semaphores. Should I mention that I support it but omit discussion or just leave it out?}
    6770
    6871\section{Safety and Productivity}
Note: See TracChangeset for help on using the changeset viewer.