NivaarExam PrepOfficial exam papers ↗

25-Comp-B10 Distributed Systems · December 2016

Question 1 of 7: Characteristics of Distributed Systems

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

Notes on this paper

98-Comp-B10 Distributed Systems — National Examinations, December 2016. 3 hours, closed book, non-programmable calculator only. Candidates were instructed to answer any five of the seven questions, all carrying equal weight and mostly requiring essay-format answers; all seven are answered below as a complete study resource.

Reference texts: Coulouris, Dollimore, Kindberg & Blair, Distributed Systems: Concepts and Design (5th ed.) — system models, peer-to-peer systems, middleware and client-server architecture (ch. 1–2), interprocess communication and the request-reply protocol (ch. 4–5), operating system support for distributed systems (ch. 7), security (ch. 11), distributed file systems (ch. 12), and time, coordination, replication and fault tolerance (ch. 14–15, 18).

Check — source parsing artifact. Every question header on this paper is printed as “Question # N.” (a literal hash between the word and the number). Separately, Questions 1 and 7 each print their third sub-part re-using the letter “a.” instead of continuing the alphabet; both are relettered below (a), (b), (c) in the order printed, with no change to content or intent.

Question 1: Characteristics of Distributed Systems (20 marks)

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) Why distributed designs are used — three advantages. A distributed system connects independent computers so they appear, to users and applications, as a single coherent facility, and this is chosen over a single centralized machine for several reasons. Advantage 1 — resource sharing and incremental scalability. Processing power, storage and peripherals belonging to many machines can be pooled and shared across an organization, and capacity is grown incrementally by adding more machines rather than being permanently capped by one centralized machine's ceiling. Advantage 2 — fault tolerance and availability. Because functionality and data can be replicated across independent nodes, the failure of any single machine need not halt the whole system — other nodes keep serving, whereas a centralized system has one point of failure. Advantage 3 — openness and heterogeneity. A system built on open, published protocols and interfaces lets components from different vendors, languages and hardware/OS platforms interoperate and be replaced independently, so the system as a whole can absorb best-of-breed components instead of being locked into one vendor's monolithic design.

(b) Client and server programs. A server is a program that runs continuously (or on demand), listens on a well-known network address/port, and provides a defined service by responding to requests. A client is a program that initiates communication by sending a request to a server and consuming the reply, typically on behalf of an interactive user. The relationship is asymmetric: the server is passive (waits to be asked) and is typically shared by many concurrent clients, while each client instance is usually private to one user or task and always initiates the interaction. The two communicate over a network using a request-reply protocol built on top of transport-layer sockets (TCP or UDP): the client marshals its request into a message, sends it to the server's address, and blocks (or polls asynchronously) until the reply arrives.

Client-server architecture of the Web (HTTP) Client (Web browser) Server (Web / HTTP server) 1. HTTP GET /index.html 2. HTTP 200 OK + HTML/CSS/images Internet Initiates request; renders reply Passive; shared by many clients
Fig. Q1(b) — client-server exchange for a Web page fetch. The browser (client) opens a TCP connection to the Web server's well-known port (80/443), sends an HTTP request naming a resource, and the server processes it and returns a response; the same request-reply pattern underlies email (SMTP/IMAP) and ftp with different message formats and ports.

(c) Middleware. Middleware is a software layer that sits between the underlying operating system and network protocol stack on one side and distributed applications on the other, providing programmers with a higher-level, uniform abstraction (such as remote procedure call, remote method invocation, message queuing, or a distributed transaction service) that masks the heterogeneity of the underlying hardware, operating systems and network protocols. It typically also supplies common, reusable services — naming/directory lookup, security, transaction coordination — so that application developers do not have to re-implement these low-level concerns for every distributed application built on top of it.

Middleware's position in the distributed-system stack Applications A, B, C (on different hosts) Middleware (RMI / RPC / message queues) Operating system + network protocol stack Physical network (heterogeneous hardware)
Fig. Q1(c) — middleware is inserted between application code and the raw OS/network layer, giving every application above it the same programming model regardless of the operating system, machine architecture, or protocol running underneath.
← Paper overview