Login
|
Create Account
+1-415-670-9189
info@expertsmind.com
Submit Homework/Assignment
Get quote & make Payment
Get Solution
Semaphore examples, Operating System
Ok so i think i got this right by not 100% on this. what I want to figure out is if there are x visitors that can line up for a ride but only 1 passenger can get on the ride at a time when the ride is available. If y number of rides are taken, the visitors have to wait for a ride to become available. If the ride is available but no visitor is then the ride waits.
So this is what i got so far this is all just psudo code I dont really need this to work I just need to wrap my head around the semaphore thing
Semaphore rideAvaliable = 0. rideTaken = 0, rideFilled = 0, visitorReleased = 0;
Visitor()
{
rideAvaliable.wait();
rideTaken.signal();
rideFilled.wait();
visitorReleased.wait();
}
Vehicle()
{
while(TRUE)
{
rideAvaliable.signal();
rideTaken.wait();
ride.Filled.signal();
Drive around for a bit
visitorReleased.signal();
}
}
Posted Date: 11/1/2012 9:12:47 AM | Location : United States
Ask an Expert
Related Discussions:-
Semaphore examples, Assignment Help, Ask Question on Semaphore examples, Get Answer, Expert's Help, Semaphore examples Discussions
Write discussion on Semaphore examples
Your posts are moderated
Write your message here..
Related Questions
Batch job issues halt instruction, what is the meaning
what is the meaning
How to solve problems, Ask question #Minimum
Ask question #Minimum
Ipc, explain in detail about ipc in linux
explain in detail about ipc in linux
Explain what is file structure, Problem 1. List out the conditions that...
Problem 1. List out the conditions that result in Deadlock situations. Illustrate deadlock situation with a simple graphical notation Listing conditions for deadlock occu
Binary and data representation, Computing uses three number bases:- Binary ...
Computing uses three number bases:- Binary (base 2), Octal (base 8) and Hexadecimal (base 16). Binary has been described before, although various catchphrases are used to describe
Assembly, Write a program that will input two numbers from the keyboard and...
Write a program that will input two numbers from the keyboard and execute each of the signed and unsigned multiply and divide instructions. For each instruction, the program shoul
Operating system components, Question 1 Discuss the following with respect ...
Question 1 Discuss the following with respect to Operating Systems: Operating System Components Operating System Services Question 2 Describe the theory behind Pagin
Digital circuits and design , 1. Draw a schematic diagram of a CMOS inverte...
1. Draw a schematic diagram of a CMOS inverter and explain its operation. 2. Draw schematic diagrams of CMOS NAND and NOR gates, and explain their operation. 3. Explain what
Multiprogramming, how response times are reduced by allowing time sharing o...
how response times are reduced by allowing time sharing on top of multiprogramming
How does ntfs handle data structures, Q. How does NTFS handle data structur...
Q. How does NTFS handle data structures? How does NTFS recover from a system crash? What is guaranteed after a recovery takes place? Answer: In NTFS all file-system data stru
Assignment Help
Accounting Assignment Help
Economics Assignment Help
Finance Assignment Help
Statistics Assignment Help
Physics Assignment Help
Chemistry Assignment Help
Math Assignment Help
Biology Assignment Help
English Assignment Help
Management Assignment Help
Engineering Assignment Help
Programming Assignment Help
Computer Science Assignment Help
IT Courses and Help
ExpertsMind Services
Online Tutoring
Projects Assistance
Exam Preparation
Coursework Help
Programming Courses
Engineering Courses
Why Us ?
~Experienced Tutors
~24x7 hrs Support
~Plagiarism Free
~Quality of Work
~Time on Delivery
~Privacy of Work