Midterm 1 (shorter version)

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

1/99

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:04 AM on 10/15/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

100 Terms

1
New cards

What is a distributed system?

Independent networked computers cooperate on services; processes/resources are spread across hosts.

2
New cards

Distributed versus decentralized system?

Distributed means sufficiently spread; decentralized means necessarily spread across computers.

3
New cards

What are two fundamental constraints of distributed multicomputers?

No shared memory and no global clock; independent partial failures are possible.

4
New cards

Why build distributed systems?

Scalability, availability, fault tolerance, lower latency, delegated work, collaboration, mobility, incremental growth.

5
New cards

What four design criteria does the professor emphasize?

Resource sharing, distribution transparency, openness, and scalability.

6
New cards

What is distribution transparency?

Hiding selected effects of distribution from users or application software.

7
New cards

Access versus location transparency?

Access hides differences in resource access; location hides where a component is located.

8
New cards

Migration versus relocation transparency?

Migration hides changes in a component/client's location; relocation specifically hides movement while in use.

9
New cards

Replication versus concurrency transparency?

Replication hides multiple copies; concurrency hides interference among simultaneous users.

10
New cards

What is failure transparency?

Hiding component failure and recovery where possible; complete masking is impossible.

11
New cards

Why shouldn't we always maximize transparency?

Hidden latency and failures are imperfect; extra synchronization can harm performance.

12
New cards

What is openness, and what are its three benefits?

Well-defined interfaces supporting interoperability, portability, and extensibility.

13
New cards

Name the three dimensions of scalability.

Size (users/load), geographic (distance/latency), administrative (multiple policies/organizations).

14
New cards

Why doesn't a LAN design automatically scale to a WAN?

Higher latency, less predictable links, costly synchronous waits, and limited broadcast support.

15
New cards

Partitioning versus replication?

Partitioning splits different data/work across nodes; replication copies the same data/service to multiple nodes.

16
New cards

What is caching, and what is its main risk?

Keeping data near consumers for speed; the copy may be stale.

17
New cards

Availability versus reliability?

Availability is usable time; reliability concerns continued correct service and preserving data.

18
New cards

What is a partial failure?

One node or link fails while other parts of the distributed system keep operating.

19
New cards

Fail-stop versus fail-restart?

Fail-stop stops operating; fail-restart returns after a crash, possibly with stale state.

20
New cards

Omission, timing, partition, and Byzantine failures?

Missing message; late event; disconnected network groups; arbitrary/incorrect responses, respectively.

21
New cards

Why can't a timeout prove the target crashed?

A slow server or delayed/lost messages can look identical to failure.

22
New cards

What is 'no global knowledge'?

Nodes know their own current state plus potentially outdated reports about others.

23
New cards

What are the eight false assumptions (fallacies)?

Reliable, secure, homogeneous, static network; zero latency/cost; infinite bandwidth; one administrator.

24
New cards

What security problems are highlighted for distributed systems?

Open networks and third parties raise spoofing/replay/input risks; use authentication, authorization, encryption, validation.

25
New cards

What did the Knight Capital incident illustrate?

A missed update on one trading server caused damaging inconsistent behavior; coordinated deployment matters.

26
New cards

Software architecture versus system architecture?

Software is logical component organization; system is their physical placement/deployment.

27
New cards

Pure versus mixed layering?

Pure accesses only adjacent lower layers; mixed may bypass layers or use multiple lower layers.

28
New cards

What is an upcall?

A lower layer calls/notifies a higher layer, for example a network failure notification.

29
New cards

Layer versus tier?

A layer is a logical responsibility; a tier is a separately deployed service/machine boundary.

30
New cards

What are the three typical application tiers?

Client/presentation; application/business logic; database/data storage.

31
New cards

What is middleware and its primary purpose?

Shared software for communication, naming, persistence, etc.; helps hide distribution complexity.

32
New cards

Coordination versus cooperation versus fault recovery algorithms?

Coordination makes nodes agree; cooperation divides/completes work; recovery handles failed nodes.

33
New cards

Name the three SOA variants on the slides.

Distributed-object, component-based, and Web services/message-oriented SOA.

34
New cards

What distinguishes message-oriented Web-service SOA?

Explicit messages/serialization across a visible network, often with stateless services.

35
New cards

What properties characterize microservices?

Independently deployable, strongly encapsulated, potentially different languages/technologies.

36
New cards

What is REST and its key constraints in lecture?

Representational State Transfer; resource URIs, uniform interface, self-describing messages, stateless requests.

37
New cards

What does stateless mean in REST?

Each request contains needed context; server need not retain client session context between requests.

38
New cards

What is publish-subscribe architecture?

Publishers emit events; middleware delivers matching events to interested subscribers without direct addressing.

39
New cards

Centralized versus client-server architecture?

Centralized relies on a central machine for core work; client-server separates requesters and service providers.

40
New cards

What is symmetric peer-to-peer, and what is an overlay?

Peers can both provide and consume; overlay is a logical network on the physical Internet.

41
New cards

Structured versus unstructured P2P?

Structured uses deterministic lookup (e.g. DHT); unstructured uses ad hoc links and searching.

42
New cards

What is a distributed hash table (DHT)?

A distributed mapping from hash keys to responsible peers for scalable lookup.

43
New cards

How does Chord assign a key to a node?

Store key k at its successor: first existing node ID clockwise at or above k; wrap around.

44
New cards

How large is an m-bit Chord identifier ring?

2^m identifiers, numbered 0 through 2^m - 1.

45
New cards

Why does Chord use finger/shortcut links?

To reduce typical lookup hops to O(log N), compared with O(N) successor walking.

46
New cards

Flooding versus random walk in unstructured P2P?

Flooding forwards broadly (high traffic, fast coverage); random walk follows one chosen neighbor (less traffic, may miss).

47
New cards

What are TTL and duplicate suppression for?

TTL limits hops; request IDs prevent repeated processing and excessive flooding loops.

48
New cards

What is a super-peer or hybrid P2P network?

Super-peers provide indexing/coordination; hybrid P2P combines central services with direct peer work.

49
New cards

What are tracker, swarm, and tit-for-tat in BitTorrent?

Tracker helps find peers; swarm exchanges pieces; tit-for-tat encourages reciprocal uploads.

50
New cards

What is edge-cloud architecture?

Edge handles latency-sensitive work near users; cloud handles high-capacity computation/storage.

51
New cards

Process versus thread?

Processes have separate address spaces; threads within a process share memory and resources.

52
New cards

Why do shared-memory threads need locks?

To prevent races and protect critical sections when data is changed concurrently.

53
New cards

How do threads hide network latency?

Other threads continue executing while one waits for network/disk I/O.

54
New cards

Iterative versus concurrent servers?

Iterative handles requests sequentially; concurrent handles multiple requests through threads/processes/asynchrony.

55
New cards

What is a virtual machine versus a container?

VM uses a virtualized guest OS; container shares the host OS kernel while isolating app dependencies.

56
New cards

Why use virtualization?

Portability, resource isolation, flexible deployment, and easier migration/failure containment.

57
New cards

How can client-side software provide transparency?

Stubs and client logic hide remote access, resolve locations, select replicas, or mask recoverable failures.

58
New cards

What identifies a transport endpoint?

IP address, port number, and transport protocol (e.g. TCP).

59
New cards

Stateless versus stateful server?

Stateless retains no required client-session state; stateful remembers per-client information across requests.

60
New cards

Transport-layer switching versus content-aware distribution?

Switching dispatches based on connection/load; content-aware reads request meaning before selection.

61
New cards

Name the four Internet protocol layers.

Link (Ethernet/Wi-Fi), Internet/IP, transport (TCP/UDP), application (HTTP/DNS/SSH).

62
New cards

What do IPv4 and IPv6 address sizes differ by?

IPv4 is 32 bits; IPv6 is 128 bits.

63
New cards

TCP versus UDP?

TCP is connected, reliable, ordered byte stream; UDP is connectionless, best-effort datagrams.

64
New cards

Does one TCP recv() equal one sender message?

No. TCP is a byte stream; recv may return a partial message or combine several messages.

65
New cards

Basic Python TCP client socket steps?

socket(AF_INET, SOCK_STREAM), connect, sendall, recv, close.

66
New cards

Basic Python TCP server socket steps?

socket, bind, listen, accept; then recv/send on accepted connection.

67
New cards

Why do heterogeneous machines need serialization?

Machines may differ in byte order, type sizes, character encodings, and alignment.

68
New cards

Big endian versus little endian?

Big endian stores most significant byte first; little endian stores least significant byte first.

69
New cards

Serialization versus marshalling?

Serialization encodes data as transferable bytes; marshalling packages RPC arguments/results using encoding.

70
New cards

Implicit versus explicit typing in messages?

Implicit assumes shared schema; explicit encodes type information, as in JSON-like formats.

71
New cards

What do pickle.dumps() and pickle.loads() do?

dumps serializes a Python object to bytes; loads reconstructs it; never load untrusted pickle data.

72
New cards

What is RPC?

Remote Procedure Call: invoke a remote function through an interface resembling a local call.

73
New cards

What does the RPC client stub do?

Marshals arguments, sends request, receives and unmarshals returned values.

74
New cards

What does the RPC server skeleton do?

Receives/unmarshals request, invokes real procedure, marshals response.

75
New cards

Trace an RPC's complete path.

Client -> client stub -> network -> server skeleton -> function -> skeleton -> network -> client stub.

76
New cards

What are IDL, name service, and binding in RPC?

IDL defines calls/types; name service finds endpoints; binding connects the caller to that endpoint.

77
New cards

RPC versus RMI?

RPC calls remote procedures; RMI invokes methods on remotely referenced objects.

78
New cards

Why can retrying an RPC be dangerous?

The original may have executed despite a lost reply; retrying may duplicate a non-idempotent effect.

79
New cards

Persistent versus transient messages?

Persistent middleware stores undelivered messages; transient communication does not store for later delivery.

80
New cards

Synchronous versus asynchronous messages?

Synchronous sender waits for specified event; asynchronous sender may continue immediately.

81
New cards

Are persistent/transient and synchronous/asynchronous the same distinction?

No. Persistence concerns storage; synchrony concerns sender blocking. The dimensions are independent.

82
New cards

What do message queues and brokers provide?

Buffering, routing, optional persistence, and producer-consumer decoupling.

83
New cards

What are topic-, content-, and type-based pub/sub?

Match by topic name, message-field predicate, or event/type category.

84
New cards

Intra-stream versus inter-stream synchronization?

Intra preserves timing inside one stream; inter aligns streams such as audio and video.

85
New cards

What is multicast?

Disseminating a message from one sender to multiple intended receivers.

86
New cards

First-response time versus quiescence time?

Response is first replica reply; quiescence is when no multicast messages remain in flight.

87
New cards

What assumptions does the multicast analysis use?

Uniform random sampling, no message loss, no node failures, independent delays.

88
New cards

Why contact only a subset of nodes in parallel?

Balance first-response latency against number of messages and total work.

89
New cards

What is Lab 1's complete control flow?

Connect to GCD, send HOWDY, receive peers, contact each with BEGIN, print replies/errors, then exit.

90
New cards

What are the exact Lab 1 messages and wire format?

Send pickle.dumps('HOWDY') to GCD and pickle.dumps('BEGIN') to peers.

91
New cards

What does the GCD return to Lab 1?

Pickled list of dictionaries, each containing 'host' and 'port' for a potential peer.

92
New cards

How are host and port supplied to lab1.py?

python3 lab1.py HOST PORT; sys.argv[1] is host, sys.argv[2] is port text converted with int().

93
New cards

What do AF_INET, SOCK_STREAM, and settimeout(1.5) mean?

IPv4, TCP stream socket, and a 1500-millisecond socket operation timeout.

94
New cards

Why is try/except inside Lab 1's peer loop?

A connection refusal or timeout is reported without stopping attempts to remaining peers.

95
New cards

Should the Lab 1 client retry a failed peer?

No; for this assignment, record the failure and move on to the next peer.

96
New cards

What is an important limitation of one recv(1024) in Lab 1?

TCP may deliver only part of a pickled object; robust implementations use message framing and repeated reads.

97
New cards

What are the multicast activity's exact forwarding rules?

Ignore duplicates; if X exists, reply; else flooding forwards to all neighbors, rumor search to one random neighbor.

98
New cards

What is the Northstar Market checkout flow?

App -> Store API -> inventory DB/check -> checkout/payment -> Kafka -> fulfillment and notification.

99
New cards

Why must the final Northstar item be reserved atomically?

Two simultaneous buyers must not both purchase the only available unit; stale catalog cache is insufficient.

100
New cards

What happens if Northstar Notification goes offline?

Checkout remains completed; durable event processing can retry notification when the consumer recovers.