CSCI 451: Operating Systems
Sample programs
- Forking a process in C: forking.c
- Creating an external process with Java: OSprocess.java
- Bounded Buffer
- Working with sockets:
- Date Server in Java: DateServer.java
- Date Client in Java: DateClient.java
- Working with Java RMI:
- Remote object interface RemoteDate.java
- Remote object RemoteDateImpl.java
- RMI server RMIServer.java
- RMI client RMIClient.java
- Set up procedure RMIsetup.txt
- Working with threads:
- Programming a C-thread: thread.c
- Same task as above in Java: JavaThread.java
- More Java threads examples from CSCI202
- Multithreaded matrix multiplication: MatrixProduct.java
- Producer/Consumer game and involved files: Channel.java MessageQueue Producer.java Consumer.java SleepUtilities.java Factory.java
- A demo for the interrupt() method: Interrupter.java
- Thread pool demo: ThreadPoolExample
- Working with thread groups: AccountDemo1.java
- Working with thread priorities: ThreadDemo3.java
- Scheduling algorithms:
- Synchronization of threads/processes:
- Unsynchronized deposits demo: AccountDemo1.java
- Petersen's solution to synchronization of two processes: SyncDemo1.java
- Hardware synchronization demo: SyncDemo2.java
- Synchronization with semaphores: SyncDemo3.java
- Applications of semaphores:
- Bounded Buffer problem: BufferDemo.java and Semaphore.java
- Readers and Writers problem: ReadersWriters.java and Semaphore.java
- The Dining Philosophers problem: Philosophers.java, Semaphore.java, SleepUtilities.java
- Java synchronization
- Synchronized deposits demo: AccountDemo5.java
- Waiting loop synchronization: BufferDemo7.java
- Lifelock demo: BufferDemo5.java
- Using synchronized methods with wait():
BufferDemo2.java and
SleepUtilities.java
ReadersWriters2.java - Difference between notify() and notifyAll() methods: ConditionDemo1.java and SleepUtilities.java
- Using block synchronization:
AccountDemo2.java
BufferDemo4.java and SleepUtilities.java - Using Java class Semaphore: BufferDemo3.java and SleepUtilities.java
- Using reentrant locks (deadlock warning!): BufferDemo6.java and SleepUtilities.java
- Using condition variables: ConditionDemo2.java and SleepUtilities.java
- Deadlocks
- Deadlock occurence demo: DeadlockDemo.java and SleepUtilities.java
- DFS algorithm and sample graph adj. list
- Clock applet: demo and source code
- StopWatch applet: demo and source code
- Banker's algorithm: BankersAlgo.java and customers.txt