Preparation for the Final ========================= This quiz will be open book, open notes, and 90 minutes long. Make sure you are familiar with: Basic terms Program, Process, Thread, Multprocessing, Multithreading Concurrency, Distribution Shared Resources, Synchronization Basic issues Modeling - interleaved sequences Granularity - at least four grains Scheduling - thread states Communication - shared memory vs. message passing Synchronization - why it is required Language intrinsic vs. Library concurrency support Basic programming in Ada, Java, Perl, C++/pthreads, and C++/Win32 Thread declarations Thread creation Thread startup and shutdown Joining Very basic locking Correctness Criteria The two ways to deal with races on shared resources Serialize all access on a single thread Protect it with a critical region Safety Race conditions Critical regions Deadlock Livelock Starvation Liveness Weak Fairness Strong Fairness Linear Waiting FIFO Operations Regular subroutine calls Asynchronous calls Blocking calls Timeout calls Conditional calls Mutual Exclusion Requirements Two main approaches Bare machine approaches Why non-atomic test and set fails Why atomic test and set works Peterson's algorithm (Bakery algorithm would go here, but we didn't cover it) Scheduler-Assisted Approaches Barriers Semaphores Smart data objects that protect themselves Notification Mechanisms Ada protected objects Explicit Locking Dining Philosophers Why we care about this classic Variations on the implementation How to write a good proof of the absence of deadlock The Enhanced Dining Philosophers Problem Java, Java and more Java The thread class - what it gives you and what it doesn't Runnables and Callables Thread objects Thread states (ALL SIX) Creating threads Starting threads Stopping (remember the thread itself should permit this) Uncaught exceptions Synchronization (at least seven approaches) Atomic Objects Volatile Fields Synchronized Statement Explicit Locks (reentrant simple locks, read/write locks) Explicit vs. Implicit Locking Condition Synchronization Wait/notify vs. Condition interface Sync objects countdowns - to wait for n things to happen barriers - to wait for n threads to arrive at some point semaphores - to allow n threads to use a resource at a time exchangers - to allow two threads to exchange data Interrupts Suspension (should be on the suspendee's terms only) The massive collection API Which collections are threadsafe and which aren't Copy on write stuff Iterators and concurrent modification exceptions Swing Keeping event handlers short Serializing access to components as opposed to locking them invokeLater and invokeAndWait Thread Scheduling Why this isn't really your business Why priorities don't matter a hell of a lot Thread Pools The Executor interface and friends The Executors utility class How the bouncing balls example works Scheduling taks with the ScheduledExecutorService and Timers Ada Tasking Tasks vs. Protected objects Tasks are not top-level entities Lifecycle Activation Termination Communication Rendezvous Conditional Entry Call Timed Entry Call Selective Wait Requeue Abort ATC Task States Task Attributes Windows API Processes and Threads Intro to Windows Objects (kernel and non-kernel objects) Navigating the WinAPI online docs Writing Windows programs Simple console apps Using MessageBox for quick and dirty apps Standard apps with message loop and window procedures Windows Processes Creation and termination Object ownership and ramifications Windows Threads Creation and termination Contexts Scheduling Priorities Boosts Message Queues Synchronization Synchronization Objects Event, Mutex, Semaphore, WaitableTimer Other kernel objects that can be waited on Non kernel-object approaches Interlocked variables and lists Critical sections Asynchronous procedure calls Overlapped I/O Timer Queues Overview of Distributed Programming Terms, definitions, areas of study List of paradigms Enterprise vs. Grid computing Basics of networks and internetworks Protocols and Layers Internet (TCP/IP) applications Socket-based programming WWW URI HTTP Webapps Java EE Overview Technologies Java webapps Remoting RPC RMI .NET Remoting Hessian/Burlap Web Services Ajax DWR Perl Network Programming Ada Distributed Programming Windows IPC More Theory Distributed Algorithms Distributed Transactions Languages for Distributed Programming Theory of Parallel Algorithms Temporal Logic ========================== The exam will have five questions: 1) Practice problem 30. 2) Something similar to practice problem 37. 3) Something about thread pools. 4) Something about Java synchronization objects 5) An essay question about a distributed technology.