parson@kutztown.edu, Office hours: https://kutztown.zoom.us/j/94322223872
Office Hours Monday 3-5 PM, Tuesday 3-4 PM, Friday (Zoom only) 3-5
PM, or by appt.
Monday & Tuesday office hours are either Zoom using the above
link or at Old Main 260.
Friday April 28 Zoom office hours will be at 12 - 2 PM because
of the KTech picnic.
I have put a copy of the textbook on reserve in Rohrbach
Library for the semester. You can go to the front desk &
borrow it overnight.
Students can meet in person in OM 158 OR live on-line via
Zoom.
I will post links to recorded archives at
the bottom of this page within a day after each class.
We will be multiprocessing on mcgonagall.kutztown.edu, which
are accessible via ssh from acad:
ssh -l yourloginname mcgonagall
ssh -X -l yourloginname mcgonagall
# The -X enables X11 GUI I/O.
Handouts from Spring 2011 through present. Slides
for week 2, Chapters 1, 2, 3 and 13 on Introduction,
Thread Safety, Sharing Objects and Explicit Locks. Week
2 added slides on Race Conditions, Critical Sections
& Composing Thread-safe Objects. Week 2
Jython code to demonstrate using java.lang.Runnable,
java.lang.Thread, and a race condition.
In acad ~parson/multip see RaceJython.py
and RaceJava.java
jython RaceJython.py ;
javac RaceJava.java ; CLASSPATH=. java RaceJava
Example code is at /export/home/faculty/parson/multip on
acad.kutztown.edu (and on mcgonagall via NFS). Locks
and condition variables slides from September 21 class
session. Slides
for week 3, Chapters 15, 16 and Appendix A on Atomic
Variables, Nonblocking Synchronization, the Java Memory
Model and Annotations for Concurrency. (4/1/2015) A problem
from the Spring 2011 midterm that uses atomic
variables instead of a lock-based monitor. Slides for
week 4, Chapter 4 on Composing Objects. (4/1/2015) Code listings for
Chapter 4 Slides
for week 5, Chapter 5 on Building Block Classes from
java.util.concurrent. (4/1/2015) Code listings for
Chapter 5 D. Parson and
D. Schwesinger, "Minimum-Blocking
Parallel Bidirectional Search,"
Proceedings of PDPTA'12: 2012 Intl. Conf. on Parallel
Processing Techniques and Applications , Las Vegas, NV, July
16 - 20, 2012.
Here are the slides
for the talk.
CyclicBarrier, CountDownLatch, and
using these & related mechanisms in parallel
bidirectional search.
See code on acad at
~parson/multip/pennydime CoinPuzzle CoinPuzzleDataflow &
CoinPuzzleDataflowMultiQ.
FutureTask interface used in CSC220Fall2022PaintingAssn5,
Mutators,
and Threading
code tabs.
Full CSC220
handout code + data is here. Slides for
week 7, Chapter 6 on using Executor to schedule tasks
using thread pools from java.util.concurrent. (4/8/2015)
"Creative
Graphical Coding via Pipelined Pixel Manipulation, "
Proceedings of the 33rd Annual Spring Conference of the
Pennsylvania Computer and Information Science Educators
(PACISE) Shippensburg University of PA, Shippensburg, PA,
April 6-7, 2018.
Processing (Java) code for sketch PhotoArchMontage
and its helper active classImageLoader
demonstrating starting a thread. Video
and some stills from a digital art exhibit in Munich
on September 14, 2018.
This sketch uses my multithreading
package PixelVisitor that we will examine in detail.
Acad ~parson/multip/PixelVisitor has my
Java library for Processing that uses Java thread pools. Slides for
week 10, Chapter 7 on Interruption, Cancellation and
Shutdown. (3/25/2015) More slides
for week 10, Chapter 8 on Applying Thread Pools. (4/8/2015) Slides
for week 11, Chapter 9 on GUI Applications. (4/8/2015) Tutorial
on multithreading in Java FX (GUI framework that
supplants Swing. Acad
~parson/multip/multip/csc580spring2011/Projects/csc580gps4/gpssearch.java
has the Swing example that uses a single-threaded
ExecutorService to run the worker thread discussed on 11/30. More slides
for week 11, Chapter 10 on Avoiding Liveness Hazards.
(4/15/2015) Slides for
week 12, Chapter 11 on Performance and Scalability. (4/15/2015) More slides
for week 12, Chapter 12 on Testing Concurrent
Programs. (4/15/2015)
~parson/Compiler1/optimize5/stepvm/StepVM.java helper class
HeapData has the 12/7 example code for lazy evaluation.
Search for:
class HeapData,
HeapData.flatten(...), HeapData.helpflatten(...)
In optimize5/ see
collect_reduce.txt (look for reduce and collect),
programqsort1p.txt (reduce), programqsort1p_O2.debug.out
(STEP_FORK & STEP_JOIN) Slide on critical
sections, race conditions, & related concepts Slide on deadlock
Material in my UNIX account
~parson/multip has a lot of documentation & code
examples on current programming.
~parson/multip/spring2015 is where I will work out some code
examples for class.
~parson/JavaLang/net/jcip/examples has all example code from
our textbook.
Assignments -- From acad
you must "ssh mcgonagall" to build & test all
assignments.
Assignment
1 on building & running a thread-safe data
pipeline is due via make turnitin on February 23.
Deadline was bumped from 2/16
to 2/23 at the 1/30 class.
"Neither the Java Language
Specification nor the Java Memory Model formally defines
immutability, but immutability is not equivalent to simply
declaring all fields of an object final. An object whose
fields are all final may still be mutable, since final
fields can hold references to mutable objects. An object
is immutable if:
Its state cannot be modified after
construction;
All its fields are final; and
It is properly constructed (the this
reference does not escape during construction).
Immutable objects can still use mutable
objects to manage their state. (Parson: No means for
class-external mutation.)
See textbook page 47 for more information.
Parson: A marker
interface Queue<E> <-
java.util.concurrent.ThreadSafeQueue<E> <-
BlockingQueue<E> would have allowed pipeline
construction using only thread-safe queues. As it stands
the Queues may not be @ThreadSafe.
Examples of queues in Processing: https://acad.kutztown.edu/~parson/CSC543DemoImagePipelineQueues.zipSource code
only.
Assignment 5 Slides to 10-minute talk and code in a
ZIP file due via D2L Assignment 5 May 8 at 11:59 PM. Ideas and specs from
last time.
Each talk will run 10 minutes,
including setup time & questions / answers.
Plan on talking about 8 minutes. Inform your talk by writing
demo code.
The intent of the code is to familiarize yourself in a
concrete way with the topic. It is demo code, not an entire
application.
It does have to have at least some custom work. It cannot
just be downloaded from the net.
You may download & enhance. Talk with me about the scope
of the code if you are uncertain.
You do not need to write a paper. Pretend to be doing a
professor's job for 8 to 10 minutes.
Grading will be on clarity of the talk, clarity of the
slides with optional demo, ability to answer questions. Grading criteria, 25% each: Is the work non-trivial, e.e., not
just downloaded? Is the presentation clear? Are the materials complete and
clear? Can the presenter answer questions
about the project?
1 18:00 Reilly Walther,
Concurrency in PHP and SQL
2 18:10 Nicholas
Morello, Using Python coroutines to drive parallel Weka
processes
3 18:20 Dylan Herbst,
java.util.concurrent.ForkJoinTask
4 18:30 Paul Barton, C++
Concurrency in Breadth-First Search
5 18:40 Edwin Cadiz,
Multithreading in Unity
6 18:50 Travis Bubb, C#
Concurrency
7 19:00 Aaron Harman,
Concurrency in Rust - different application
8 19:10 Wyatt Blizard,
Unix shared memory & semaphores for multi-process
concurrency
19:20 BREAK
9 19:30 Matthew
Lingenfelter, PlayerExplicit in C++
10 19:40 Matthew Bartlett,
Topological sort in Rust
11 19:50 Thaddeus Hall,
Concurrency in Javascript & Node.js
12 20:00 Pei Hua Lin,
PlayerExplicit using Python threads and RLock and/or
Semaphore
13 20:10 Nik Golombek, Python
threads of assignment 1 pipeline2023 using the queue
library.
14 20:20 Haris Bhatti, Python
client-server interprocess communications using sockets
15 20:30 Nathan Rew, Different
project in Javascript