Homework 3b

From 118wiki

Jump to: navigation, search

Homework 3b

Homework 3b is the second part of Homework 3. It is the same as Homework 3, except that your solution will serve multiple Nim clients concurrently without using threads.


This homework is due by Midnight (11:59pm) on Monday October 16, 2006.

Submit your solution using the submit command on one of the department's Linux machines to the course directory. (Note: if you don't already have an account on the departmental machines, I'll grant you an account for this course; please contact me to get your account.) Here are instructions on how to submit:

  1. In the same directory where you prepared Homework 3 you can also prepare this homework (probably you should give it a different name than your threaded server, for example, use nimSelect.py for your solution).
  2. When your work is ready, run the submit script from your home directory by typing submit at the command prompt and hitting return/enter.
  3. When prompted for the File/directory name, enter homework3b or whatever you have prepared for your solution.
  4. When prompted for the course put c118
  5. Next you will see a list of possible submission directories. For this assignment, reply homework3b
  6. Done! For further help, please review the submit proceedure provided by CSG: submit.html
  7. Note: case does matter.
  8. Note: submitting the same homework assignment multiple times will overwrite the previously submitted homework with the same name and submit location.

Nim Game without Threads

Use the "select" method of concurrency for handling clients. Using select (study the example media:TCPSelectServer.txt) so that multiple clients can use the server concurrently. The same test for Homework 3 should also test your solution here: nimTest.py. I will take time to describe "select" in class on the 10th of October and also answer questions on the 12th, including some hints on how to keep track of multiple clients.

Personal tools