This page lists the example project requirements for Example 7A in CC 410. Read the requirements carefully and discuss any questions with the instructors or TAs.
This example will cover some concepts related to parallel programming. This is meant to be an exploratory project only, so requirements are very loose.
- No style or documentation requirements will be enforced for this example.
ParallelOnefollowing the video to use 4 Threads.
- Run the program a few times and observe a race condition. Take a screenshot of the race condition and store it in a file named
racein the project folder.
ParallelOneto properly use locks to prevent a race condition.
- Run the program a few times and verify that no race condition occurs. Take a screenshot of the program running correctly and store it in a file named
lockin the project folder.
- See Take a Screenshot on Wikihow for details on how to take a screenshot. On Windows, you can use the “Snipping Tool” to grab only a portion of the screen.
- See Uploading Files in the Codio documentation for how to upload a screenshot.
ParallelTwofollowing the video to handle blocking and an arbitrary number of threads.
- Run the program with varying numbers of threads (1 - 10 recommended) and graph the number of threads vs. the time taken.
- Submit your graph as an image file named
graphin the project folder.
- See How to Make a Single Line Graph in Excel for instructions.
- Based on the results of the
ParallelTwoexercise, write a short blurb in a
README.mdfile in the project folder:
- How did the number of threads impact amount of time taken to complete the work?
- What does that result tell us about the hardware available on the Codio system?
See below for some example screenshots and graphs. The sample graph shows results for both Java and Python, but your graph will only include one language.
Completing this project is estimated to require 1 hour.
This assignment will be graded based on the rubric below:
- Updates to
racescreenshot - 10%
lockscreenshot - 10%
- Updates to
graphimage - 20%
README.mdfile - 10%
The following deductions apply:
- Any portion of the project which will not compile (Java), pass a strict type check (Python), or execute properly will be given a grade of 0.
This is not an exhaustive list of possible deductions. The instructors will strive to provide reasonable and fair grading, but we can’t predict all possible defects. It is up to the student to ensure that the project is complete and correct before submission.
Submit this assignment by creating a release on GitHub and uploading the release URL to the assignment on Canvas. You should not submit this Codio project or mark it as complete in Codio, in case you need to come back to it and make changes later.