subject

Playville is a tiny town in fictional middle earth, which is inhabited by dwarves and elves. Playville has a playground to which dwarves and elves go if they wish to play. The sporting rules of Playville state that a play can take place only if either there are 5 dwarves or 3 elves present to play. If the playing condition is not met (i. e., 5 dwarves or 3 elves are not present at the playground), an arriving person (dwarf or elf) has to wait in their respective waiting area near the playground. When either the dwarves or the elves have their quorum, they move on to the playground to play, if the playground is already not in use. The playground, at any time, is either empty or it is occupied by playing dwarves or it is occupied by playing elves.

After a dwarf or elf team has played to its satisfaction, it leaves the ground. Assume all dwarves are identical to each other, and all elves are identical to each other too.

a. Assuming dwarves and elves to be concurrent processes, and using P and V operations, devise an algorithm for each type of process.
b. Is your solution correct?
c. Discuss possibly what you could do to improve your solution.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:50
17. implement the jvm dload instruction for the mic-2. it has a 1-byte index and pushes the local variable at this position onto the stack. then it pushes the next higher word onto the stack as well
Answers: 2
question
Computers and Technology, 23.06.2019 22:30
You draw two cards from a standard deck of 52 cards, but before you draw the second card, you put the first one back and reshuffle the deck. (a) are the outcomes on the two cards independent? why?
Answers: 3
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of β€œtag” to remember the meaning of contagious
Answers: 3
question
Computers and Technology, 24.06.2019 16:00
This isn't about school but every time it tells me to watch an ad to unlock the answer to a question it prompts a survey and it just keeps loading. so i haven't been able to get answers for my tests in like a week.
Answers: 2
You know the right answer?
Playville is a tiny town in fictional middle earth, which is inhabited by dwarves and elves. Playvil...
Questions
question
Mathematics, 16.09.2019 17:30
Questions on the website: 13722363