Practicum in Trading Systems Development: Lab 5
Due:
Thursday, July 26, 2012,
by
5:00 PM
PURPOSE AND RATIONALE
The function of this lab is to let students gain specific experience
with advanced thread programming in C++ using a C++11 compiler. The
goal of this lab is to provide students with the
foundations necessary to understand issues in concurrency in multithreading that
will be fundamental in many of the components in the
UCEE
architecture.
NB: If you are not a CSPP
student and are in need of a CS Cluster login ID (if you don't know
what this is you are in need of one), contact the TAs immediately so
you can get set up with a cluster login ID for the labs. This
course cannot be conducted without a CS Cluster login ID. If you
already have a UofC CNET ID, you can (and should) manually apply for a
CS cluster ID here.
PRIMARY RESOURCES:
You should refer to relevant sections of the man pages for assistance
for
this lab, in addition to materials in the assigned chapters from the
primary texts for
this
week (per the syllabus).
You should ssh into the cluster to perform all lab
activities.
Make sure you have read this week's assigned reading.
README
- If you are not in our course email list, please subscribe to the
cspp51025 email list here: http://mailman.cs.uchicago.edu/mailman/listinfo/cspp51025
- Turn the lab assignment as a tarball in by email to the TA
(cc'ing the instructor) by the due date
above.
- For printing out your documents, you might find the following
commands useful during your year(s) in this department:
- lpr - off line print. Note that this command is
called when you print from acroread (for .pdf files) or
gv (for .ps files)
- lpq - shows the printer queue
- lprm - removes jobs from the printer queue
- enscript - converts text files to PostScript (useful
when you want to print out text files)
- Make sure you have read the Submission Guidelines for
submission.
LAB 5
You are to write a multithreaded solution to the famous Dining
Philosopher's problem originally formulated in 1965 by Edsger
Dijkstra. You can read an excellent description of the overall
problem here. You can also do a google search that will yield copious background information.
Your assignment is to implement a solution to the dining philosopher's
problem using threads in C++. You may use BOOST threads if you
wish, although this is not required. Five
threads/participants/philosophers are to be at the table, and each
state (waiting for left fork/eating) is to be printed out along with an
identification of the philosopher who took the action.
Turn in the source code, associated makefile, and…
More information:
C++ Concurrency In Action
Website
BOOST
Threads
Threads on
cppreference.com
Mark
Shacklette