+1-415-670-9189
info@expertsmind.com
For the fifa world cup 2006
Course:- Business Management
Reference No.:- EM13167046




Assignment Help
Expertsmind Rated 4.9 / 5 based on 47215 reviews.
Review Site
Assignment Help >> Business Management

For the FIFA World Cup 2006, a fly-over has been constructed between the hotel where the teams are staying and the stadium. This fly-over will be used by the German team and the Italian team in their upcoming exhibition match. A tram car is used to cross this

fly-over, but it seats only four people, and must always carry a full load.

We cannot put three Italians and one German in the same tram-car, because the Italians

would be in majority and might try to intimidate the German. Similarly, we cannot put

three Germans in the same tram-car with one Italian. All other combinations are safe.

You are required to code two processes; the first shall simulate the arrival of German

players and the other the arrival of Italian players. These players can come at any time, in any

order to cross the fly over. The first process shall call a procedure called GermanHere

on the arrival of a German player. Similarly, the second process shall call a procedure

called ItalianHere on the arrival of an Italian athlete. As soon as a safe combination

is reached, the tram starts and crosses to other side. Assume that a tram is always

available when required.

Use semaphores to implement the solution. The Germans and Italians should not wait if

there are enough of them for a safe tram-car load. The two processes will simulate the

arrival of players at random intervals and should run for a while to show around 10 trams

leaving with different safe combinations. Before terminating you must clean up the

semaphores and shared memory segments from the system.

You must output the progress of the processes. E.g. when a player arrives you should

output who arrived and also print the total number of Germans and Italians waiting to

board the tram. When a tram leaves you should output that as well.

Your code should include well written comments and at the beginning, you should

explain your strategy for solving the problem.




Put your comment
 
Minimize


Ask Question & Get Answers from Experts
Browse some more (Business Management) Materials
Utilizing one of your business news subscription services, locate a current article: influence, power, leadership- post a brief but detailed review of the article and how the
Holt-Winter's double exponential smoothing would be an appropriate method to use to forecast a time series that exhibits a linear trend with no seasonal or cyclical patterns
Your ethics program should be "values-based", as described on page 241 of your textbook. Make sure to include a company code/business conduct statement. This code should be,
Describe total cost of ownership and include descriptions of implementation project and ongoing maintenance costs. Explain the benefits of the project, which include tangible
For the Rand study (summarized in the article by Manning et al.). (i) How did the study ensure that sicker people were not concentrated in the most generous health insurance p
Select an organization among the places of employment of the team members. Select a global market into which the company might expand. This should be a market with different c
If communication competence is the key to organizational excellence, how would you encourage the members of an organization to become competent communicators to enhance the
University of Phoenix Material          New Hire Communication Worksheet Select a company you are familiar with. Imagine that you work for the HR department of the company.