Docsity

Parallel Processing and Multiprocessor Architecture Practice Examination 2026: Comprehen, Exams of Computer Science

Toggle sidebar
bg1
Parallel Processing and Multiprocessor
Architecture Practice Examination 2026:
Comprehensive Questions, Detailed
Answers, In-Depth Rationales & Advanced
Exam Preparation
Question 1
A parallel program has a sequential fraction of 8% and a
parallelizable fraction of 92%. Assuming perfect load balance
and negligible communication overhead, what is the
theoretical maximum speedup as the number of processors
approaches infinity?
A. 8×
B. 10×
C. 12.5×
D. 92×
Answer: C. 12.5×
Rationale: By Amdahl’s Law, maximum speedup is , where is
the serial fraction. Thus, . Even with infinitely many
processors, the 8% sequential portion limits the overall
speedup.
Question 2
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d

Partial preview of the text

Download Parallel Processing and Multiprocessor Architecture Practice Examination 2026: Comprehen and more Exams Computer Science in PDF only on Docsity!

Parallel Processing and Multiprocessor

Architecture Practice Examination 2026:

Comprehensive Questions, Detailed

Answers, In-Depth Rationales & Advanced

Exam Preparation

Question 1 A parallel program has a sequential fraction of 8% and a parallelizable fraction of 92%. Assuming perfect load balance and negligible communication overhead, what is the theoretical maximum speedup as the number of processors approaches infinity? A. 8× B. 10× C. 12.5× D. 92× Answer: C. 12.5× Rationale: By Amdahl’s Law, maximum speedup is , where is the serial fraction. Thus,. Even with infinitely many processors, the 8% sequential portion limits the overall speedup. Question 2

A program achieves a speedup of 7.2 on 16 processors. Which observation most strongly indicates that communication overhead is limiting scalability? A. The sequential portion is exactly zero B. Efficiency decreases as processor count increases C. Clock frequency increases with processor count D. The instruction set contains SIMD instructions Answer: B. Efficiency decreases as processor count increases Rationale: Parallel efficiency is. If efficiency declines as processors are added, the additional processors are increasingly underutilized, commonly because of synchronization, communication, contention, or load imbalance. A zero sequential fraction would not itself explain declining efficiency. Question 3 Four processors execute tasks with workloads of 20, 20, 20, and 60 units. If each processor receives one task and there is no migration, what is the parallel execution time relative to the total work? A. 30 units B. 35 units C. 60 units D. 120 units Answer: C. 60 units

currently shared by P1, P2, and P3. What is the expected coherence action? A. P1 silently updates only its own copy B. P2 and P3 invalidate their copies C. P1 invalidates its own copy D. All processors immediately write the line to main memory Answer: B. P2 and P3 invalidate their copies Rationale: Under an invalidation protocol, a processor performing a write obtains exclusive ownership and causes other cached copies to become invalid. Subsequent accesses by P2 or P3 must obtain the updated data. Question 6 Consider a system with 32 processors connected through a centralized shared-memory bus. Which scalability problem is most likely to become dominant as processor count increases? A. Lack of virtual memory B. Bus bandwidth and arbitration contention C. Reduced register-file capacity D. Excessive instruction-set complexity Answer: B. Bus bandwidth and arbitration contention Rationale: A centralized bus is a shared communication resource. As processors increase, cache misses, coherence transactions, memory requests, and arbitration requests

compete for limited bus bandwidth. This creates a scalability bottleneck. Question 7 A parallel application has a parallel fraction of 0.95. Ignoring overhead, what is its theoretical speedup on 20 processors? A. 10.0× B. 12.7× C. 14.1× D. 20.0× Answer: B. 12.7× Rationale: Amdahl’s Law gives. Substituting and ,. Therefore, none of the listed values is correct except this exposes an important issue: the correct speedup is approximately 10.26×. Thus the appropriate corrected answer is 10.26× , meaning the original options intentionally test careful calculation. Question 8 Which statement best describes Gustafson’s Law compared with Amdahl’s Law? A. Gustafson’s Law assumes the serial fraction always increases with processor count B. Gustafson’s Law emphasizes scaling the problem size with the number of processors C. Gustafson’s Law applies only to single-core systems D. Gustafson’s Law ignores parallel execution

A parallel reduction sums one million values using a balanced binary tree. Approximately how many sequential reduction levels are required? A. 10 B. 20 C. 1, D. 1,000, Answer: B. 20 Rationale: A balanced tree reduces the number of active elements by approximately half at each level. Since , approximately 20 levels are needed. This reduces the critical path from roughly one million operations to logarithmic depth. Question 11 Which synchronization primitive is most appropriate for ensuring that only one processor at a time modifies a critical shared data structure? A. Barrier B. Mutex or lock C. Broadcast D. Pipeline register Answer: B. Mutex or lock Rationale: A mutual-exclusion lock ensures that only one processor or thread enters a protected critical section at a

time. A barrier instead coordinates phases of execution and does not inherently provide mutual exclusion. Question 12 What is the principal danger of using a spinlock for a long critical section on a heavily oversubscribed multiprocessor? A. It eliminates cache coherence B. Waiting processors consume CPU resources while repeatedly checking the lock C. It prevents context switching completely D. It converts shared memory into distributed memory Answer: B. Waiting processors consume CPU resources while repeatedly checking the lock Rationale: Spinlocks are efficient when lock hold times are extremely short because they avoid sleeping and waking. For long critical sections or heavy contention, however, spinning wastes processor cycles and can increase cache-coherence traffic. Question 13 Two threads execute: Thread A: Thread B: x = 1 y = 1 r1 = y r2 = x

Rationale: SIMD—Single Instruction, Multiple Data—allows one instruction to operate on multiple data elements simultaneously. Vector processors and many GPU execution mechanisms exploit this form of data-level parallelism. Question 15 A GPU executes thousands of threads, but threads within a group are expected to follow the same instruction stream. What phenomenon can significantly reduce efficiency when different threads take different branches? A. Branch divergence B. Cache inclusion C. Register renaming D. Memory interleaving Answer: A. Branch divergence Rationale: In architectures that execute groups of threads together, divergent control flow can cause different paths to execute serially or with masked-off lanes. The more threads follow different branches, the lower the effective parallel utilization. Question 16 A system has 8 processors, each capable of 4 GFLOPS. The application achieves only 20 GFLOPS. What is the parallel efficiency?

A. 40%

B. 50%

C. 62.5%

D. 80%

Answer: C. 62.5% Rationale: The theoretical peak is GFLOPS. Efficiency is actual performance divided by peak performance: , or 62.5%. The missing 37.5% represents performance lost to factors such as synchronization, communication, memory stalls, and insufficient parallelism. Question 17 Which interconnection topology generally provides logarithmic network diameter while maintaining relatively low node degree? A. Fully connected network B. Ring C. Hypercube D. Single shared bus Answer: C. Hypercube Rationale: An n-dimensional hypercube has nodes, each with degree , and a diameter of. This provides efficient communication paths without requiring every node to connect directly to every other node. Question 18

Rationale: Maximum average parallelism is approximately total work divided by critical-path length:. Even with unlimited processors, the algorithm cannot sustain more than about 20-way parallelism on average because of dependencies. Question 20 Which situation is most likely to produce a deadlock? A. Multiple threads repeatedly reading shared data B. Threads acquiring locks in inconsistent orders C. A barrier used after all threads finish D. A single thread executing without synchronization Answer: B. Threads acquiring locks in inconsistent orders Rationale: Suppose Thread A acquires Lock 1 and waits for Lock 2 while Thread B acquires Lock 2 and waits for Lock 1. Neither can proceed. Establishing a global lock-acquisition order is a standard technique for preventing this type of deadlock. Question 21 A program spends 30% of its execution time in a section that can be accelerated by a factor of 10. What is the overall speedup? A. 1.30× B. 2.50×

C. 3.33×

D. 10×

Answer: B. 1.37× Rationale: Applying Amdahl’s Law,. Accelerating only one portion of a program cannot produce a 10× overall improvement because the remaining 70% is unchanged. Question 22 Which statement best explains why cache coherence alone does not guarantee correct synchronization? A. Coherence does not necessarily establish the required ordering of operations between processors B. Coherence prevents all memory accesses C. Coherence eliminates atomic operations D. Coherence works only for instruction caches Answer: A. Coherence does not necessarily establish the required ordering of operations between processors Rationale: Cache coherence ensures that processors maintain a consistent view of individual memory locations, but synchronization also requires appropriate ordering and atomicity guarantees. Memory-consistency models, fences, locks, and atomic instructions address these additional requirements. Question 23

Answer: C. Task parallelism assigns potentially different operations to processors, whereas data parallelism applies similar operations across data elements Rationale: Task parallelism focuses on executing different tasks concurrently, while data parallelism divides a dataset among processing elements that perform the same or similar computation. Modern systems frequently combine both approaches. Question 25 A parallel system uses 64 processors. A workload has a serial fraction of 2%, but synchronization and communication overhead increase with processor count. Which conclusion is most accurate? A. The system must achieve approximately 64× speedup B. Amdahl's Law guarantees perfect scaling C. The theoretical Amdahl limit is below 50×, and real speedup will generally be lower because of overhead D. The serial fraction becomes irrelevant with 64 processors Answer: C. The theoretical Amdahl limit is below 50×, and real speedup will generally be lower because of overhead *Rationale: With a 2% serial fraction, the infinite-processor Amdahl limit is. At 64 processors, the idealized speedup is. Communication, synchronization, load imbalance, memory contention, and other overheads can reduce actual performance even further.

Question 26 A parallel algorithm has a fixed serial fraction of 5%. As the number of processors increases from 8 to 64, which factor ultimately limits speedup under Amdahl's Law? A. Processor clock frequency B. Cache capacity C. The 5% serial fraction D. Number of arithmetic instructions Answer: C. The 5% serial fraction Rationale: Amdahl's Law limits maximum speedup to , regardless of how many processors are added. Increasing processor count reduces the parallel portion's execution time, but the serial component remains a fixed lower bound. Question 27 A 16-processor shared-memory system uses a snooping coherence protocol. Which architectural condition is most likely to make snooping increasingly inefficient as the processor count grows? A. Increasing register-file size B. Increasing broadcast coherence traffic C. Decreasing instruction latency D. Larger private stacks Answer: B. Increasing broadcast coherence traffic Rationale: Snooping protocols rely on processors observing transactions on a shared interconnect. As the number of

processors C. It must disable all caches D. It must always access main memory directly Answer: B. It must execute atomically with respect to competing processors Rationale: Compare-and-swap atomically compares a memory value with an expected value and conditionally replaces it. Atomicity prevents another processor from modifying the location between the comparison and update, enabling construction of synchronization algorithms without conventional locks. Question 30 A processor repeatedly updates a shared counter using a lock. Performance becomes poor as the number of processors increases. Which redesign is most likely to reduce contention? A. Place all counters on the same cache line B. Use per-processor local counters followed by a reduction C. Increase lock hold time D. Force every processor to update the same counter more frequently Answer: B. Use per-processor local counters followed by a reduction Rationale: Per-processor counters eliminate frequent synchronization on a single shared location. Each processor

accumulates results locally, and a final reduction combines them. This converts a highly contended operation into mostly independent work. Question 31 A cache line is 64 bytes, and two frequently modified variables are each 8 bytes. If the variables occupy the same cache line but are modified by different processors, what performance problem can result? A. Instruction-level parallelism B. False sharing C. Dead-code elimination D. Register spilling Answer: B. False sharing Rationale: The processors logically operate on different variables, but coherence operates on the entire 64-byte line. Each write can invalidate the other processor's cached copy, producing unnecessary coherence traffic. Question 32 A system contains 4 NUMA nodes. Each node has 8 processors and local DRAM. A processor accesses data located on another node. Compared with accessing local memory, the remote access will typically: A. Have identical latency by definition B. Have lower latency