The exercise problem for Octber 18 pdf
and the template C source code. Sample solution . As explained in the class,
this problem is simplified but includes several important
concepts for the inter-process communication problem:
race condition, critical region, mutual exclusion and sleep and wake
synchronization primitives.
Exercise 4
Problems for October 25 pdf. Correction:
In Problem 1, please take "geometric mean" of Tq/Ts for
each algorithm. For the meaning of Geometric Mean,
please refer to "
http://mathworld.wolfram.com/GeometricMean.html. Sample solutions.
Please note that, in this solutions harmonic mean is used
in the first problem which is incorrect as mentioned above.
This sample solution document is prepared by the TA.
If you find any discrepancy against the exaplanation in
the class, please let the instructor know. Thanks.
Problem for November 29 (pdf),
(PostScript).
Templage C source code and
test input files: ex8.test
and ex8.dbg . A note on Section 4.4.7's title
The title of Section 4.4.7, "Simulating LRU in Software" is
confusing and misleading. Pure LRU is difficult to implement
on a real machine and this section explains algorithms that
perform similarly to the LRU algorithm: NRU and aging
(in other words, these are approximations of the LRU).
On the other hand what we did in Exercise 8 was to simulate
the real LRU algorithm.
Exercise 9
Solve the following problems on the textbook: Chapter 4: 5, 6, 7, 8, 9, 25, 28, 29 Chapter 5: 4, 10
Errata: Ch. 4, Problem 29, M bit for Page 1 should be 1 (not 01).