Distributed Systems & Networks Flashcards

1
Q

What 5 layers are in the Open Systems Interconnection model highest to lowest?

A

Application
Transport
Internet/Network
Link
Physical

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are data frames?

A

A structured way of packaging & sending data between devices
Contain a header, payload, and trailer contained in a packet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is framing?

A

The transmission of frames over physical media

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are FLAG bytes and Escape bytes?

A

A FLAG byte value marks the start and end of a frame
If data contains a byte sequence that could be misinterpreted as a FLAG byte sequence, use an Escape byte to signal different treatment
If data contains a byte sequence that could be misinterpreted as an Escape byte sequence, use another escape byte

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is flow control?

A

Regulates flow of data
Receiver sends messages to sender saying if more data can be sent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the 3 link layer models?

A

Connectionless, no acknowledgements
Connectionless, acknowledged
Connection-oriented services, acknowledged

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an ARQ?

A

Automatic Repeat reQuest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What 3 ways can link layers handle ACKs?

A

Stop-and-wait ARQ: send frame(s), wait for ACK, send next frame(s)
Go-back-N ARQ: frames labelled with sequence numbers, send frames, if ACK missed retransmit from that frame
Selective-repeat ARQ: same as GBN ARQ but only retransmit lost frames

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What 2 ways are errors handled in the link layer?

A

Parity bit: used to check if number of 1’s is even or odd
Cyclic redundancy check: checksum (based on data) appended to data, checksum re-calculated by receiver, compared with sender’s checksum

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What 3 ways is link layer media contention handled?

A

Frequency channels
CSMA/CD (carrier sense multiple access w/ collision detection), for ethernet networks: listens whilst sending on a channel; if collision detected, stops and retransmits
CSMA/CA (CSMA w/ collision avoidance), for wireless networks: instead of listening, waits for frame ACK

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is CSMA?

A

Carrier Sense Multiple Access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the 3 functions of the Internet layer?

A

Internetworks: hiding routing from transport layer
Transmits packets: packetises data stream into datagrams (small, distinct units) and fragments them
Receives packets: reassembles fragments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does each router do in store-and-forward packet switching?

A

Stores the packet, checks & processes it, forwards it to the next hop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is fragmentation?

A

When a Protocol Data Unit (PDU), which has a header and data, is split into smaller packets, which have the header and a fraction of the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When does fragmentation occur?

A

When Protocol Data Units (PDUs) are larger than the Maximum Transmission Unit (MTU)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the address sizes of IPv4 and IPv6?

A

32-bit and 128-bit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are the header sizes of IPv4 and IPv6?

A

IPv4: variable, at least 20 bytes
IPv6: fixed, 40 bytes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How are IPv6 addresses shortened?

A

Leading 0s in blocks are omitted
0 blocks (:0000:) are replaced by ::

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

When is IP fragmentation performed in IPv4 and IPv6?

A

IPv4: can be at any routing hop, re-assembled at receiving host
IPv6: at sending host

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What IPv4 address portions are there?

A

Network portion: first 16 bits e.g. 192.168.123.45 –> 192.168 network portion
Host portion: last 16 bits e.g. 192.168.123.45 –> 123.45 host portion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Why can’t all addresses in a subnet be used?

A

First address is reserved
Last address is broadcast address
Another address is required for the router (first or last usable address)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

IPv4 subnet notation

A

For 152.78.70.0/23
The subnet /23 leaves 2^(32-23) = 512 addresses to work with
Leaves address range 152.78.70.1 to 152.78.70.254

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

IPv6 server portion notation

A

Server portion can be from 64 bits to 127 (leaves 2 usable addresses): /64 to /127

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is NAT (Network Address and Port Translation) and CGNAT (Carrier-Grade NAT)?

A

NAT: manages IP address allocation. for IPv4 networks using private addresses but need Internet access
CGNAT: extension of NAT that handles the running out of IP addresses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What are the 4 benefits of IPv6?

A

Removes need for NAT
More plug-and-play than IPv4
Streamlined header
Fragmentation only occurs at sender

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is routing in the Internet layer?

A

A function for moving packets between different subnets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is prefix aggregation?

A

e.g. 192.168.10.0/24 and 192.168.11.0/24 aggregated to 192.168.10.0/23

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What problems might a default router’s routing table have?

A

Table could very large and be subject to frequent changes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What is an autonomous sytem (Internet)?

A

A group of networks with a unified routing policy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What gateway protocols are used in autonomous systems?

A

Exterior gateway protocols for exchanging routing information between AS’s
Interior gateway protocols for exchanging routing information within an AS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What are the 2 types of interior gateway protocols?

A

Distance vector: exchanges “best route” information to neighbouring routers
Link state: exchange messages describing connected neighbours to all routers in site. Better convergence and loop avoidance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What do routers do in the Routing Information Protocol

A

Lets them share information with other routers about the “best route” by sending whole routing table periodically to connected routers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

What 2 limitations does the Routing Information Protocol have?

A

Only updates every 30 seconds
Updates not acknowledged

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

What is link cost and link state packets?

A

Link cost: cost between routers determined by bandwidth and/or delay
Link state packets: A list of known routers and their link cost

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

How is the shortest path between routers found?

A

Using Dijkstra’s algorithm (from starting node, expand nodes by considering cheapest neighbour and update costs)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

What are the 4 steps of Border Gateway Protocol?

A

[ASN - Autonomous System Number]

1) Configuration: specify neighbour’s IP address and ASN
2) Peering session: routers exchange entire routing tables, followed by incremental updates
3) Route advertisement: routers advertise routes they know of to their neighbours
4) Route selection: neighbours choose whether to use that route based on own knowledge of ASNs. Will reject if own ASN is on path as would loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

What are the 3 downsides of Border Gateway Protocol?

A

Relies on trust
Slow
Routers have limited routing table sizes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

What is ICMP (Internet Control Message Protocol)?

A

Used in IPv4 networks for information & error messages
Used in IPv6 networks for router advertisement & neighbour discovery

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

What is ARP (Address Resolution Protocol)?

A

Used in local networks to map IP addresses to MAC addresses
1) Broadcasts a message containing sender’s MAC address and IP address
2) Host with target IP address responds with MAC address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

What is DHCP (Dynamic Host Configuration Protocol)?

A

A protocol that automatically assigns IP addresses to devices on a network

Client | Server
Discover –>
<– Offer
Request –>
<– ACK

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

What is NDP?

A

Neighbourhood Discovery Protocol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

What is SLAAC (StateLess Address AutoConfiguration)?

A

Authomatically assign IPv6 addresses to devices without need for central server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

UDP vs TCP (4 attributes)

A

UDP: faster, less reliable, connectionless (send-and-forget), no flow control
TCP: slower, more reliable, connection-oriented, has flow control

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

UDP vs TCP headers

A

TCP headers are more complex but guarantee data delivery and order of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

What 2 ways can TCP facilitate multiple packet transmission without waiting for individual ACKs?

A

Sliding window protocol (flow control):
1) Sender slides forward a window for multiple unACK packets to be sent
2) Window is slid back
3) Once ACKs received, window slides forward again

Congestion control:
If congestion detected, TCP reduces transmission and vice versa
Transmission rate is doubled until thresh met, then gradually increases until timeouts start occuring

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

What is an octet?

A

octet == byte == 8 bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

What are switches, ports, and hosts?

A

Switch: forwards packets between devices on same LAN
Port: a connection point on a switch where hosts can connect
Host: devices connected to a network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

How do ethernet switches improve network performance?

A

Switches learn the MAC addresses of hosts on their ports and build a MAC address table
This improves efficiency as data is only forwarded to intended recipients

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

What are the 4 cast message types?

A

Unicast: one sender to one receiver
Broadcast: one sender to all potential receivers
Multicast: one sender to any interested receivers
Anycast: one sender to nearest instance of receiver

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

What do IP routers do?

A

They forward IP packets between LANs but do not forward Ethernet broadcasts
They advertise the reachability of their IP address range

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

What is subnet comparison?

A

A way of knowing if an address is local or not
Even if destination is local but LAN is complex, sender may use default router

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

What is SMTP (Simple Mail Transfer Protocol)?

A

Handles transfer of email messages but not receiving or storing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

What does QUIC (Quick UDP Internet Connections) do?

A

Improves performance of web applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

What is RTSP (Real-Time Streaming Protocol) and RTP (Real-Time Transport Protocol)?

A

RTSP: for controlling delivery of streaming media content over the Internet

RTP: the actual transmission audio/video data over IP networks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

What is SMB (Server Message Block)?

A

Provides shared access to files over a LAN or the Internet (via HTTP)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

What is NFS (Network File System)?

A

For accessing files over a network (via HTTP) as if they were local

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

What is NTP (Network Time Protocol)?

A

For synchronising the time of devices on a network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

What is LDAP (Lightweight Directory Access Protocol)?

A

For accessing directory services over an IP network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

What is P2P (Peer-to-Peer)?

A

Where devices communicate directly with each other without the need for a central server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

What is HTTP (Hypertext Transfer Protocol)?

A

1) TCP connect to server
2) Send request (GET, HEAD, POST, PUT, DELETE)
3) Receive response message with data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

What is CoAP (Constrained Application Protocol)?

A

Like HTTP but for simpler devices and on UDP
More modern and lightweight than MQTT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

What is MQTT (Message Queuing Telemetry Transport)?

A

Like HTTP but with smaller packets and less overhead
Messages are published to a broker entity and clients subscribe to data streams

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

How can CoAP-based devices and HTTP web services communicate?

A

By using CoAP-to-HTTP gateways
Proxy gateway stores cached values to speed up subsequent access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

What is DNS (Domain Name System)?

A

Translates hostnames (example.com) into IP addresses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

What is DNS domain delegation?

A

TLD (top level domain) registrars control domain names like .uk
They can delegate names like .ac.uk to JISC
They in turn can delegate names like soton.ac.uk to the University and so on
This can be viewed as a hierarchy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

What is a DNS zone?

A

A continous chunk of name space with an associated set of name servers
Subzones can be delegated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

What is iterative server mode and recursive server mode?

A

ISM: where server responds to queries with referral to another server
RSM: where server responds from local cache or resolves queries before responding

68
Q

What is mDNS?

A

Multicast DNS
Performs DNS capabilities within small local networks without need for centralised DNS server

69
Q

What are stateful firewalls?

A

Firewalls that can inspect TCP/IP headers and keep track of connections

70
Q

What are application layer firewalls?

A

Firewalls at application layer gateways that ensure packets that look like HTTP are actually HTTP

71
Q

What is NIDS (Network Intrusion Detection System)?

A

Monitors network looking for malicious activity
Uses signature/anomaly-based detection

72
Q

What is NAC (Network Access Control)?

A

Uses an authentication protocol to authenticate clients on a network
Switch port is blocked until client authenticates

73
Q

What is a VPN (Virtual Private Network) and its 2 types?

A

Simulates a direct connection between devices

Site-to-site VPN: connects two networks
Remote-access VPN: individual clients connect to VPN server

74
Q

What are the 3 types of DNS exploitation?

A

DNS amplification - spoof source IP address and send lots of small DNS requests with larget responses to overwhelm destination
DNS cache poisoning - supply bogus response to caching resolver
Malicious network operator - included dodgy entries in their DNS server

75
Q

What is Cristian’s algorithm and its 3 steps?

A

A simple algorithm to synchronise time with a time server
1) Client process requests time from Clock Server
2) Clock Server responds with clock server time
3) Client receives response and calculates synchronised client clock time: = Tserver + (Tsent + Treceived)/2

76
Q

What are the 6 steps of the Berkeley algorithm?

A

1) Individual node chosen as co-ordinator node
2) Co-ordinator requests time from each node
3) Co-ordinator uses Cristian’s algorithm to fetch time from each node
4) Co-ordinator calculates average time difference
5) Co-ordinator adds average time difference to its current clock
6) Co-ordinator broadcasts current time over the network

77
Q

What are the 4 steps of NTP (Network Time Protocol)?

A

Time synchronisation over the Internet
1) Clients sends T0, server receives T1 and sends T2, client adds T3
2) Round-trip delay, d = (T3-T0) - (T2-T1) so server time = T2+d/2
3) Clock skew θ = servertime - T3 = (T1-T0+T2-T3)/2
4) Client slowly adjusts its clock (slewing) or resets it (stepping)

78
Q

What are logical clocks?

A

A tool to understand the order events across different computers/nodes happen
No relationship with physical time

79
Q

What are the 4 requirements for Distributed Mutual Exclusion?

A

No deadlock: 2+ sites shouldn’t endlessly wait for messages
No starvation: every site that wants to execute a critical section should get an opportunity but shouldn’t wait indefinitely
Fairness: execute request based on the order they are made
Fault tolerance

80
Q

What are the 2 safety properties of DME?

A

Only one process can remain in a critical section at any time
Freedom from deadlock provided by using some algorithm to decide which process takes action

81
Q

What is the liveness property of DME?

A

Every process trying to enter a critical section must eventually succeed (avoid livelock or starvation)

Livelock: when two or more processes continuously change their state in response to each other without making any actual progress
Starvation: when a process is perpetually denied access to a critical section despite ready & eligible

82
Q

What is the fairness property of DME?

A

Access to critical section should happen in a fair order using happens-before ordering

83
Q

What are the 3 ways to enhance performance of DME?

A

Minimise no. messages sent to each critical section’s entry/exit operation
Minimise client delay when entering/exiting critical section
Minimise synchronisation delay (time between process exiting and next entering)

84
Q

What are the 4 steps in a DME token based algorithm?

A

1) Unique token shared among all sites
2) If site possesses token, it can enter critical section
3) Use sequence numbers to order requests
4) Sequence numbers used to identify old & current requests

85
Q

What is the centralised token algorithm (DME) and its process?

A

A token-based algorithm
1) Critical section has a queue and a token
2) A process requests a token, is granted it, and is added to the queue
3) Subsequent token requests from other processes are queued
4) First process releases token and token is granted to next in queue

86
Q

What are the properties of the centralised token algorithm (DME) (safety, liveness, fairness, performance)?

A

Safety: grant only sent after release received
Liveness: all requests are queued
Fairness: processes enter critical section in order of queue
Performance: entry delay due to message round trip

87
Q

What is the ring token algorithm (DME) and its process?

A

A token based algorithm
1) Processes are considered in a ring and contain a (potentially empty) queue of items that want access to the critical section
2) In turn, processes access critical section with the older item in their queue and release the token to the next process

88
Q

What are the properties of the ring token algorithm (DME) (safety, liveness, fairness, performance)?

A

Safety: only one process can hold the token so only one process can enter at a time
Liveness: every process eventually gets access
Fairness: not fair - order based on token location within ring
Performance: 0-N message delay when entering

89
Q

What are the properties of Raymond’s tree-based algorithm (DME) (safety, liveness, fairness, performance)?

A

Safety: only one process can hold token
Liveness: can cause starvation if greedy strategy used
Fairness: everyone’s allowed to hold the token
Performance: 0-N message delay when entering and 1 message delay when exiting

90
Q

What are the properties of the Ricart-Agrawala algorithm (DME) (safety, liveness, fairness, performance)?

A

Safety: process in critical section doesn’t reply until it exists
Liveness: timestamps ensure each request eventually gets replies
Fairness: timestamps and clocks ensure fair ordering
Performance: large entry 2(N-1) and exit delay, 0 to N-1

91
Q

What are the properties of Maekawa’s algorithm (DME) (safety, liveness, fairness, performance)?

A

Safety: processes can only vote for one process at a time so only one process can gain enough votes to enter critical section
Liveness: without happens-before ordering, easy to deadlock if 2+ processes request at the same time
Fairness: can be made fair by using Vector clocks to determine request order
Performance: entry & exit delay

92
Q

What are the 4 factors to consider when conducting a leader election?

A

Communication type: synchronous or asynchronous
Process identifiers: processes are anonymous or eponymous
Network topology: ring / acyclic graph / complete graph
Network size

93
Q

How do processes compare identifiers in ring leader elections?

A

A process receives an election message:
* If identifier is greater than own, it forwards message
* If identifier is less than own, mark self as participant, substitute in own identifier, and forward message. If already a participant, do nothing
* If identifier is own, declare self leader, mark as non-participant, and send elected message to neighbour
* Processes receive elected message and mark themselves as non-participants and forward message

94
Q

What is the best and worst case performance of ring leader election?

A

Best case: if election initiator has highest identifier, 2N messages
Worst case, if anti-clockwise neighbour has highest identifier, 3N-1 messages

95
Q

What is bully election used for?

A

When the existing coordinator fails

96
Q

How is a leader determined in bully election?

A

1) A process detects that the current coordinator has failed
2) It sends an election message to processes with higher IDs
3) The non-failed processes with higher IDs send an answer
4) These processes do the same until the highest alive process declared victor and becomes coordinator

97
Q

What is the best and worst case performance of bully election?

A

Best case: failure detected by process with second highest ID, N-2 messages
Worst case: failure detected by process with lowest ID, O(N^2)

98
Q

What are the 3 purposes of distributed systems?

A

To parellelise computation
To share resources
To have redundancy (fault tolerance)

99
Q

What are the 3 V’s of BigData?

A

Volume - quantity of data
Variety - diversity of data
Velocity - speed data is generated & processed

100
Q

What is the cloud?

A

A network of remote servers that users/IoT devices send data to to store, manage, and process

101
Q

What does fog computing do?

A

Extends cloud computing to the edge of the network
Bring computational resources closer to end-users

102
Q

What are the 7 challenges of distributed systems?

A

Heterogeneity
Openness - the ability to add more resources and integrate additional services
Scalability
Failure handling - failure detection, masking, toleration, and recovery
Concurrency
Transparency
Quality of service - e.g. the ability to meet deadlines

103
Q

What is heterogeneity?

A

A reference to the presence of diverse elements or components within a system (networks, hardware, OS, programming languages)

104
Q

What is middleware?

A

A software that provides abstraction and masks heterogeneity

105
Q

What are the 4 challenges of scalability?

A

Controlling cost
Controlling performance loss
Preventing software resources depletion
Avoiding bottleneck

106
Q

What are the 3 distributed system models?

A

Physical Models
Architectural Models
Fundamental Models

107
Q

What are physical models

A

Computers and interconnecting networks

108
Q

What are architectural elements in architectural models?

A

Computational and communication tasks
Describe the relationships & interactions within a system

109
Q

What are the 2 perspectives of viewing communicating entities?

A

System-Oriented Perspective: lower level - what is running
Problem-Oriented Perspective: higher level - can I abstract what is running

110
Q

What are the 3 communication paradigms (how entities communicate)?

A

Inter-process communication: message passing & sockets
Remote invocation: based on two-way exchange (request-reply protocols) with sender-receiver coupling
Indirect communication: sender & receiver are decoupled

111
Q

What are the 2 types of remote invocation?

A

RPC (Remote Procedure Call) - client requests execution of function on remote server and receives the result
RMI (Remote Method Invocation) - object-oriented RPC; invoked objects can invoke other objects

112
Q

What are the 2 types of data distribution?

A

Replication: good fault tolerance and load balancing but data consistency difficult
Partitioning: good data consistency but limited fault tolerance

113
Q

What are architectural patterns in architectural models?

A

How architectural elements are organised & combined

114
Q

What are the 2 key organisational architectural patterns?

A

Layering: logical organisation
Tiering: physical organisation

115
Q

What is layering (architectural pattern)?

A

Where services/components are organised vertically into service layers
Each layer provides abstractions and hides details of lower layers

116
Q

What is tiering (architectural pattern)?

A

Where services/components are are deployed on separate servers

117
Q

What are fundamental models?

A

Simplified representations of complex systems aimed at understanding their underlying principles and behaviors

118
Q

What are the 3 ways to measure the performance of communication channels?

A

Latency: start of transmission to start of reception (s)
Bandwidth: amount of info transmitted at a given time (bit/s)
Jitter: variation in time to deliver series of messages (ms)

119
Q

What are the 3 ways a communication channel can fail?

A

Channel omission failure: when messages aren’t delivered to intended recipient due to channel omitting the message
Arbitrary failure: nodes may behave arbitrarily
Timing failure: relevant in synchronous systems

120
Q

What are the 4 ways nodes may behave arbitrarily in communication channel failures?

A

Send arbitrary messages at arbitrary times
Wrongfully omit or delay actions
Incorrect actions
Malcious behaviour from compromised nodes

121
Q

What are the 2 ways to deal with communication channel failures?

A

Masking: replicate processes and retransmit messages
Conversion: use checksum to detect corrupted messages & discard them

122
Q

What are the 3 drawbacks of multicast?

A

Message may not arrive ordered at recipients
Omission failures if message fails to reach recipient
Doesn’t tolerate process failure

123
Q

What are the 4 multicast orderings?

A

FIFO multicast
Causal multicast
Total order muliticast
FIFO-total order multicast

124
Q

What is FIFO multicast?

A

Messages sent by the same node must be delivered in the order they were sent

125
Q

What is causal multicast?

A

If a message causally precedes another, it is guaranteed to be delivered in that order

126
Q

What is total-order multicast?

A

If m1 is delivered before m2 on one node, m1 must be delivered before m2 on all nodes

127
Q

What is Eager Reliable Broadcast?

A

Mitigates the possibility of broadcasted messages getting dropped by the network
Whenever a node receives a message, it rebroadcasts it to every other node

128
Q

What are the 3 multicast strategies?

A

Basic multicast
Reliable multicast
Ordered multicast

129
Q

What is basic multicast?

A

A sender transmits data to multiple recipients simultaneously
If multicaster doesn’t crash, a process will deliver the message
Uses B-multicast & B-deliver

130
Q

What is B-multicast and B-deliver?

A

g=group, m=message, p=process
1) A node in an application calls B-multicast(g,m)
2) Send m to each process p in g using send(p,m)
3) p receives(m) and B-deliver(m) is called at p

131
Q

What is reliable multicast?

A

A multicast that tolerates process crashes
Assumes closed group and guarantees integrity, agreement, and validity

132
Q

What is the process of R-multicast?

A

Sender multicasts m to all p in g and, on first time receiving m, receivers multicasts m to g and delivers m to p
Inefficient: O(N^2) B-multicasts for every R-multicast

133
Q

In the Byzantine Generals problem, how many generals are needed in total to tolerate f malicious generals?

A

3f+1

134
Q

What are the 3 steps in choosing a consensus in consensus algorithms?

A

1) Send a proposed value via total-order multicast
2) Wait until N values received
3) Agree on decision mechanism (majority, highest/lowest value, msg order)

135
Q

How is consensus reached in synchronous systems with crash failures?

A

Each process maintains a set of values known to it after each round and multicasts any new values recorded in the previous round
If F processes crash, we need F+2 processes and F+1 rounds

136
Q

What 2 ways can consensus be reached in asynchronous systems?

A

Replicating data
Distributed transactions

137
Q

What is CAP Theorem?

A

The idea that consistency, availability, and partition tolerance are desired properties for a replicated data store but only two can be attained

C: every read receives the most recent write or error
A: every request receives a non-error response
P: the system continues to operate despite messages getting dropped/delayed

138
Q

What are AP systems?

A

Systems with availability & partition tolerance
Suitable for systems where availability is critical and eventual consistency is acceptable

139
Q

What are CP systems?

A

Systems with consistency and partition tolerance
Suitable for systems where consistency is critical, even at the cost of availability

140
Q

What are CA systems?

A

Systems with consistency and availability
Suitable for distributed systems with reliable networks where partitions are unlikely

141
Q

Strong vs weak consistency models

A

Strong: prioritise consistency over availability; global order of updates
Weak: prioritise availability over consistency; no global order of updates; different replicas may have different views of data

142
Q

Passive vs active replication strategies

A

Passive: one replica serves as primary, while others are backups; client solely interacts with primary
Active: clients communicate with a group of replicas

143
Q

What are the 5 consistency models strongest to weakest?

A

Strict consistency
Linearisability
Sequential consistency
Causal consistency
Eventual consistency

144
Q

What is strict consistency?

A

A write to any variable by a replica is immediately available to all other replicas

145
Q

What is linearisability?

A

Reads and writes are executed as if they are in a single linear order, despite being distributed
Every process must have a perfectly synchronised clock
Total-order multicast is used

146
Q

What is sequential consistency?

A

Operations of all processes appear in a total order that respects the program order of each individual process
Reads return local copy, writes trigger a total-order multicast; replicas update local copy and return ACK

147
Q

What is causal consistency?

A

Writes that are causally related are seen by all processes in the same order, but concurrent writes may be seen in different orders

148
Q

What is eventual consistency?

A

Eventually, all replicas will converge to the same value, but no guarantees are made about the order in which updates are seen
Reads may not see the most recent writes

149
Q

Operation-based vs state-based CRDT (Conflict-free Replicated Data Type)

A

OB: when writing, broadcast the operation; when receiving, apply broadcasted operation
SB: when writing, broadcast full state; when receiving, merge broadcasted states (e.g. max merge of (<8,3,10>,<7,6,11>)=<8,6,11>

150
Q

What are quorum-based protocols?

A

An approach for implementing consistency across a number of replicas
Clients read from a read quorum and write to a write quorum; these two quorums intersect to ensure consistency
After writes to the quorum, replicas propagate changes to other replicas

151
Q

What is remote invocation?

A

A program running on one computer can execute code on another computer over a network

152
Q

What is marshalling?

A

The process of converting a data structure/object from memory representation to a format suitable to transmission over a network

153
Q

What does an IDL (Interface Definition Language) do?

A

Describes an interface by defining structure, types, procedures, functions, and methods

154
Q

Web server vs web service

A

Web server: what browsers interact with over Internet via HTTP
Web service: an interface that clients can access over the Internet

155
Q

Why do web services have loose coupling?

A

To minimise dependencies between different web services
So changing one web service doesn’t require the update of other services

156
Q

What is SOAP (Simple Object Access Protocol)?

A

For exchanging structured information in the implementation of web services
Creates a strong coupling between clients and web services
Uses XML-based messaging

157
Q

What is REST (REpresentational State Transfer)?

A

A simpler, looser-coupled alternative to SOAP
Focuses on resources rather than operations allowed on them
Uses HTTP methods
Stateless

158
Q

Stateful vs stateless design

A

Stateful: each request is aware of previous interactions
Stateless: treats requests as independent interactions

159
Q

What does atomic mean?

A

That all operations within a transaction must be successfully completed or none must complete

160
Q

What are the ACID properties of transactions?

A

Atomicity: transaction must be all or nothing
Consistency: transaction takes system from one consistent state to another
Isolation: no interference from other transaction
Durability: transaction effects are saved in permanent storage

161
Q

What does it mean if a system is serializable?

A

The final state of a system is the same as if transactions were executed serially

162
Q

What is the Lost Update Problem?

A

When 2+ transactions attempt to update data concurrently and 1+ of these are lost/overwritten leading to inconsistencies

163
Q

What is the Inconsistent Retrievals Problem?

A

Where concurrent transactions read data that is in an inconsistent state due to ongoing updates by other transactions

164
Q

When is Optimistic Concurrency Control used?

A

When…
* conflicts are infrequent
* cost of locking is high
* low contention & high read-to-write ratios

165
Q

What is a dirty read?

A

When a transaction reads data that has been modified by another transaction and not yet committed

166
Q

How are cascading aborts prevented?

A

Transactions are only permitted to read objects that have been written by transactions that have committed

167
Q

What are premature writes (3)?

A

1) A transaction successfully completes a write operation
2) It encounters an issue/conflict and aborts
3) The object is now in an inconsistent state