1 auctions are an example where processes or threads must actively co operate and no 5346391

1. Auctions are an example where processes (or threads) must actively co-operate, and not just avoid interference. Each process (or thread) represents a different bidder. Bids must be placed in cognizance of other bidders' offers, and of their track record of previous bids and timing. Bids must also, of course, take into account the bidder's budget. Bidders are not polled in sequence, but can attempt to make a bid at any time: timing is part of the strategy (bidding closes a fixed delay after the last bid was placed). Write a multi-process (or multi-thread) program to buy items at a conventional auction.

3.

To facilitate monitoring performance of a production program, the main process often writes log records to a circular buffer. The concurrent monitoring process reads these log records in reverse order, that is, it has one method that reads the currently most recently written log record, and another method that reads the log record preceding the most recently read log record, if that record actually has been written and has not yet been overwritten. If the requested record is not available, the second method returns failure. Write code for the logging method of the main process and for the two reading methods of the monitoring process.

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now