DOC PREVIEW
UMD CMSC 433 - Lecture Slides

This preview shows page 1-2-3-4 out of 11 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CMSC 433November 13th, 2007Homework 4• write test cases for BoundedAtomicQueue, using MultithreadedTC• Should be atomic, fair, and the correct size• You are given a correct implementation, and 4 broken implementations• Write test cases that distinguish them• Everything open, no release tests– this is a homework, not a project• Due Friday Nov 16th2Missing office hours• I’m going to miss almost of my office hours over through Nov 16th– various meetings, workshops and trips• Schedule for coming days– Tuesday, Nov 13th 10:45 - noon– Thursday, Nov 15th, noon-1:30pm3Upcoming stuff• WebGoat security homework• Distributed programming– Map/Reduce and Hadoop–4Project 3• Problem with submit server fixed– NoSuchMethodException• Some hints/suggestions5Making sure each node is visited just once• Absolutely wrong:– if (!visited.contains(n)) { visited.add(n); ... do computations for n; }• The Set.add method returns true if the add method caused something to be added to the set• If using Java 6, can use Collections.newSetFromMap(new ConcurrentHashMap<Node,Boolean>())6Creating work for a thread pool executor• Don’t use recursion to explore the graph• Rather, for each node that should be processed/examined,– create a Runnable to process that node– give it to a thread pool executor• If you have a recursive call, you are missing the point of the exercise7Exploring a graph8Can use FutureTask• This isn’t required, but you can use FutureTask to handle getValue requests– create a FutureTask for each node with a callable that invokes the compute method on the node– give the FutureTask to a thread pool executor– We don’t need to wait for these tasks to complete before returning from explore9Problem• explore method must not return until all nodes have been visited• No easy way to ask if a thread pool executor is done executing tasks• How are we going to handle this?10Pop ungraded


View Full Document

UMD CMSC 433 - Lecture Slides

Documents in this Course
Trace 1

Trace 1

62 pages

Reflection

Reflection

137 pages

Testing

Testing

25 pages

Paradigms

Paradigms

10 pages

Testing

Testing

17 pages

Java RMI

Java RMI

17 pages

Java RMI

Java RMI

17 pages

Java RMI

Java RMI

17 pages

Trace 1

Trace 1

46 pages

Jini

Jini

4 pages

Final

Final

15 pages

Java RMI

Java RMI

13 pages

Testing

Testing

16 pages

Load more
Download Lecture Slides
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Slides and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Slides 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?