Yliopiston etusivulle Suomeksi På svenska In English
Helsingin yliopisto Tietojenkäsittelytieteen laitos
 

Tietojenkäsittelytieteen laitos

Suomeksi In English Homework

Concurrent Programming, HW 2

Note: Everybody should be in a study circle by now. If you are not and still need partner(s), please send email to instructor.
  1. Install jBACI (or BACI) into your own machine. If you install it in your departmental account, please install it in the file server so that you can run it later on from any departmental machine. This software will be used more later on.
    Modify the C-- adding example add.cm so that, it has 4 prosesses each of them looping 25 times.
    1. Execute your program with jBaci 10 times and write down the final results.
    2. What was the smallest, largest, and average result?
    3. What is correct result?
    4. How should you modify the main program so that the result would be always 100?

     
  2. Exercises 2.2 and 2.3 from text book [BenA06, p. 39]
     
  3. Exercise 2.4 from text book
    1. Assuming positive values for K, what are the possible final values?
    2. Implement it with jBACI with K-value 10. Run it 10 times. How do the results match your answer in part (a)?

     
  4. Exercise 2.5 from text book

  5.  
  6. Exercise 2.9 from text book


Teemu Kerola