| Points Recieved |
Points Possible |
Description |
| 10 |
Telnet
Clients can connect to the server application. Writing your own
client is something extra you can do if you want but your application
should work with at least one version of telnet (PuTTY, Telnet on
Windows or Unix, etc.) |
|
| 10 |
Telnet Clients can issue
commands to the server that the server recieves and client input/output displays properly. |
|
| 10 |
Server can put print jobs from
client into queue. |
|
| 5 |
Server creates a new thread to
handle each client. (Does not do a fork() for each client). |
|
| 10 |
Written so that 0 to N clients can connect simultaneously and 1 to M printers can be specified at runtime (instead of a fixed number). The program takes one command line arguments, the number of consumer threads to be created. Not required for this project but optional is to also be able to specify a DEBUG LEVEL on the command line. | |
| 5 |
Each
producer should have a unique ID so that the server can send output to
the terminal like "Printer 5 printing Job 12 page 1 of 3 from Client 4". |
|
| 5 |
Uses only one function per
thread type (There should be one function for consumers and another
function for producers but not a function for each consumer and one for
each producer). This program should have a main() and around 4
to 8 functions. If you have more or less than this you are
probably doing something wrong. |
|
| 5 |
Uses Posix Threads
Appropriately. |
|
| 10 |
Uses Semaphores Appropriately. Consumers wait() on a semaphore for things to be in the queue. Producers wait() on a semaphore to make sure there is room in the queue. Producers also have to post() to the consumers semaphore so that consumers find out when something has been added. | |
| 5 |
Uses Mutex Appropriately.
Queue is protected by a mutex. Queue is protected whenever
something is added or removed. |
|
| 5 |
Uses sleep appropriately.
Approximately 1 second elapses between printing each page on a
given printer. |
|
| 5 |
Includes Documentation as
Required (especially header at the top of every file and a function
header before every function). |
|
| 5 |
Uses debug level to turn the use
of sleep() on and off. |
|
| 5 |
Program generates nice readable output as described in the lab 2 and 3 specification. It is okay if it gets jumbled up some from multiple threads doing things at the same time but the output needs to explain what is going on, for example, "printer 2 printing document 3 page 1 of 2 from client 4". | |
| 5 |
Wrote
your own queue. Also, queue has a small maximum size (3-5) so
that we can see it fill up completely so that producers have to wait
for there to be more room to put print jobs in it. [For our
purposes, a queue is an array and two functions, addItem() and
removeItem() or something like this]. |
|
| -- |
POINTS REMOVED FOR MISC: |
|
| -- |
POINTS ADDED FOR MISC: |
|
100 |
TOTAL POINTS |