Intoduction:
What GetPrinter() has to do:The overall goal, or "point" for this assignment is to come to some understanding about RPC. To that end, Tekin wants the program itself to be simple. The hard part of this assignment should be getting all of the RPC mumbo-jumbo to work out.
How to test your program:According to Tekin, GetPrinter() doesn't have to be very complex. Basically, it needs only to return success or failure. If a client receives success, it should sleep() and then call ReleasePrinter(). If it recevies failure, it should sleep(), and then call GetPrinter() again. Internally, you can make GetPrinter() as simple or as complex as you wish.
What output to include:As it states in the assignment, you should attempt to create a situation whereby multiple clients attempt to request a printer at the same time. You should code your client such that it produces explicit output about what it is attempting. This will be the only way that you can verify its correctness. In general, you should show how a client is successful at getting a printer when one is available, and that it is denied when a printer isn't available. There shouldn't be a situation where two clients get one printer, etc.
As mentioned above, your client should print out detailed and verbose output. So should your server. That will help validate the "correctness" of the client's behavior. Because the server runs as a daemon, a traditional "printf()/script" combination will be ineffective. It's recommended that your server opens up a log file, and sends it's output there. It's also recommended that you use timestamps. Unfortunately, since time can vary wildly from machine to machine (esp. in the Jennings lab), I suggest that you run the server and all client processes on the same machine -- in that way, you can be sure that the times will correlate.