
CECS 326 โ Lab Exercise 10/11/05 (5 points) โ Due 10/13/05
This lab exercise is designed to illustrate a critical problem with processes executing concurrently that try to access shared
resources.
For this exercise you need to copy two C++ programs named mixedup_p.cpp, and mixedup_c.cpp from
~lam/htdocs/cecs326/samples into your directory, execute them and explain what you observe in the output.
Do the following for this assignment:
1. Create a subdirectory named ex-10-11-05 within your htdocs/cecs326 subdirectory. Set its permission to world
readable and world executable.
2. Copy these two sample C++ programs. mixedup_p.cpp, and mixedup_c.cpp, from ~lam/htdocs/cecs326/samples into
this subdirectory. Compile these programs into mixedup_p and mixedup_c, respectively. Execute mixedup_p five
times, and make observations on the output of the five runs. Then add a prolog comment section and other comments
throughout the program as needed in these two programs to explain what each program does. Make sure your
comments include information on how the programs
3. Add a separate page to accompany the printouts of the five runs to provide your observations of the outputs, and
explain what caused the problems of the outputs, if any.
4. Hand in a hardcopy of the annotated mixedup_p.cpp, and mixedup_c.cpp, printouts of the five different runs with your
observations and explanations, and demo the execution of the mixedup_p program.