Fall 2000,
MCS4663: Operating Systems, Section 02
Chan-Jin Chung
Department of Math. and Computer Science
Lawrence Tech University
Syllabus
(The following pages need password to
enter. If you need help, email at chung@ltu.edu)
Java Source Codes


Announcement
The instructor usually closes his office door. (It is too noisy to open the door
because the office is close to the entrance and the copy room.)
Please knock the door during scheduled office hour, if the door is
closed.
Homework Programming Assignment #1: See class handout
Homework Assignment #1
- Due on Thursday September 28, 5:45pm
- 4 points out of 200
- Exercises from the text book
- Ex. 1.4, page 20
- Ex. 1.5, page 21
- Ex. 1.9, page 21
- Ex. 2.3, page 46
- Ex. 2.5, page 46
- Ex. 2.8, page 46
- Ex. 2.9, page 47
- Ex. 3.10, page 84
newproc.c
Homework Programming Assignment 21 and 22: See class handout
Homework Programming Submission Rules
- Hard copy of source code files and a floppy disk with source files in a
manila envelope.
- Your name on the envelope and on the disk.
- Diskette must include a valid *.jpr file to compile and run your programs
on the disk.
- Must follow programming standards such as comments, indentation, and
naming rules.
Quiz #1:
- Oct. 10
- 25 points (not 30 points)
- OS History, Chapter 1-4
- Style: True or False, Definitions, Fill in the blank(s), etc.
- Java Basics
Prog HW 3 and 4: Due Thu. 10-19
Class Changes
- 10-24 and 10-26: Comp. Net. by Dr. Kuofie from 5:45-8:25pm.
- 10-31 and 11-2: OS by Dr. Chung from 5:45-8:25pm.
OS Midterm: Thu. Nov. 9
Prog HW 5 and 6: Due Thu. 11-2
HW #2
- Due on Thu Nov 9, 7:10pm
- 8 points
- Exercises from the text book
- Ex. 4.8, page 121 (Use pascal-like pseudo code; 2.5 points)
- Ex. 5.2, page 150 (0.5 point)
- Ex. 5.3, page 150 (2 points)
- Ex. 5.4, page 151 (2 points)
- Ex. 5.7, page 151 (0.5 point)
- Ex. 5.8, page 152 (0.5 point)
Prog HW 5 (Due. Nov. 30, 20 points)
The solution to the readers-writers problem does not prevent waiting writers from
starving: If the database is currently being read and there is a waiting writer,
subsequent readers will be allowed to read the database before the writer can write.
Modify the solution such that it does not starve waiting writers.
Implement two versions in Java. One using semaphores and the other using "synchronized"
Java keyword.
Prog HW 8 (Due. Dec. 5, 7 points)
As Programming Homework 6, we did multithreaded solution to the bounded-buffer problem
that used message passing. The MessageQueue class is not considered thread safe, meaning
that race condition is possible when multple threads attempts to concurrently access the
queue. Modify the MessageQueue class using Java synchronization such that it is thread
safe.
Prog HW 9 (Due. Dec. 12, 10 points)
Create a BinarySemaphore class that implements a binary semaphore.
Prog HW10 (Due. Dec. 19, 10+? points)
The Sleeping-Barber Problem: A barbershop consists of a waiting room with n chairs,
and a barber room with one barber chair.
If there are no customers to be served, the barber goes
to sleep. If a customer enters the barbershop and all chairs are occupied, then the customer
leaves the shop. If the barber is busy, but chairs are available, then the customer sits in
one of the free chairs. If the barber is asleep, the customer wakes up the barber. Write a
program to coordinate the barber and the customers using Java synchronization.