首页 > > 详细

讲解 CIS 481: Parallel & Distributed Software Systems Homework #2讲解 留学生Matlab编程

CIS 481: Parallel & Distributed Software Systems

Homework #2

Problem Set 2

Due: 11:59PM, Tuesday, February 25, 2025

Note: There are 5 problems with 10 points maximum. All homework must be edited using word processor, and submitted via myCourses.

Please include a cover page with your full name (or group info), course title, problem set number, and your submission date. You will automatically lose 1 point if the cover page is missing.

Problem 2-1.    Await Statement (1.5 points)

Andrews, Exercise 2.19, page 86.

Note: For simplicity, the while-loop is read as while (x != y) { x = x – 1; y = y + 1; }

Problem 2-2.    Scheduling Policy (1.5 points)

Andrews, Exercise 2.32 (b) only, page 89.

Note: Give detailed explanations to justify your answers.

Problem 2-3.    Scheduling Policy (3 points)

Andrews, Exercise 2.33 (a), (b) and (c), page 90.

Note: Give detailed explanations to justify your answers.

Problem 2-4.    Critical Section Problem (2 points)

Andrews, Exercise 3.3 (a) and (b) only, page 142.

Hint: Define a shared variable sem with initial value of 1. In each process, define a local variable x with initial value of 0. Invoke Swap with parameters (x, sem).

Problem 2-5.    Critical Section Problem (2 points)

Andrews, Exercise 3.8 (a) and (b), page 144.

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.


联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!