Fall 2012: CIS 720 Course Content and Schedule
Nichols 236
– 1:05-2:20PM
1. CIS 720 course content : August 21
2.
Introduction to advanced operating
systems
4. Concurrent hardware architecture
a. Traditional
parallel architectures
b. Cache coherency in multiprocessor
architectures
5. Model-based
design of concurrent software
a. Programming
Logic for Concurrent Execution
b. Proof Outline for a
Producer/Consumer
c. A Primer on Model
Checking by Mordechai (Moti)
Ben-Ari
d. Mutual Exclusion
:
h. Promela
1. Model checking tutorials:
4. Promela Reference Manual:
http://spinroot.com/spin/Man/promela.html
5. Example 1
6. Example 2:
buffering
7. Example 4: Dining Philosophers
8. Example 5: Sojourner
9. Example 6: A
Simple Discrete Event Simulation Clock in Promela
10.
Example
7: Channel
Implementation of Alarm Clock in Promela : first
attempt
11.
Example
8: Channel Implementation of Alarm Clock in Promela: second attempt
i.
Practice Homework: Using Spin Verify Peterson’s mutual
exclusion algorithm
j. Practice Homework: Using Spin Verify the Proof Outline of
Copy Problem
k. Homework #1: Due Sept 6: Build and Verify a Real-time Scheduler
6. Synchronization Primitives
2. Readers and Writers Implementation Using Semaphores
b. Barriers
1. Practice Homework: Barrier Synchronization with
Coordinator
2. Instructor’s Solution:VerifyBarrierAssert.txt
c. Semaphore
Implementation of await
1. More
Efficient Implementation
2. Practice Homework: verify
the semaphore implementation of the readers/writers implementation
d. Monitors
1. Practice Homework: verify
the semaphore implementation of C.A.R. Hoare’s monitor solution to the bounded
buffer problem.
7. Parallel
Programming Paradigms:
a.
Modeling a resource allocation process
b. Modeling a disk head scheduler
2. A Model of
a Disk Scheduling Paradigm
1. Does this model satisfy the disk
invariant?
c. Homework 2: Due Sept 13:
Improve Disk Scheduling Model in Promela
1. Properties to prove: no requests lost
and mutual exclusion is guaranteed.
2. State the invariant you are trying to
prove and put assertions in the code to check the invariant.
3. Put comments in your code to describe
why your assertions check for program correctness.
4. A
shared memory solution: AndrewsDisk2-3.2.pml
5. A channel oriented solution: DiskScheduler.pml
d. Programming Assignment 1: Build and Verify a model of a file server; Due Date: September 20,
2011. Send your solution to the instructor before 1PM.
1. the pseudo-code for this
model is on the website under “File Servers:
Conversational Continuity”.
2. Carefully describe the properties
that must hold for this model, including a “soft” shutdown of clients and
servers; describe
how the model accurately reflects your correctness criteria; and then document
the model execution under SPIN/Promela (ispin).
8. Java Concurrency:
a. Modeling a Concurrent Program in Java
1. Hartley Tutorial: http://elvis.rowan.edu/~hartley/JavaConcProg/
2. Java Tutorial: http://download.oracle.com/javase/tutorial/essential/concurrency/index.html
d. Alarm Clock Examples
1. Something
like Hoare’s monitor
f. Specific Notification in Java
g. Java Thread Architecture:
1. Webserver
and Worker Threads
h. Confinement
in Java Threads
i.
Java Concurrent Utilities: pdf version
1. Online Java Concurrent Utilities:
http://download.oracle.com/javase/6/docs/technotes/guides/concurrency/index.html
2. Locks and Conditions: http://download.oracle.com/javase/6/docs/api/java/util/concurrent/locks/Condition.html
3. Executors: http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Executor.html
4. Semaphores: http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Semaphore.html
5. BlockingQueue: http://download.oracle.com/javase/6/docs/api/java/util/concurrent/BlockingQueue.html
6. Programming Assignment 2: Implement and verify (using JPF)
the Alarm Clock with Java Concurrency Utilities. Use Locks and Conditions as
your synchronization mechanisms: Due Sept. 27. Submit to instructor in email by
1PM
1. Documentation for Concurrent
Software
2. Alarm Clock starting points: Java Deadlock Code or Java Lost Thread Code
3. I will accept a solution to the alarm
clock that treats time logically, as in a simulation model. That is, get rid of
the “tick()” method. To update the clock, you set it
to the minimum of all those waiting in the clock list, and awaken all those on
the waiting list at the minimum time.
4. Do not inter-mix synchronization
mechanisms of the Java Concurrency Primitives and the Java Concurrent Utilities
library
9. Using Locks and Conditions in POSIX Threads:
10.
Using
Synchronization Primitives in C#: //pdos.csail.mit.edu/6.824/papers/birrell-threads-csharp.pdf
11.
September
20: Model-checking with Java PathFinder (JPF)
a. Concepts of ModelChecking\JPFModelChecker.pdf
b. JPF Website: http://babelfish.arc.nasa.gov/trac/jpf
d. Examples of JPF Model-checking
1. Deadlock
in Java
2. Simple
Air Conditioner Controller
3.
Semaphore
4. Alarm clock loses a thread and deadlocks
5. Stock Fund Manager Example –
2. Fund Manager Code
6. Example – Bounded Buffer Manager
e. Programming Assignment 3: Due Oct. 5. Implement the
Client/Server model of Programming Assignment 1 in Java with a blocking queue
from the Concurrent Utilities Library. Verify it with JPF. Due at 1PM.
12.
Deriving
synchronization from Promela model (global
invariants)
a. Concurrent
Programming with await(Boolean expression)
1. Practice Homework: derive the
semaphore synchronization (using Andrews’ method) of the dining philosophers promela
program
b. September 18: Mizuno translation
method (“await”)
1.
Mizuno paper
3.
Practice Homework: derive the Java Synchronizing Primitives (using Mizuno’s method) of the dining philosophers promela
program
4. Practice Homework: JPFDiskHarness
13.
Mizuno Paper on Threadpool
(notes)
1. Iterative
Heat Transfer Simulation
4. GenericJob
5. Programming Assignment 4: Due Oct. 11: Use JPF to verify
Mizuno’s Implementation of the Threadpool Problem.
1. Prove that (for every step t in the
execution) the compute phase of all jobs
is always executed before the copy phase of all jobs, and that the copy
phase for step t always precedes the
compute phase for step t+1 (except for the last step in the execution).
3. Alternate Programming Assignments for
Programming Assignment 4: Using a model-checker, verify
1. Distributed Semaphores, or
2. Heartbeat algorithm for a topology of
a graph, or
3. Token Passing method for Termination
Detection in a Graph, or
4. An implementation of a
multi-processor kernel.
14.
Implementing synchronization primitives in a
kernel
15.
Testing
Concurrent Programs
1.
Verification, Validation, and Testing
2.
Testing Concurrent Software
3. Unit tests
5.
BB Unit Test
7.
Producer Consumer Bounded Buffer Test
9.
Monitor Testing by Per Brinch Hansen
16. October 2:Distributed Replicated Servers
17.
More Parallel Programming Paradigms
2.
Parallel Program Design Process
18. Extra Credit Homework:
1. Using JPF, model-check the
correctness of Mizuno’s implementation of the Reader/Writer Problem. (worth 25
points)
2. Model-check any of the PA4
Alternative problems (100 points)