Exercies, Operating Systems: 2nd Semester, 2005

Exercise 1

October 4 pdf, Postscript, Sample solutions

Exercise 2

Problem for October 11 pdf, and a C source file fork.c, Sample solution.

Exercise 3

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.

Exercise 5

Problem for November 1 , template C source and ex5-test. A sample solution by the TA.

Exercise 6

Problem for November 8 , template C source.

Exercise 7

Problem for November 22 (pdf), (PostScript), sample solutions pdf and (PostScript).

Exercise 8

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).

Exercise 10

Problem for December 13 (pdf), (PostScript).
Templage C source code and test input files: ex10.test and ex10.dbg.
In the elevater algorithm, please assume that the head moves up by default (unless there is no request to the cyliner with a higher number than the initial position).

Exercise 11

Work on the following problems:

Exercise 12

Problem for January 17 (pdf), (PostScript).

Exercise 13

Problem for January 24 (pdf), (PostScript).
  1. Work on these problems by youself for an hour,
  2. Your answer sheet will be collected (which will be the submission of this week's exercise), and then
  3. solutions will be given.

Hitoshi Oi