CSA Flashcards
What does “embarrassingly parallelisable” mean?
A task can be parallelised without any information needing to be exchanged between threads.
What is a mutual exclusion?
Only one thread is allowed to access some data at a given time, it must have acquired a lock on the data.
How does a channel work in Go?
Shared memory with a mutex protecting it. Sender locks before writing data, and receiver locks before deleting the data.
Flow of TCP/IP layers
What is the TCP/IP Application layer?
- Used by the applications the user is interacting with.
- Defines protocols for using the network, error handling and recovery
- HTTP/S, FTP, DNS
TCP/IP Transport layer
- First layer that breaks down messages into packets
- Common features: reliability, flow control
- TCP/UDP/QUIC
TCP/IP Internet layer
- Responsible for routing packets through an internet
- Decide next hop a packet needs to take
- Handle errors in packet transmission
- Reassembles packets at destination
- IPv4/IPv6
TCP/IP Link layer
- Concerns the network layer that is physically connected
- Protocols to convert data to signals along wires
- Protocols to handle ethernet/wifi/etc
- E.g. MAC Addresses
What is livelock?
When a distributed program descends into an endless sequence of interaction with different components of itself, excluding interaction with the outside world.
What is the general idea of CSP?
Reduce the description of a program to only its interactive behaviours.
What is a CSP process?
- Independent, sequential entity
- Engage in events (operations visible to the environment)
- May communicate with other processes via common events
- Completely described by their possible event sequences
What are primitive processes?
Represent fundamental, predefined behaviours such as:
- STOP (process that communicates nothing e.g. deadlock)
- SKIP (process that terminated succesfully)
What are events?
Represent visible behaviours of a process (e.g. communications) which are atomic and instantaneous.
The set of all possible atomic events of a process P is its alphabet (or interface) written as α(P)
What is prefixing?
Describing a process as an event followed by another process e.g:
SVM = coin -> STOP
SVM = coin -> (choc -> STOP)
For convenience we sometimes leave out the brackets, but do this ONLY when no strict CSP is asked for.
What is a choice?
A choice describes alternate paths a process can take e.g:
Wait = green -> Walk | red -> Wait
Choices can be made amongst any finite number of events.
Choices are either internal (made by the process) or external (made by the environment).