parson@kutztown.edu, Office hours: https://kutztown.zoom.us/j/94322223872 Office Hours Monday 3-5 PM, Tuesday 3-5 PM, Thursday 10-11
AM, or by appt.
All office hours are either Zoom (preferred) using the above link
or at Old Main 260. Thursday May 9 office
hour switched to 1-2 PM, others as above. First day handout (syllabus that
is specific to this semester).
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 fall 2023 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.
If you are
new to working on our Linux systems, you can bring
up a Windows CMD prompt and from there: ssh
YOURLOGINID@acad.kutztown.edu
It is possible to use
the scp, ssh-based file
copy command in Mac or Windows
command line utilities.
If you do not have a favorite Linux text editor,
try running nano on acad. Assignments must
run on mcgonagall.
Assignment 3
builds on on Assignment 2, due 11:59 PM Thursday
March 28 via make turnitin.
It employs thread-safe non-blocking
queues & atomics to put / take FiveTuples and
TenTuples. INonBlockingTupleExchange.java
as a Java interface specifying the data exchange
functions. NonBlockingQueue.java
is an adapter using thread-safe queues that support
non-blocking functions. NonBlockingAtomicReference.java
uses java.util.concurrent.AtomicReference. NonBlockingAtomicReferenceArray.java
uses java.util.concurrent.AtomicReferenceArray. ~parson/multip/spinners.py is a Jython script
about non-blocking
Producer->Consumer
spinning.
April
15 Class Assn3 & Assn4 post-mortem, Chapter 10 slides
and
walked through the first two entries just
above here on Related work. April
22 Class Python closures, generators, coroutines, using
latter to run parallel (Weka-Java) processes
to accelerate data analysis on mcgonagall.
~parson/DataMine/HawkMtn/analysis_scripts source files. April
29 Class Chapter 11 and 12 slides,
some benchmarks on the new Arya machine, prior Java-based
student assn5s.
Please send me a remaining time for your Assignment
5 presentation if you haven't & plan to attend the
whole class
in support of your classmates. I assume
everyone will attend via Zoom. If not, bring your materials or
have them
accessible via the Web. Students usually
give a short code demo. You'll have 5 more minutes than the
last 2 times
because there are fewer students this
semester.