T.R | Title | User | Personal Name | Date | Lines |
---|
1950.1 | | POLAR::WALSHM | | Wed Mar 08 1995 14:49 | 16 |
| These probably aren't the most efficient algorithms timewise, but you'd
only get a collision if all lines were full.
Algorithm A: x = 1
repeat until connected:
if channel #x if free
then connect to #x
else increment x (if x == n+1 then x = 1)
end repeat.
Algorithm B: x = n
repeat until connected:
if channel #x is free
then connect to #x
else decrement x (if x == 0 then x = n)
end repeat.
|
1950.2 | precisions | ULYSSE::ZITTA | ENOC OPS SUPPORT-VBO ,828-5657 | Thu Mar 09 1995 03:29 | 11 |
|
OK but maybe my question wasn't clear enough. I am looking for the
probabilities of collisions.
The channel selection choice is one of the variables but I think there
are other ones like traffic,number of channels,average calls durations,
etc. Also,I forgot to mention that the switches are part of a private
network (e.g DTN ...) and if all the channels are busy,the traffic will
automatically overflow to the PSTN where we will assume that the
probability of collisions is zero.
Gerard
|
1950.3 | | RTL::GILBERT | | Fri Mar 10 1995 14:12 | 22 |
| .2> OK but maybe my question wasn't clear enough. I am looking for the
.2> probabilities of collisions.
.1> [You] only get a collision if all lines were full.
Actually, as given in .1, the algorithms don't detect when all lines
are full, and the 'collision' occurs when A and simultaneously connect
to the last (only) free channel.
In any case, the approach is optimal. Assuming you want to allow either
A or B to connect to the last free channel(1), then M.Walsh's solution
avoids a collision except when one is unavoidable.
You could estimate the probability of a collision to be half the
probability that exactly n (or perhaps n-1) channels are in use.
This should be directly available from your knowledge of the traffic.
- Gilbert
(1) Alternatively, you could decide that when only one channel is free, only
A may connect to it -- this drops the probability of collision to zero,
but the channels may be underutilized if B needs that last channel.
|
1950.4 | | FORTY2::PALKA | | Mon Mar 13 1995 06:09 | 17 |
| The probability of a collision must depend somehow on how long it takes
to set up a call, and the rate at which calls are coming in.
There are 2 problems with the suggestion in .3 about reserving the last
channel for A.
1) It will only work if A and B only attempt to set up one call at a
time. If they can be attempting more calls then you need to reserve
more channels to system A.
2) Suppose that system B takes the higher numbers, and that channel 12
is the only one free. Now, channel 3 becomes free at system B shortly
before it becomes free at system A. In the mean time both systems
receive a new call. Both systems will feel able to use channel 12, and
a collision results.
Andrew
|
1950.5 | | ULYSSE::ZITTA | ENOC OPS SUPPORT-VBO ,828-5657 | Mon Mar 13 1995 11:25 | 12 |
|
Hmmm ..getting complicated . What about approaching the problem with
only one channel (and then 2 etc.)
n=1
Switch A ----------------------Switch B
Let's assume there are C calls per minute and the call setup time is T
on both switches to start with. Maybe we need other parameters ?
Any idea on how to evaluate the probability with a formula?
Gerard
|
1950.6 | | FORTY2::PALKA | | Tue Mar 14 1995 04:44 | 6 |
| re .5
You also need to know the average call duration. May be the distribution
of call durations would affect things as well.
Andrew
|
1950.7 | let n = 0 | NETCAD::ROLKE | I had THREE teapots! | Tue Mar 14 1995 17:30 | 34 |
| Hi Gerard,
If you have
Ts = call setup time (during which collisions happen)
Rc = number of calls per time interval
then you could get the probability of a collision as:
Ts * Rc
For example, if the call setup time is one second and you make five calls
per minute then you have
(1 sec) * (5 / 60 sec) = 5/60 = 8.3%
Callers from side A, making 5 calls per minute will be vulnerable to
collisions 8.3% of the time. A random caller from side B will collide
with A's call setups at that rate. However, it'll never be this easy.
What if the average call lasts one minute? Now, in the one line case,
you will only have a chance of 1/60 of a collision since you only make one
call per minute. Unfortunately, there will be a good chance that A and B
will both want to make another call immediately after the first call is
over. So you are virtually guaranteed to get a collision.
In short, you need to characterize the behavior of your system in very
fine detail before you can "write a formula" for it.
Good luck,
Chuck
If you let n=0 then all calls would go the the PSDN and your problem is
solved! ;-)
|