University of Helsinki Department of Computer Science
 

Department of Computer Science

Department information

 
Rinnakkaisohjelmistot Spring 2004 / Exercises 1
Suomeksi


Area to be studied: Andrews: luku 1 The Concurrent Computing Landscape.

The goal of these exercises is to get an overall glance to the problem area of this course -- processes and their communication. These exercises contain also some issues that have been handled in the course Operating System I. (So, you might wan't to check also Stallings Book)


o 1 - BASIC TERMS

Explain the essentials of the following keywords (what is? differencies, needs? etc.)

o 2 - TWO PROCESSES (or THREADS) AS SEEN BY THE OS

a) Sketch a figure of the key structures that operating system maintains to manage two processes (or threads) that have shared memory areas (code, data) and own private areas (data, stack). Hint: PCB/TCB, See also Stallings' book.

b) What kind of requirements should be taken account when using a) shared code and b) shared data? Is it possible for the OS or hardware to guarantee any of those requirements? Are there something that the programmer is responsible for?

c) How concurrent / parallel the execution of these two processes (threads) can be? Assume that the programmer has ment that the communication is alternating (e.g. request - reply). What kind of situations must the programmer consider? What could go wrong (and how), if not done carefully?

o 3 - PROCESSES ON A DESKTOP

a) What kinds of concurrent processes are active in a normal desktop computer with a windowing based user interface? What is the use of implementing the various activities as processes?

b) Is the file service of a department network a concurrent system? What about e-mail? Notice that the question can be considered from different viewpoints: from the user's viewpoint and from the system's viewpoint.

o 4 - ROUTER, PROCESSES AND A BUFFER

Router is a machine in the data communication network that receives packets from different routes, inspects their headers and forwards the packets to the right direction. One process is dedicated to receive packets and to put them into the memory buffer. Another process reads the packets from the buffer, inspects the header, and sends the packet to the intended outgoing route. Sketch a figure!

The basic algorithms for these processes are very easy, but since there is the other one, some additional things must be taken account. What problems emerge from the usage of a common buffer? Specify "exactly" the requirements for the behavior of the processes (i.e. who may do what and when, who is not allowed to do what and when etc.)

o 5 - PIPELINE

a) Compiling a program consists of a series of phases (lexical analysis, syntactical analysis, code generation, code optimization): each module will go through these phases. The compiling could be distributed on four subsequent computers (one phase to each), which are connected by a LAN. Explain how much this organization could speed up the compiling. Are there any possible bottlenecks? Sketch a figure!

[You don't really need to know what happens in each phase!]

b) The name service for Internet "domain names" contains all names and for each name the related address (IP address; this is a simplification, but here it is just fine). The service is used by processes that have a name of a computer (e.g. melkki.cs.helsinki.fi) and have to solve the corresponding numeric format (128.214.48.122). How can concurrency be used to improve the performance of this service? Is concurrency of any use here? Sketch a figure!

[The goal is just to make an outline. There is no need to figure out how the name service is exactly implemented. It is also worth while to consider what "improving performance" really means.]


o SOME INSTRUCTIONS

The exercises are worth 9 points.
The exercices you have solved give you maximum 6 points. There will be 6 exercises each with 5 problems altogether 30 problems to be solved.

Please, be well prepared to the sessions, and solve the problems beforehand. Students explain their own solutions in the small group sessions, and get feedback from other students and from the instructor. If needed, use news group hy.opiskelu.tktl.rio to ask hints to these exercises.

          Problems done              points given
	            6                        1
		   10                        2
		   14                        3
		   18                        4
		   22                        5
		   26                        6
	  
 
In addition you can get three points when participating actively in the course. That means that you are supposed to bring to each exercice a short review about the most important things you have learned and also comments about your learning: what has been difficult, what has been easy, and in particular what has remained obscure. For each this kind of mini learning dairy you get 1/2 points per session and altogether 6 times 0.5 = 3 points. When you participate actively to small group sessions, you get 1/2 point per session (6* 1/2 = 3 points).
Two heads are better than one head.
Liisa Marttinen