CIS 481: Parallel & Distributed Software Systems
Homework #1
Problem Set 1
Due: 11:59PM, Tuesday, February 11, 2025
Note: There are 5 problems with 10 points maximum. All homework must be edited using a word processor, and submitted via myCourses.
Please include a cover page with your full names (group info), course title, problem set number, and your submission date. You will automatically lose 1 point if the cover page is missing.
Problem 1-1. Parallel Computations (1+0.5point)
Andrews, Exercise 1.13 (a) and (c) only, page 37.
Note: Develop the pseudo code like the worker processes demonstrated on page 16 of your textbook.
Problem 1-2. Atomic Actions and Histories (2+0.5 points)
Andrews, Exercise 2. 10 (a) and (b), page 84.
Andrews, Exercise 2. 12 (a) only, page 84.
Note: (1) For Exercise 2.10 (b), the assignment y = y – x is implemented by 4 atomic actions. (2) For both exercises 2.10 & 2.12, you should give at least one scenario for each set of final values of x andy.
Problem 1-3. At-Most-Once Property (2 points)
Andrews, Exercise 2.14 (a) and (b), page 85.
Correction: Question (a) should ask “Do the assignments in the co-statement meet the requirements of the At-Most-Once Property (2.2)? Explain.”
Problem 1-4. Await Statement (1.5+1 points)
Andrews, Exercise 2.13 (a), (b), and (c), page 85.
Andrews, Exercise 2.18, page 86.
Note: A scheduling policy is weakly fair, if every await statement that is eligible to be executed next will be executed eventually, assuming that its condition once becomes true and then remains true.
Problem 1-5. Programming Assignment (1.5 points)
Implement your parallel algorithm for Andrews, Exercise 1.13 (a) in Java. Use threads to simulate multiple worker processes for parallel computation.
Sample code for using multiple threads in Java can be downloaded from:
http://www.cis.umassd.edu/~hxu/courses/cis481/s25/ProblemSet/PS1/SimpleTask.java.txt
General Remarks:
1. Always provide your reasoning/explanations, and not only your final answers.
2. You may discuss assigned problems with your classmates, but you must individually write your own solutions/code for all assignments.
3. Assignments are to be submitted via myCourses by the due date.