Distributed systems

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/70

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:57 AM on 12/12/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

71 Terms

1
New cards

Distributed system

Collection of mostly autonomous processor collaborating over a communication network (aren’t connected by common clock)

2
New cards

Features of a distributed system

Geographical separation, no shared memory, autonomy and heterogeneity

3
New cards

Circuit switching

Wires connect networks which are controlled using circuit switches to link certain devices. (guarantee connection, inefficient management)

4
New cards

Packet switching

Messages are broken up and sent via the quickest path across a network to their destination (reliable, high utilisation, must have routing tables)

5
New cards

Client-server model

Centra server connects to clients, who submit requests to server. Servers may query other servers, simpler for client

6
New cards

Peer-to-peer network

Clients connect to each other without need for a central server. Clients share information.

7
New cards

TCP/IP layers

Application, Transport, Internet, Link

8
New cards

Application layer

Used by the applications the user is interacting with, defines protocols to user services, error handling and recovery

9
New cards

Transport layer

Breaks messages down into packets, handshake/checksum, designates how packets will be sent

10
New cards

Internet layer

Routes packets, protocols include deciding the next hop, handling errors in transmission and reassembling packets at destination

11
New cards

Link layer

Network architecture that is physically connected, protocols include converting data to signals to pass along wires

12
New cards

UDP

minimalist, connectionless communication protocol (doesn’t set up connection between clients and uses 8 bytes for header. Lightweight & easy to set up but can’t confirm packet transmission

13
New cards

UDP header

Source port the packet originates from (0 if not used), Destination port, Length of packet + header in bytes (min. of 8, max. of 65507 (IP header is 20 bytes long)), 16 bit one’s-complement sum of all 16-but chunks of data

14
New cards

UDP packet creation

Convert message to binary, add header details, calculate checksum using pseudo header, pass packet to internet layer

15
New cards

TCP

Provides abstraction over the network to detect missing packets and request re-sending.

16
New cards

TCP header

UDP Header + Sequence number, Acknowledgement number, data offset (length of header & additional info), Flags, Window size (how much data receiver wants), Urgent pointer (with URG flag specifies that data is urgent until SEQ + Pointer), Reserved

17
New cards

TCP header flags

SYN (synchronise sequence numbers in initial communication), ACK (whether acknowledgement number is relevant), URG (whether urgent pointer is relevant), FIN (indicates final packet)

18
New cards

TCP handshake

Client sends SYN (seq = x), Server sends SYN-ACK (seq=y, ack=x+1), Client sends SYN-ACK (seq=x+1, ack=y+1)

19
New cards

TCP termination

Client sends FIN, Server acknowledges and sends own FIN, Client acknowledges FIN, waits some period of time then closes connection

20
New cards

Message passing paradigm

Client/servers programmed to know meaning of messages. So clients send messages to the server and relies on the server to understand what it wants. Server replies based on context

21
New cards

Request reply protocol

Client sends input to server, server gets request and selects operation to perform based on that input, then sends a response back to the client.

22
New cards

RPC calls

Used to avoid handling message passing as programmers. We treat execution on other machines as just a function call

23
New cards

Indirect communication

Communicating via an intermediary with no direct coupling between the sender and receivers. Allows for space and time uncoupling

24
New cards

Space uncoupling

Only the broker needs to know if we upgrade/replace the sender or modify a receive

25
New cards

Time uncoupling

Senders and receivers are truly asynchronous, one can be offline and the system will still work

26
New cards

Broker network

Single conceptual identity of multiple machines updating each other and the sender/receivers. Fixes single point of failure

27
New cards

Publish-subscribe model

system where one group can publish information on specific topics and one group can receive information they are interest in (many to many)

28
New cards

Memory managers

One per process, sends messages about local updates to the system and retrieves addressed memory that isn’t cached locally

29
New cards

Distributed memory

Virtual memory can be split across devices which are running processes. Processes still have their own local memory which acts like cache

30
New cards

Disadvantages of distributed memory

Message passing problem still exists, can cause slowdown or deadlock, cache misses are unpredictable and expensive. Useful for parallel applications or those with non-overlapping lifetimes

31
New cards

Tuple spaces

Distributed shared memory that doesn’t use memory. Tuples are sequences of elements, Processors can write, read and take from tuple space. Read and take are blocking so can be used to synchronise

32
New cards

Global state

The set of local states of each individual processes involved int he system plus the state of the communication channels

33
New cards

Local state

Process (the current state of all local memory and history of actions) and Communication channel (all messages currently in transit)

34
New cards

Consistent global state

Conservation of messages (every sent must either be in transit or received), No effects without causes (if not recorded as being sent, it should not be seen in transit or received)

35
New cards

Cuts

Represent global state. It is consistent if it follows rules for a consistent global state

36
New cards

Network time protocol

Designed to synchronise clocks over multiple machines. Trustworthy servers fix drift from local clocks.

37
New cards

Logical time system

Local time (process keeps track to update its own events locally), Global time (process uses this to keep timestamps consistent with other parts of the global system)

38
New cards

Logical clock

Keeps track of the ordering of events C(Mi) returns a value which is the timestamp of the message Mi within the system

39
New cards

Consistent Logical time

For two events e1 → e2 => C(e1) < C(e2)

40
New cards

Strongly consistent logical time

For two events e1 → e2 <=> C(e1) < C(e2)

41
New cards

total ordering

Using the process number to identify events.

42
New cards

vector equality

All elements the same as their counterpart

43
New cards

vector partially ordered

all elements less than or equal to their counterpart

44
New cards

vector fully ordered

all elements less than or equal to their counterparts with at least strictly less than

45
New cards

vector parallel

not fully ordered in either case and are not equivalent

46
New cards

vector causality

if one scalar is less than the other

47
New cards

fully synchronous network

latency is no larger than upper bound which defines time in which messages are guaranteed in

48
New cards

Asynchronous network

messages and nodes mya stop working for no reason (no timing guarantee)

49
New cards

partially synchronous network

mostly synchronous but for some time may be asynchronous

50
New cards

synchroniser

checks that there are no messages lost/awaiting delivery and ensures nodes are not lagging behind.

51
New cards

process safety

synchroniser checks each round before progressing to the next round

52
New cards

simple synchroniser

Each process sends one message to every neighbour (if multiple need to be sent they are combined, if no message needs to be sent, a dummy message is). Once every process receives n-1 messages, continue.

53
New cards

alpha synchroniser

A node proceeds once it learns that its neighbours are safe (doesn’t wait for entire network). T = O(1), C = O(n²) (each process sends n-1 messages)

54
New cards

Beta synchroniser

Create a minimum spanning tree between all nodes, with the root node as the leader. Leaf nodes message their parent when they are safe. Once a parent is safe and has received messages from all its children, it will message its parent. Once the root is safe and has received messages from all its children, it will message nodes to continue. T = O(n), C = O(n) (2n messages sent)

55
New cards

gamma synchroniser

Split network into sub networks and create minimum spanning trees for each. Run the beta synchroniser on each sub network. Connect the leader of each tree and run the alpha synchroniser. T = O(h) (height of the highest tree), C = O(n) (each node sends 4 messages)

56
New cards

Election requirements

Guarantee at most one leader selected, Can have multiple running simultaneously, may be started by any node.

57
New cards

Simple election

Initiator tells all other processes to begin election, all processes share an identifier with each other. Node that never receives a higher identifier than itself is the leader. T = O(1), C = O(n²)

58
New cards

Logical topology

Application specific. Nodes are hosts participating in the algorithm and edges represent logical links

59
New cards

Neighbourhoods

To reduce overheads of fully connected networks, we connect nodes to a small subset. Nodes could be distant in the topology so messages may need multiple hops

60
New cards

Logical overlay

Logical topologies can be brought together as part of a hierarchy. (Each node represents its own topology)

61
New cards

Failure model

No Failure, Fail Stop, Crash, Send/Receive Omission, Byzantine Failure

62
New cards

No failure

Assumes there is no failure of any kind

63
New cards

Fail Stop

A process/node may suddenly fail, but as part of stopping execution it will tell other nodes

64
New cards

Crash

A process/node may fail by stopping but won’t let other nodes know

65
New cards

Send/Receive omission

Process may fail by not sending/receiving some messages, can cause other processes not to receive

66
New cards

Byzantine failure

Process could begin to act arbitrarily (could be malicious)

67
New cards

Connection steps

Listen, Accept, Dial, Write, Close

68
New cards

Byzantine Generals

A source will communicate and initial value and al other processes must reach an agreement with each other: Agreement (all non faulty processes agree on the same value), Validity (if the source is non-faulty then agree with the source), Termination (each non faulty process must eventually decide)

69
New cards

Byzantine Generals unsolvable

If there are m faulty processes and 3m total processes, the problem is unsolvable.

70
New cards

Synchronised naive solution to byzantine generals

If we have 3m + 1 total processes. After receiving messages from the leader, the other nodes confer and settle on majority result. Consensus if achieved regardless of whether the leader is faulty.

71
New cards

Synchroniser General solution to byzantine generals

Algorithm repeated over m rounds recursively. In base case, the leader sends their value to every general. Every general uses the value they receive. For every m round where m > 0, the header sends their value to every general, each general individually acts as the leader and performs Algorithm(m-1). Each general assumes the majority of all messages it received. C = (n^m) messages

Explore top flashcards

Vocab 4-6
Updated 764d ago
flashcards Flashcards (30)
Final practice
Updated 1165d ago
flashcards Flashcards (106)
Pharm E3- Endo
Updated 319d ago
flashcards Flashcards (160)
Poetry Terms Final
Updated 1153d ago
flashcards Flashcards (93)
vocab for 9/22
Updated 876d ago
flashcards Flashcards (20)
English II Vocab #8
Updated 1191d ago
flashcards Flashcards (25)
Vocab 4-6
Updated 764d ago
flashcards Flashcards (30)
Final practice
Updated 1165d ago
flashcards Flashcards (106)
Pharm E3- Endo
Updated 319d ago
flashcards Flashcards (160)
Poetry Terms Final
Updated 1153d ago
flashcards Flashcards (93)
vocab for 9/22
Updated 876d ago
flashcards Flashcards (20)
English II Vocab #8
Updated 1191d ago
flashcards Flashcards (25)