Omnimaga
General Discussion => Technology and Development => Computer Programming => Topic started by: Happybobjr on January 26, 2015, 03:27:31 am
-
I don't really understand these, nor how to utilize google for help so if any of you have an idea where to start, I would appreciate it :)
Q1. If an array holding a queue is not considered circular, then each remove operation must shift down every remaining element of a queue. An alternative method is to postpone shifting until rear equals the last index of the array. When that situation occurs and an attempt is made to insert an element into the queue, the entire queue is shifted down, so that the first element of the queue is in position 0 of the array. What are the advantages of this method over performing a shift at each remove operation? What are the disadvantages?
Q2. Given that jobs are serviced at a rate of 30 jobs per hour, determine the arrival rate in jobs per hour which will achieve the expected queue length to be 9.
Q3. Jobs arrive at the rate of 20 jobs per minute, and each job requires 2 seconds of service time, on the average. Determine the average waiting time in the queue. What is the probability that at a given time the system is not empty?
Q 4. Given that on the average 2 customers can be serviced per minute, determine the average arrival rate of the customers that achieves the average waiting time in the system (including the service time) to be 5 minutes per customer.
-
It depends on whether the service rate is deterministic or also random, and that's not clear in Q2
-
Could you tell me how to do it both ways then?
thank you, and sorry for the trouble.
-
Actually on second thought I think they're all supposed to be M/M/1, so the formulas are:
Waiting time = arrival_rate / (service_rate * (service_rate - arrival_rate))
Expected queue length = arrival_rate * waiting time
Those questions are then just applying those or solving for some parameter.
-
Thank you. I think I slightly understand. Shouldn't there be factorial in there?
So I need to use a PDF function?
What does M stand for? Exponential?
-
The first M means the arrivals are determined by a Poisson process, the second M means the service times have an exponential distribution. The 1 means there is 1 server. There are no PDFs or factorials involved under these circumstances, though in general there may be (for example for more than one server, the factorial of the number of servers shows up all over the place - of course in this special case that's just 1).
-
Thank you very much
-
How did you derive those formulas?
-
I just looked them up, they were probably derived by someone much smarter than me (but I don't know who)