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.
We have two functions in this algo. First one is for Dwarves and second one is for elves. When any Dwarve execute it goes to its function increment number of dwarves and wait in a loop created by while loop untill number of dwarves become equal to 5 . If number of dwarf become equal to 5 it tries to enter into critical section of code . P(ground) means obtainig lock on ground . and V(Ground) means releasing that lock. If dwarves are using the grond means they are executing the critical section then untill they execute the critical section no Elves should execute critical section. For that binary semaphores or mutexes has been used . Similarly function Elves is implemented
ii) This algorithm should work fine. But If we get a situation like when dwarves are executing the critical section and got preempted before releasing the locks then there may arise a condition of starvation for Elves . Starvation is a case of longer waiting deadlock is a case of infinite waiting.
iii) So to improve our code we can add some timer so that after that each of dwarves or Elves should release the ground .
We can get stress injuries in the workplace, and the study of the stress injuries at workplaces is a very important branch of scientific study currently, and all companies from all the fields are working on it, and so are the academic and research institutions. And this branch has gained heights in the past 10 years as companies want to increase worker productivity as well as bring down the downtime as well as various injury claims related to the job. And we know this branch as "ergonomics".
Router. A router is a networking device typically used to interconnect LANs to form a wide area network (WAN) and as such is referred to as a WAN device. IP routers use IP addresses to determine where to forward packets. An IP address is a numeric label assigned to each connected network device.
Virtual Assistants can be useful. Blind people can use them to be informed, browse the web, and learn new facts. They can make tasks quicker too. They can control things like your heater or air conditioner. But if one were to malfunction, it could take lives.
The answer is False. <span>To keep your audience interested in your speech, you should do the ff techniques : </span><span>1. Talk about something your audience is interested in </span><span>2. Tell them why they should listen </span><span>3. Don’t make it too easy or too hard </span><span>4. “Change grabs attention” </span><span>5. Tell stories </span><span>6. Have frequent breaks </span><span>7. Make it short</span>