Encerrado

Analyze and correct psuedocode solution implementing synchronization with semaphores

Bison World consists of a shopping mall and a buffalo ride that covers the 150 acre habitat. There are m visitors and n single-person vehicles. Visitors stroll around the mall at their leisure, then line up for the buffalo ride. When a buffalo vehicle is available, it allows the single passenger to climb aboard and drives around the habitat for a random amount of time. If the n buffalo vehicles are all taken, then a future rider waits; if a vehicle is available but no one is waiting, then the vehicle waits. The solution to this problem must synchronize visitor tasks and vehicle tasks using semaphores. Below is a potential solution. Assume initialization code exists. Correct any issues with this code, if any exist. Explain your position in detail.

Semaphore vehicleAvailable = 0, vehicleTaken = 0, vehicleFilled = 0,

visitorReleased = 0;

Visitor()

{

[url removed, login to view]();

[url removed, login to view]();

[url removed, login to view]();

[url removed, login to view]();

}

Vehicle()

{

while(True)

{

[url removed, login to view]();

[url removed, login to view]();

[url removed, login to view]();

Drive through habitat for some arbitrary amount of time;

[url removed, login to view]();

}

}

Habilidades: Arquitetura de software

Ver mais: random signal, habitat, buffalo, line mall, visitor vehicle semaphore, semaphores, acre, drive 1000 visitor day, rider, mall architecture, semaphore synchronization, architecture shopping mall, mall solution, solution explain, shopping mall architecture, semaphore, aboard software, future mall, signal line, mall software, code correct, correct problem, design visitor login website, find textbook solution, lip synchronization flash

Acerca do Empregador:
( 1 comentário ) Tampa, United States

ID do Projeto: #5096038

3 freelancers estão ofertando em média $67 para este trabalho

srinichal

I look forward to deliver the project as I am an expert in coding and like to discuss further .

$94 USD in 3 dias
(42 Comentários)
6.5
dobreiiita

Hello, I am programming expert and can surely help you with this project, Please let me know if you are interested. Thank You

$54 USD in 2 dias
(39 Comentários)
5.6
Calleus

Hi, I have strong background in Operating Systems concepts and experience in Algorithms. Let me help you. I am ready to start.

$54 USD in 4 dias
(13 Comentários)
4.5