Skip to content

Mention that sending to a Sink at the same time has no well-defined order #2974

@stevefan1999-personal

Description

@stevefan1999-personal

I also realize another problem that, given a stream S and sink W, which is forked into W_a and W_b, when both W_a and W_b sends data at the same time, when S fetches the data, should it be W_a or W_b? The current document does not mention that for Sink as well.

The (not so realistic) solution: requires an arbitrator to decide the order.

This is particularly problematic for channel because two threads can send data to a channel at the same time.

Although we usually have a ring buffer, but keep in mind that the ring buffer actually formed a FIFO, which can be seen as a form of First-Come-First-Serve arbitrator.

If we dig deeper and talk about CPU threads and multithreading, this is is further arbitrated by cache coherence protocol such as MESI or Dragonfly...and in the end, arbitrated by electronic arbiter about whose electric signal hit first.

Extension of #2973, that I also find this kind of funny

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions