Confidential Teaching Materials
Homework 9 Grading Criteria
Note: To receive any credit whatsoever, your answers must be legible and readily readable in the
judgment of the grader. Add brief explanatory comments as necessary to make sure your answers
are clear and unambiguous to the grader.
[p1] 5 points
Compare and contrast parallelism and concurrency. Give examples of each.
[c1] 5 points
Sample Answer: Concurency means that one processor is wokring on many tasks at one time.
[p2] 5 points
What is the difference between dependency and precedence? Give code examples of each.
[c2] 5 points
Sample Answer:
Dependence is where a step must take place to produce a value before the current step
because the current step requires that value, e.g.:
[p3] 10 points
Compare and contrast the four different types of concurrent systems.
[c3] 10 points
Sample Answers:
Confidential Teaching Materials
Homework 9 Criteria, Page 2 of 3
users.” Example: a single processor PC running Linux on resnet on which several people
GRADING:
[p4] 10 points
What are the three primary issues in concurrency? Discuss each issue and describe why it is important to deal
with it when implementing a concurrent system.
[c4] 10 points
Sample Answer:
[p5] 5 points
What is the difference between an INTRACTABLE and a TRACTABLE problem? Give an example of each.
[c5] 5 points
Sample Answer:
Confidential Teaching Materials
Homework 9 Criteria, Page 3 of 3
[p6] 15 points
Do Exercise 10.1, page 341 in the book.
[c6] 15 points
Time Chunk Statement Precedence Dependence
1 S1
[p7] 10 points
Draw a precedence graph for the following procedure:
procedure Quadratic (a, b, c isoftype in num,
root1, root2 isoftype out num)
temp1, temp2, temp3 isoftype num
{s1} temp1 = sqrt ((b * b) – (4 * a * c))
{s2} temp2 = 2 * a
{s3} root1 = ((b * -1) + temp1) / temp2
{s4} root2 = (b + temp1) / temp2
endprocedure
[c7] 10 points
Time Chunk Statement Precedence Dependence
1 S1