|
|
Last revised January 23, 2013
The
contents of this website, the links contained therein directly and
indirectly, and the contents of the said links, are copyrighted. They are provided exclusively for
non-profit educational use by the students currently enrolled in this
course and for the duration of this semester. No other use or any use by others is allowed
without authorization of the professor in this course and copyright holder or holders.
Homework
All assignments turned in for credit must be 100% your own work with no collaboration/help of any kind with others. |
Watch for added homework.
Exercises for
Chap. 1
p. 43 ...
1.1, 1.4, 1.6
(optional), 1.7, 1.8, 1.9, 1.13, 1.22, 1.23, 1.24, 1.28.
Write a Java code for the implementation of interrupts as described here: http://csc.csudh.edu/suchenek/CSC341/Implementation_of_interrupts.txt
Exercises for
Chap. 2
p. 94 ...
2.1, 2.2,
2.3, 2.4, 2.5, 2.6, 2.7, 2.13, 2.15.
Exercises for
Chap. 3
p. 143 ...
3.1, 3.2,
3.6, 3.7, 3.14.
Exercises for
Chap. 4
p. 181
4.1, 4.2,
4.3.
Exercises for
Chap. 5
p. 234 ...
5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.9. 5.12, 5.13, 5.14, 5.15, 5.18.
- Prove that SJF algorithm optimal (with respect
to average waiting time) in the class of non-pre-emptive CPU scheduling
algorithms, OR
- Prove that SRTF algorithm optimal
(with respect to average waiting time)
in the class of CPU scheduling algorithms.
Project 1 due March 20, 2013 in class.
Credit: 10 points
Write
a complete program that simulates RoundRobin scheduling algorithm that
for CPU bursts (given) of a number of processes and for the range of
consecutive values of quantum Q between the shortest and the longest
CPU burst, outputs respective Gantt charts and average waiting times
for each Q.
Input to the program:
- A list of 1 to 10 CPU burts for the processes (all positive integers)
Output from the program:
- Complete Gantt charts of the simulations
- The average waiting times.
What to submit:
- A hard copy of the complete program and its outputs for these inputs:
- CPU bursts: 10, 10, 10
- CPU bursts: 1, 1, 3, 3, 3, 9, 9, 9
- CPU bursts: 9, 8, 7, 6, 5, 3, 2, 1
- CPU bursts: 1, 2, 3, 5, 6, 7, 8, 9
- A USB removable memory with the source and executable code (must run uder UNIX or LINUX).
- ALL
THE ABOVE MUST BE SUBMITTED IN A 9" X 12" ENVELOPE.
|
Exercises for
Chap. 6
- p. 268 ... ex. 6.11, 6.13, 6.17.
- Show that if the
wait() and signal() semaphore operations are not executed as system
calls then mutual exclusion may be violated.
- Implement getAndSet method of Fig. 6.4 p. 248 using Swap as the only synchronizarion primitive.
- What's wrong with the definition of semaphore in Fig. 6.7 p. 250? Give all reasons.
- Implement acquire and release on non-negative semaphore using acquire and release on binary semaphore(s) as the only synchronization primitives. Provide
convincing argument that your implementation is correct. Hint. Reflect upon functionality of acquire on a non-negative semaphore.
- Exercise (hard): Modify the code of monitor DiningPhilosophers so that it allows construction of individual philosophers.
It requires execution of the following statement for each philosopher:
DiningPhilosophers Philosopher = new DiningPhilosophers();
Then each philosopher invokes the operations pickup() and putdown() in the following sequence:
Philosopher.takeForks ();
EAT
Philosopher.returnForks ();
Exercises for
Chap. 7
p. 340 and on ...
Ex. 7.2, 7.6, 7.8, 7.9, 7.10, 7.11, 7.15, 7.17.
Project 2 due May 8, 2013 in class.
Credit: 10 points
Exercise 18.8 page 806
What to submit:
- An example of scenario based on the graphs presented in section 18.5.2 with extensive explanation of all relevant details.
- The required proof (as mentioned in the last para of Exercise 18.8).
- All of the above must be typed double-spaced.
- ALL
THE ABOVE MUST BE SUBMITTED IN A 9" X 12" ENVELOPE
|
Exercises for
Chap. 8
Pages 387 and on
Ex. 8.1, 8.2, 8.3, 8.4, 8.9, 8.11, 8.17, 8.18, 8.20, 8.23.
Exercises for
Chap. 9
Pages 444 and on
Ex. 9.1, 9.2, 9.3, 9.4, 9.8, 9.18, 9.20, 9.21, 9.31.
Exercises for
Chap. 12
Pages 591 and on
Ex. 12.1, 12.2, 12.3, 12.4.12.15, 12.16, 12.18.
Exercises for
Chap. 15
Pages 712 and on
Ex. 15.13, 15.14.
|
|
|
|
|
|