cinema

終了済み 投稿 Nov 19, 2004 着払い
終了済み 着払い

In this assignment, you will implement a program with Unix semaphores to handle ticket reservations taken by different ticket-selling agents connected to the "Fall-OS" ticketmaster's central computer.

We will present each agent by a separate process whose body will consist of all the ticketing made by that agent. These agent processes will execute in parallel. Two or more agents may be doing the same transactions at around the same time. Obviously, reservations/ticketing to the same seats must be performed in mutual exclusion. If an agent tries to reserve/ticket a seat that has already been taken, then disallow this action and print a "seat taken" message. If a transaction tries to operate on a non-existent seat, print an error message.

To ensure these concurrent operations yield correct results, you are to use Unix semaphores to control access to seats, which are stored in shared variables. The concert hall will have *n* rows labeled A, B, C, … .and each row will have *m* seats numbered 1 to *m*.

To simulate (1) the transmission delay between the ticketmaster's central computer and an agent's computer terminal and (2) the processing of each transaction, the first four lines in the body of each agent will specify the required total execution time (in seconds) for each of the four operations performed at that agent. In your implementation, each specified time is the length of the critical section for the corresponding transaction. You should simulate them through system calls to **sleep(****)**.

The input will be as follows:

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):

a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.

b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.

3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).

## Platform

C/C++ in Unix

C プログラミング エンジニアリング Linux MySQL PHP ソフトウェアアーキテクチャ ソフトウェアテスト UNIX

プロジェクトID: #3442456

プロジェクトについて

2個の提案 リモートプロジェクト アクティブ Nov 22, 2004

2人のフリーランサーが、平均$17 で、この仕事に入札しています。

fastmindvw

See private message.

$17 USD 2日以内
(14件のレビュー)
4.7
codingbits

See private message.

$17 USD 2日以内
(0件のレビュー)
0.0