NivaarExam PrepOfficial exam papers ↗

25-Comp-B10 Distributed Systems · December 2019

Question 2 of 6: Fundamental Concepts and Mechanisms

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

17-Comp-B10 Distributed Systems — National Examinations, December 2019. 3 hours, closed book, Casio/Sharp approved calculator only. Candidates were instructed to answer any five of the six questions, all carrying equal weight (20 marks each) and mostly requiring essay-format answers, with only the first five as they appear in the answer book marked; all six are answered below as a complete study resource.

Reference texts: Coulouris, Dollimore, Kindberg & Blair, Distributed Systems: Concepts and Design (5th ed.) — system models, client-server architecture and mobile/ubiquitous computing (ch. 1–2, 19), interprocess communication and remote invocation, RPC (ch. 4–5), operating system support and middleware (ch. 6–8), security (ch. 11), distributed file systems (ch. 12), transactions and concurrency control, distributed transactions and two-phase commit (ch. 13–14).

Check — Question 5(a) as printed. The paper prints transaction U as “U: x = write(i,55); write(j,66);” — assigning the result of a write to a variable is not meaningful pseudocode. Since the assigned name x is never subsequently read by U, this does not change the analysis below; U is treated as the two-operation transaction write(i,55); write(j,66), and T as x = read(i); write(j,44), exactly as printed.

Question 2: Fundamental Concepts and Mechanisms

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

(a) Middleware limitations, and CORBA vs. Java RMI vs. Web services. Middleware's convenience comes at a cost: it adds an extra abstraction/translation layer (marshalling, stub/skeleton generation) that costs latency and CPU relative to hand-written networking code; it can hide the reality of partial failure so thoroughly that programmers write remote calls as if they were local, then are surprised by the different failure modes (network partitions, partial completion) that local calls never have; heavyweight middleware (classical CORBA) has significant learning curve and deployment complexity; and different middleware products are frequently not interoperable with one another, creating platform/vendor lock-in.

Middleware comparison
AspectCORBAJava RMIWeb services (SOAP/REST)
Language/platformLanguage- and platform-neutral (IDL + ORB)Java-only, homogeneousLanguage- and platform-neutral (text protocol)
Wire formatBinary (GIOP/IIOP)Binary (Java serialization)Text (XML/SOAP or JSON/REST) over HTTP
PerformanceEfficient binary, but heavy ORB infrastructureEfficient for pure-Java systemsHigher parsing/transport overhead, but simplest to deploy over the open Internet
InteroperabilityCross-language via IDL, but implementations vary; largely legacy todayVery limited outside the JVMBest Internet-scale interoperability; the de facto modern default

(b) Three limitations of IPv4. 1. Address exhaustion. IPv4's 32-bit address space provides only about 4.3 billion addresses, long since insufficient for the number of Internet-connected devices, forcing widespread use of NAT and address-conservation techniques as stop-gaps rather than every device having a unique global address. 2. No built-in security. The base IPv4 header carries no authentication or encryption; confidentiality and integrity must be added by a separate layer (IPsec, or higher-layer TLS), so a plain IPv4 packet is trivially spoofable/eavesdroppable. 3. Weak support for QoS and modern traffic patterns. IPv4's header has no adequate flow-labelling for real-time/multimedia traffic, and its variable-length options field is rarely hardware-accelerated, making fine-grained quality-of-service and fast router processing harder than in IPv6's fixed, streamlined header.

(c) Network Address Translation. A NAT-capable border router/gateway maintains a translation table mapping each internal (private, RFC 1918) address and source port to a single public IP address and a (usually router-chosen) public port. As a packet leaves the private network, the router rewrites the source address/port to the public mapping and records the mapping; on the return packet it looks up the destination address/port in the table and rewrites it back to the original internal address/port before forwarding it inward. This lets many internal hosts share one (or a small pool of) public IPv4 address, directly mitigating the address-exhaustion problem from part (b), and as a side effect hides the internal network's topology and addressing from the outside (a modest security benefit), at the cost of breaking pure end-to-end connectivity for protocols that expect inbound connections to be initiated from outside (requiring port forwarding, STUN/TURN, or application-layer gateways for VoIP/P2P/some FTP modes).

(d) The five TCP/IP layers.

TCP/IP model layers and representative protocols
LayerFunctionExample protocols
5. ApplicationApplication-specific message formats and semantics (naming, content, sessions) presented to the user programHTTP, FTP, SMTP, DNS, Telnet, SSH
4. TransportEnd-to-end delivery between processes on two hosts: reliable, ordered, flow-controlled streams (TCP) or lightweight best-effort datagrams (UDP); port numbers multiplex processesTCP, UDP
3. Internet (Network)Best-effort routing of packets across multiple networks between hosts, using a global logical address; fragmentation, TTL, error reportingIP, ICMP, IGMP
2. Data linkFraming and reliable-enough delivery of bits across one physical link/local network segment; addressing at the hardware (MAC) level and resolving IP addresses to itEthernet, Wi-Fi (802.11), PPP, ARP
1. PhysicalTransmission of raw bits over the physical medium — voltages, radio signals, optical pulses, connectors and timingEthernet physical-layer standards (10/100/1000BASE-T), DSL, fibre-optic standards