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

Tietojenkäsittelytieteen laitos

Suomeksi In English Homework

Concurrent Programming, HW 1 (advance problems)

These will be covered in practise session during first week of lectures!

Study circles are formed in this 1st practice session. We also check the prerequisites: if you do not have a record of the prerequisite Computer Organization I (or similar) course in some for or the other and you have not passed the prerequisite exam for this course, then you can not participate in this lecture course.

These are normal, conventional homeworks. Problems are to be solved independently (or preferable working with a small group, with individual solutions) in advance at home and then the solutions are discussed in practice session.

  1. Give an example on a situation where instruction level parallelism can cause problems? Give a ttk-91 example. How should one handle this in the program?
     
  2. Consider a situation where part Q of some program has a variable Xq, part R of the same program has variable Yr, and Q wants to pass the value of Xq to Yr in R.
    1. How should one do this, if Q and R are separate processes executing on the same processor? What problems should one consider? Will the situation change, if Q and R are separate threads in the same process?
    2. How should one do this, if Q and R are separate processes executing in concurrently in different processors in shared memory system? What problems should one consider? Will the situation change, if Q and R are separate threads in the same process?
    3. How should one do this, if Q and R are separate processes in separate systems connected by (local area) network? What problems should one consider?

     
  3. Consider a personnel register for salary information. Many users can update and read the register concurrently. The register contains (among other information) current monthly salary, cumulative annual salary, as well as paid state and social security taxes.
    1. How should concurrency be considered when designing the system?
    2. What difference does it make, if the system is designed for one or multi-processor system?
    3. How should the personner register user consider possible concurrency problems?

     
  4. Consider a situation, where I/O is implemented with direct I/O?
    1. What concurrency problems do we have and how are they solved? Give a ttk-91 example?
    2. How will the situation change if I/O is indirect or DMA? Give a ttk-91 example?

     
  5. Consider a multi-threaded Java program
    1. When can one be sure that only one thread is executing at a time? How should one handle this in the program?
    2. When can one be sure that many threads is executing concurrently? How should one handle this in the program?
    3. When can it be possible but not sure that many threads are executing concurrently? How should one handle this in the program?


Teemu Kerola