UP | HOME
2015-10-14 | ../../ | Slides

Java and Concurrency

1 Abstract

These are notes on how Java supports concurrency. There is a separate page for Java support for event-driven programming. We are assuming that a course in OS concepts has contributed pretty good understanding of concurrency, and processes.

2 Concurrency Fundamentals

  1. ./concurrency-fundas.html Processes, Threads, msg passing, synch, mutex, scheduling, etc. Language independent discussion.
  2. the happens-before relationship
  3. Atomic Access
  4. Locks

3 Java Concurrency

  1. Java had concurrency support from Java1. Java8 adds significant improvements. Official docs.
  2. Defining and Starting a Thread
  3. Synchronized Methods, Guarded Blocks
  4. java.util.concurrent.ExecutorService Interface
  5. Thread Pools
  6. Fork/Join

3.1 Example Source Code

  1. ../Java/src/Meenie.java Eeny, meeny, threads
  2. http://sourceforge.net/projects/javaconcurrenta/ Open source. Java Concurrent Animated: Animations that show usage of concurrency features.
  3. To try it out, download javaConcurrentAnimated.jar, and run
    java -cp patName/javaConcurrentAnimated.jar vgrazi.concurrent.samples.launcher.ConcurrentExampleLauncher
  4. https://docs.oracle.com/javase/tutorial/essential/concurrency/ Oracle Java Tutorial, Concurrency Trail; My Lecture. The items above are all covered here. Required Reading

Copyright © 2015 www.wright.edu/~pmateti