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

Tietojenkäsittelytieteen laitos

Suomeksi In English Homework

Concurrent Programming, HW 6

  1. Solve the Dining Philosophers Problem with protected objects.
     
  2. Redo preceding week Narrow bridge problem with monitor. If you want, you can try out your algorithms in BACI, by placing the into the bridge simulator dummy solution. (While running the simulation, observe the values of shared variables west_bound and east_bound, and check that the "animated bridge" has proper number of of cars. You may tune the system parameters better

    Check that your algorithm works at least in the following cases:
    1. First car comes to direction A or B?
    2. There are 5 cars on the bridge toward A, and a new one arrives towards A or B?
    3. There are 4 cars on the bridge toward A, a new one arrives towards B, and then a new car towards A?
    4. There are cars on bridge, and they leave making bridge empty. There were cars waiting in th eother direction.
    5. There are cars on bridge, and they leave making bridge empty. A new cars arrives towards A or B?

  3. Exercises 10.2 (see Alg. 10.2) and 10.11 (see Alg. 10.3) from text book.
     
  4. [2 htp] Read the article Real-world Concurrency (Bryan Cantrill, Jeff Bonwick, ACM Queue vol. 6, no. 5 - September 2008, html, local pdf) and consider the following questions based on that article.
    1. What realistic options do we have to speed up current applications, in addition to multi-threaded concurrent programming?
    2. What is the meaning of hot and cold execution paths?
    3. Why would using read and write locks not be such a good idea always? What is a recursive read-lock and what problem is associated with it?
    4. What advantage is there in using CPU-bound locks.
    5. What does the concept priority inheritance mean and why is it easier to use it with busy-wait mutex-locks than semaphores?
    6. What is the lock ordering and what problem do we have in implementing it?
       
  5. Fill in the Student Feedback form.
    In Question 11 (Your opinion on course material) discuss your opinion on using BACI-software in this course. Did using BACI support your learning? Was the time spent usefully? Was writing C-- programs difficult?
    In Question 14 ("How would you like to develop the course?") dicuss your opinions on the practice session system. Is it better/worse than the usual system where students discuss one problem in each table and present them to everybody in turn? Did it support learning? Would it be useful to spend the last 15 minutes to go through together main points in each exercise? If this wqs tried out in your practice session, did it work?

    Take copies of these answers to the practice session for dicussion. 


Teemu Kerola 11.12.2009 9:47