The last time I taught this course was at Drexel University, spring 1998, http://www.cs.drexel.edu/~shartley/MCS361/index.html. Java has changed a lot since then, in particular the addition of the library java.util.concurrent to replace the hard-to-use-correctly wait(), notify(), and notifyAll(). We have dual and quad core laptops and desktops now. We also have very powerful graphics processing units (GPUs) on discrete video cards (ATI and NVIDIA) that are really general purpose parallel processors. Efforts are underway to develop programming languages to utilize them, for example CUDA. See http://www.nvidia.com/object/cuda_home.html and http://en.wikipedia.org/wiki/CUDA. Other than that, not much has changed the last decade. Oh, except the realization that things better change!
Threads. Concurrency. More on Concurrency. Java threads tutorial.
Some concurrent programming is really easy, so easy it can be taught to any freshman student, as this Alice example shows, concurrentProgramming.a2w.
During the semester, we will run example programs on elvis sometimes, but mostly on a laptop running Ubuntu 9.10 with 2 GB of RAM
% cat /proc/meminfo MemTotal: 2060152 kBand a Core 2 Duo CPU from Intel
% cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 Duo CPU T7250 @ 2.00GHz stepping : 13 cpu MHz : 800.000 cache size : 2048 KB cpu cores : 2 bogomips : 3988.85and Linux kernel
% cat /proc/version Linux version 2.6.31-17-generic (buildd@palmer) (gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8) ) #54-Ubuntu SMP Thu Dec 10 16:20:31 UTC 2009using
java version "1.6.0_16" Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) Server VM (build 14.2-b01, mixed mode)
Syntactic sugar, javaconcprog.AgeRandom.java.
threadedPrimes.java, threadedPrimes.txt.
bigIntegerPrimes.java, bigIntegerPrimes.txt.
testTimeSlicing.java, testTimeSlicing.txt.
matrixMultiplication.java, matrixMultiplication.txt.
adaptiveQuadrature.java, adaptiveQuadrature.txt.
boundedBufferBusyWaiting.java, boundedBufferDriver.java, boundedBufferBusyWaiting.txt.
Running raceCondition.java on a recent laptop, raceConditionLaptop.txt, and on elvis, raceConditionElvis.txt.
bankAccountsAuditor.java, bankAccountsAuditor.txt.
mutualExclusionPeterson.java, mutualExclusionDriver.java, mutualExclusionPeterson.txt.
mutualExclusionMulti.java, mutualExclusionMulti.txt.
mutualExclusionBakery.java, mutualExclusionBakery.txt.
boundedBufferSuspendResume.java, boundedBufferDriver.java, boundedBufferSuspendResume.txt, boundedBufferForceDeadlock.java, boundedBufferForceDeadlock.txt.
noRaceCondition.java, noRaceConditionSyncMethodOK.java, noRaceConditionSyncMethodBad.java, noRaceCondition.txt.
parallelPrimes.java, parallelPrimes.txt.
boundedBufferSemaphore.java, boundedBufferDriver.java, boundedBufferSemaphore.txt.
diningPhilosophersServer.java, diningPhilosophersSemaphore.java, diningPhilosophersDriver.java, diningPhilosophersSemaphore.txt.
boundedBufferMonitor.java, boundedBufferDriver.java, boundedBufferMonitor.txt.
diningPhilosophersServer.java, diningPhilosophersMonitor.java, diningPhilosophersDriver.java, diningPhilosophersMonitor.txt.
readersWritersMonitor.java, readersWritersDriver.java, readersWritersMonitor.txt.
readersWritersMonitor2.java, readersWritersMonitor2.txt.
boundedBufferQueue.java, boundedBufferDriver.java, boundedBufferQueue.txt.
javaconcprog/MessagePassing.java, boundedBufferMP.java, quickSort.java, parallelSievePrimes.java, radixSort.java.
home page:
http://elvis.rowan.edu/~hartley/index.html
e-mail:
hartley@elvis.rowan.edu