COSC 4330--Operating Systems
Programming Assignment No. 3: Ticket
Reservations Revisited
Due Date:
For this assignment, you
will do a more realistic simulation of the ticket reservation system
"Fall-OS" that you already simulated for the second assignment.
We will still represent
each agent by a separate process whose body will consist of all the ticketing
made by that agent. These agent
processes will still execute in parallel.
The main difference with the second assignment will be the way the
agents will access the shared data.
Rather than directly accessing the shared data, agents will communicate
with a single-threaded server that will actually perform the requests.
You will have to submit
two programs
1.
A
client program that will fork one
process per agent. These agent
processes will send to the server process one request for each transaction
described in their input data, wait for the reply from the server and print out
the outcome of that transaction.
2.
A
single-threaded server program that
will wait for requests from agent processes and implement them.
All inputs will have exactly the same formats as
in the previous assignments. The time
delays will probably be shorter and will represent sleep times to be added to
the processing of each transaction.
As before, agents don't need to reserve seats
before ticketing them. They can only
cancel seats for the customer who has reserved them but only until he or she
has not purchased them.
Your program should print out
1. A summary of each
transaction immediately after that transaction is processed.
2. A report showing the final seat assignments
with customer names when the program terminates.
HINTS
1. Having a single threaded
server should greatly simplify its design.
It contains
a quick and dirty introduction to sockets.
You can include any code from that document in your assignment.
These
specifications were modified last on