Parallel & Distributed Computing (CS445)
Exam Diagrams Quick Reference & Scoring Guide
Course: Parallel & Distributed Computing (CS445) Target: Final-Term Examination
Format: High-Scoring Simple Paper Diagrams Strategy: Maximum Clarity for Full Marks
Page 1 of 10
Question 1: Cloud Architecture (Amazon Route 53 & CloudFront)
Part A: Amazon Route 53 (Scalable DNS Resolution) [5 Marks]
+------------------+
| User/Citizen |
| (Web Browser) |
+--------+---------+
|
1. Requests: | ^ 2. Responds with IP:
"[Link]" | | "[Link]"
v |
+--------+---------+
| Amazon Route 53 |
| (Scalable DNS) |
+--------+---------+
|
| 3. Connects directly using IP
v
+------------------+
| Government |
| Portal Server |
+------------------+
Drawing Tips for Exam:
• Draw 3 simple rectangular blocks: User, Route 53, and Server.
• Ensure precise arrow directions: Request to DNS, response back to User, and direct link from User to Server.
• Number the steps (1, 2, 3) clearly so the workflow is instantly understandable.
Full Marks Text Strategy:
• Route 53 translates the human-friendly URL ([Link]) into a machine-readable IP address.
• This prevents server failure by resolving queries fast at the DNS layer before hitting the actual infrastructure.
Part B: Amazon CloudFront (Edge Caching Mechanism) [5 Marks]
[ User 1 (Gwadar) ] [ User 2 (Skardu) ]
| |
| (Fast Request) | (Fast Request)
v v
+------------------+ +------------------+
| Edge Location | | Edge Location |
| (Cached Copy) | | (Cached Copy) |
+--------+---------+ +--------+---------+
| |
+--------------+---------------+
|
| (Only if Data is NOT in Cache)
v
+------------------+
| Main Server |
| & Database |
+------------------+
Page 2 of 10
Drawing Tips for Exam:
• Create two distinct regional users at the top row (e.g., Gwadar and Skardu) to demonstrate geographical isolation.
• Place an Edge Location block directly under each user containing the label "Cached Copy".
• Connect both edge locations down to a single Main Database Server block.
Full Marks Text Strategy:
• CloudFront saves static or temporary data at Edge Locations nearest to remote areas.
• This removes the massive query load from the core database server, avoiding crashes and providing lightning-fast
load times.
Page 3 of 10
Question 2: Parallel Computing (NVIDIA GPU vs CPU Expert & CUDA Locking)
Part A: CPU vs GPU Architecture (Factory Analogy) [5 Marks]
[ HIGH-END CPU ] [ NVIDIA GPU ]
"1 Highly Skilled Expert" "Thousands of Simple Workers"
| |
v v
+-------------------+ +----+ +----+ +----+ +----+
| Manager / | |W1 | |W2 | |W3 | |W4 |
| Super Expert | +----+ +----+ +----+ +----+
+-------------------+ +----+ +----+ +----+ +----+
| |W5 | |W6 | |W7 | |W8 |
v +----+ +----+ +----+ +----+
(Does 1 complex task at a time) (Each worker does 1 simple task)
|
v
(Millions of simple tasks done
ALL AT THE SAME TIME!)
Drawing Tips for Exam:
• Divide the drawing field into two contrasting columns.
• On the CPU side, sketch a large single block denoting sequential processing.
• On the GPU side, sketch a dense grid of multiple small interconnected worker cells denoting extreme parallel
capability.
Full Marks Text Strategy:
• Weather simulation involves millions of independent, basic math additions/subtractions.
• A CPU acts like a single manager processing items sequentially, while a GPU uses thousands of CUDA cores working
simultaneously in parallel.
Part B: CUDA Hardware Constraints & Cross-Platform Alternative [5 Marks]
[ EXISTING CUDA CODE ] [ ALTERNATIVE SOLUTION ]
| |
+------+------+ +------+------+
| | | |
v v v v
(NVIDIA GPU) (AMD GPU) (NVIDIA GPU) (AMD GPU)
[ WORKS ] [ FAILS! ] [ WORKS ] [ WORKS ]
(Incompatible) (Using OpenCL / ROCm)
Drawing Tips for Exam:
• Draw two parallel flow paths: Problem scenario (left) vs. Solution scenario (right).
• Use clear graphical status marks like ticks (✓) and bold crosses (✗) to directly catch the examiner's eye.
Full Marks Text Strategy:
• Problem: CUDA is a proprietary ecosystem locked strictly to NVIDIA hardware; it will refuse to compile or execute on
AMD GPUs.
• Alternative: The scientist must use cross-vendor frameworks like OpenCL or AMD ROCm for hardware abstraction.
Page 4 of 10
Question 3: Distributed Data (CAP Theorem - Consistency vs Availability)
Part A: CP System Under Network Partition Failure [5 Marks]
[ Data Center 1 ] [ Data Center 2 ]
(Balance: $100) (Balance: $100)
^ ^
| |
+--------X [ PARTITION ] X--------+
(Network Link Broken)
|
v
[ User Request ]
"Withdraw $50 from DC-2"
|
v
+-------------------+
| REQUEST DENIED |
| (Error Message) |
+-------------------+
Drawing Tips for Exam:
• Draw two isolated cluster nodes showing identical initialized monetary balances.
• Draw a broken network channel with a distinctive 'X' mark explicitly labeled as "Network Partition".
• Direct an inbound user transaction request to the disconnected partition node and show a terminal block labeled
"Request Denied".
Full Marks Text Strategy:
• In a CP (Consistency + Partition Tolerance) system, data integrity is prioritized over uptime.
• Because the broken link prevents synchronized state updates between centers, the node blocks the transaction to
prevent double-spending.
Part B: AP Stale Data Tolerance (Social Media Feed vs. Bank Balance) [5 Marks]
[ APPROACH 1: FACEBOOK (AP) ] [ APPROACH 2: BANK (CP) ]
"Availability over Freshness" "Freshness over Availability"
| |
v v
+------------------+ +------------------+
| User Screen | | User Screen |
| (Stale Feed) | | (Error/Blocked) |
+------------------+ +------------------+
| |
v v
"Post dekho, chahe 5 mins "Purana balance nahi dikhana,
purani hi kyun na ho!" chahe app band karni pare!"
[ LOW RISK ] [ CRITICAL RISK ]
Drawing Tips for Exam:
• Construct a side-by-side behavioral comparison.
• Label the social media track as "AP Approach" and highlight "Stale Feed Acceptable".
• Label the banking track as "CP Approach" and highlight "Error/Blocked Preferred Over Stale State".
Page 5 of 10
Full Marks Text Strategy:
• Facebook (AP): High availability ensures constant engagement. Outdated timeline updates have negligible
consequence (Low Risk).
• Banking (CP): Financial systems mandate strict absolute accuracy. Outdated states result in massive financial frauds
(Critical Risk).
Page 6 of 10
Question 4: Big Data Processing (HDFS Replication & Apache Spark)
Part A: HDFS Fault Tolerance & Data Replication [5 Marks]
[ ORIGINAL FILE ]
(e.g., Shipping Log)
|
v
+--------------+--------------+
| Divided into Data Blocks | -> [ Block A ]
+--------------+--------------+
|
v (HDFS 3x Replication)
+--------------+--------------+
| |
v v
[ DATA NODE 1 ] [ DATA NODE 2 ] [ DATA NODE 3 ]
+-----------+ +-----------+ +-----------+
| Block A | | Block A | | Block A |
+-----------+ +-----------+ +-----------+
| | |
[ RUNNING ] [ CRASHED! ] [ RUNNING ]
| X |
+-----------------------------+-----------------------------+
|
v
"Data is still SAFE and
available from Node 1 & Node 3!"
Drawing Tips for Exam:
• Show an original files ingestion block splitting data into discrete storage packets called blocks.
• Draw three identical cheap server boxes (Data Nodes) holding duplicate block copies.
• Cross out one node to show a crash event, with arrows showing continuous uninterrupted read access from the active
nodes.
Full Marks Text Strategy:
• HDFS achieves reliable fault tolerance on cheap commodity hardware via an automatic **3x Replication Factor**
policy.
• If a node breaks, the central master node (NameNode) instantly shifts client lookup streams to surviving cluster
entities.
Part B: Apache Spark vs. Hadoop MapReduce Architecture [5 Marks]
[ HADOOP MAPREDUCE ] [ APACHE SPARK ]
"Disk-Based Processing" "In-Memory (RAM) Processing"
| |
v v
+-----------+ +-----------+
| Disk | | Disk |
+-----+-----+ +-----+-----+
| (Read) | (Read once)
v v
+-----------+ +-----------+
| RAM | | RAM | <---+ (Keeps data
+-----+-----+ +-----+-----+ | in RAM for
Page 7 of 10
| (Write back) | | all steps!)
v +-----------+
+-----------+ |
| Disk | v
+-----------+ +-----------+
| RAM | | Results |
+-----+-----+ +-----------+
| (Slow & Repeat) "100x Faster Analysis!"
v
+-----------+
| Results |
+-----------+
Drawing Tips for Exam:
• Draw MapReduce repeatedly reading/writing back onto structural physical storage disks (Slow I/O loops).
• Draw Apache Spark performing a solitary initial ingestion read, then processing all multi-stage iterations inside a
single high-speed RAM boundaries box.
Full Marks Text Strategy:
• In-Memory Advantage: MapReduce enforces expensive disk operations at every step. Spark utilizes Resilient
Distributed Datasets (RDDs) to cache intermediate computations in memory.
• Processing Flexibility: MapReduce handles traditional batch sets only, whereas Spark handles complex batch
arrays and sub-second streaming metrics natively.
Page 8 of 10
Question 5: Systems Management (Distributed Tracing & Fault Injection)
Part A: Microservices Debugging via Unique Trace ID [5 Marks]
[ User Request ]
|
v (Assigns Unique Trace ID: #999)
+---------------------------------------------------------------+
| Service A (Frontend) [Trace ID: #999] [Time: 10ms] [ OK ] |
+-------------------------------+-------------------------------+
|
v (Passes Trace ID: #999)
+---------------------------------------------------------------+
| Service B (Auth API) [Trace ID: #999] [Time: 15ms] [ OK ] |
+-------------------------------+-------------------------------+
|
v (Passes Trace ID: #999)
+---------------------------------------------------------------+
| Service C (Database) [Trace ID: #999] [Time: 4000ms] [SLOW!]|
+---------------------------------------------------------------+
^
|
"BUG FOUND HERE!"
Drawing Tips for Exam:
• Arrange microservice blocks in a vertical sequence representing a network call path.
• Embed an identical, explicitly matching tracking identifier code (e.g., Trace ID: #999) across all nodes.
• Add a long execution timer badge on the faulty component to highlight exactly where the lag occurs.
Full Marks Text Strategy:
• A **Trace ID** provides a unified tracking metadata tag that propagates across isolated network endpoints.
• By correlating distributed logs using this unique key, operations teams can quickly find the slow component among
dozens of microservices.
Part B: Chaos Engineering & Network Latency Fault Injection [5 Marks]
[ Normal User Request ]
|
v
+------------------+
| Chaos Mesh / | ----> (Injects 5-second artificial delay)
| Chaos Engine |
+--------+---------+
|
v (Slowed Request)
+------------------+
| Microservice |
+--------+---------+
|
+--------v-----------------------------------+
| HOW DOES THE SYSTEM BEHAVE? |
| A) App crashes? -> [ BAD / Unhealthy ] |
| B) Shows elegant loading/backup page? |
Page 9 of 10
| -> [ GOOD / Resilient! ] |
+--------------------------------------------+
Drawing Tips for Exam:
• Draw a regular transaction sequence passing through an intercepting box labeled "Chaos Engine".
• Add an annotation indicating the programmatic injection of an artificial network latency delay.
• Conclude with a system branching logic block evaluating recovery resilience vs crash failure.
Full Marks Text Strategy:
• Injected Fault (Latency Delay): Intentionally forcing network communication slowdowns simulates infrastructure
congestion or partial downstate issues.
• Goal: It proactively tests if adjacent microservices gracefully handle conditions via circuit breakers and fallbacks
before production failures occur.
Page 10 of 10