Professional Documents
Culture Documents
Queue Server
I/O Controller
Arrivals And
device
1
• Timesys = Timeq + Times
2
• Times = Average time to server
task
3
• Server Utilization
4
Example#1
• Problem Statement
Suppose an I/O system with a single
disk gets on average 100 I/O
requests/second. Assume that
average time for a disk to service an
I/O request is 5ms. What is the
utilization of the I/O system?
5
Solution
6
Poisson Distribution
7
Variance
C2 =
(Arithmetic mean time)2
8
Average Residual Service Time
9
• All the tasks in the queue ahead of
the new task must be completed.
Server utilization = β
Average residual = λ
service time
11
• Timeq = server utilization x times
+ (Arrival time x Time q) x Times
• Timeq = β x Times
+ (Arrival time x Timeq) x Times
• Timeq = (Times x β ) / (1 – β)
12
Example#2
13
Solution
(Server utilization )2
Lengthq =
(1- Server utilization )
16
M/M/m Model of Queuing
Theory
Arrival Rate x Time
Utilization =
Nserver
17
M/M/m Model of Queuing
Theory
• Lengthq = Arrival Rate x Timeq
18
M/M/m Model of Queuing
Theory
Ns x utilization
Probtasks>= Ns = x Prob 0task
Ns! x (1-utilization)
19
Example#4
• Suppose instead of a new, faster disk,
we add a second slow disk, and
duplicate the data so that read can be
serviced by either disk. Let’s assume
that the requests are all reads.
Recalculate the answers to the earlier
questions, this time using an M/M/m
queue.
20
Solution
= (1 + 0.533 + 0.800 ) -1
= 2.333-1
23
(2 x utilization)2
Prob tasks >=Ns = ------------------------- x Prob0tasks
2! x (1- utilization)
(2x 0.4) 2
= ---------------- x 2.333-1
2! x (1- 0.4)
= 0.229
24
Time waiting in the queue:
25
Bench Mark=C: Complex query OLTP
26
TPC-C
TPC-C is measured
29