Title: Summary of Lecture 14
1Summary of Lecture 14
- System Analysis
- Response Time
- CPU Utilization
- Bottlenecks and Their Recognition
- Queuing System Theory
- Poisson Distribution and Its Properties
2System to Analyze
Room Available in Main Storage
Q1 Candidate
Time Slice 5 sec
Time Slice 0.4 sec
Task Entered
Dormant
Q2
Q1
End of Task
End of Task
End of Q2 Time-Slice
End of Q1 Time-Slice
Q2 Candidate
Room Available in Main Storage
MPL Q1 Q2
3CPU Utilization
Problem State CPU utilization with n users in the
memory system
u(n)
To avoid degradation of u(n), n can be limited
to some constant called Multi-Programming
Level (MPL)
100
Infinite Storage
80
60
40
Storage for 9 users
Storage for 3 users
20
Storage for 6 users
n
5
10
Saturation Points
4Response Time with Access Control (MPL)
Response time in sec
Processing time, ts3sec, idle time at the
monitor/user tt9sec Total number of users, N,
in the entire system, including outside
memory MPL6, excess ready processes are queued
in eligible queue
n, number of users in the memory system, is
always at most MPL
20
- constant
10
24
N
10
20
30
40
5Response Time vs. Total Number of Users
Storage for 3 users
Storage for 6 users
Storage for 9 users
Infinite Storage
n running processes ( MPL) u(n) utilization,
i.e., effective fraction of CPU time u(n)/n share
of a single process n/u(n) slow down caused by
multiprogramming
6Analysis of Users with Tasks Pending
- MPL 6 n the number of users in the memory
system - ts 3 sec, time required to complete single task
- tt 9 sec, time required to enter the task
- N is the total number of users
- n is the number of users with memory allocated,
the active process above MPL are queued in the
eligible queue outside the memory system - In the example n N/4.
- n lt MPL implies eligible queue is empty.
- n lt 6 implies N lt 24
7Plot of Users with Tasks Pending
Users with tasks pending
15
Size of Eligible Queue
10
MPL 6
n
5
N
24
10
20
30
40
Active Users
In reality, because of random fluctuation of
execution and idle times, the eligible queue will
start being populated before N24.
8CPU Utilization
CPU utilization
processes in memory increases
80
60
40
20
N
Active Users
10
20
30
40
real n lt 6
saturation point MPL (1tt / ts )
9CPU Utilization Over A Day
Utilization
Total CPU
Problem state CPU
N
Active users
Compute-bound small paging small i/o
paging increased by compute-bound i/o increased
by interactive
compute-bound preempted only interactive
10Main Storage
- SATURATION -gt eligible list never empty
- 1. paging moderate, CPU fully utilized
- -gt OK, only more powerful CPU can help
- 2. paging moderate, CPU moderate
- -gt increase MPL
- 3. paging high, CPU low
- -gt decrease MPL, thrashing
- 4. paging high, CPU low, MPL low
- -gt buy more memory
- MEMORY gt SATURATION POINT - keeps in memory pages
of processes outside of the ready queue
11Paging
- Classification of waiting time of CPU
- 1. Idle time - waiting with no paging or i/o,
small number of users close to 0 in saturation. - 2. Page wait - outstanding requests primarily
for paging - 3. I/O wait -otherwise
12Paging Bottleneck
- Waiting in saturation -gt eligible queue not empty
- -gt CPU not a bottleneck possible causes
- insufficient memory or too low MPL, or
- paging bottleneck
- page rate too high (memory allocations to
processes too small), or - page transfer too long (use faster disks or
distributed paging over several disks). - Total CPU utilization approaches 100 but problem
state CPU utilization is low because of paging. - SOLUTIONS
- 1. decrease MPL - it decreases paging rate
- 2. increase memory also decreases paging rate
13I/O Subsystem
- SATURATION -gt eligible queue not empty
- and good MPL and big i/o wait
- Dependent on the nature of a workload, may
indicate too fast CPU. - Remedies more i/o channels or rearrangement of
channels. - With high MPL -gt single disk contention.
14I/O Wait
Percentage of CPU in Wait Time
100
Idle Wait
50
I/O wait
N
Page Wait
10
20
30
40
Active Users
15 Queuing Systems
servers
td
tw
Nw
source of customers
queue
N - total active customers
16Queue Parameters
- N - number of active customers
- Nw - number of customers in the queue
- Ns - number of customers in service
- Ni - number of customers served by the i-th
server
l average arrival rate ta average
inter-arrival time l 1/ta average number of
customers arriving in a time unit tw average
waiting time in the queue
17Queue Parameters, continued
- ts average service time
- td - total time (delay) in the system, td tw
ts - m average service rate, m1/ts,
- u - traffic intensity, u ts/ta lts l/m
-
- r - server utilization
18Littles Result
- In steady state
- One process enters a queue in time.
- A process moves one place up in queue in
19Kendall Notation
- A/B/c/K/m/Z
- A inter-arrival time distribution
- B - service time distribution
- c - number of servers
- K - systems queue capacity
- m - number of customers in the source
- Z - queue organization
20Kendall Notation, continued
- K, m, and Z can be omitted if the queue and
source are infinite and queue is FIFO - M denotes the most often used exponential
distribution, others are - D - discrete
- G - general
- We will consider only M/M/c systems
21Poisson Distribution, Postulates
- POSTULATES
- Prob 1 happening lDt
- Prob gt1 happening o(Dt)
- lim o(Dt)/Dt 0
- Dt -gt0
- DISTRIBUTION
- Pn(t) Prob n happenings
in (0,t)
22Poisson Distribution, Properties
implies
implies
23Poisson Distribution, Formulae
expected inter-arrival time
variance
density function
24Poisson Distribution, Formulae
- Inter-arrival
distribution -
- Density for an
inter-arrival time
Probability of n successes in time t
for small
25Poisson Distribution, cont.
- Mean value of number of successes n
- Variance
- Probability of no arrivals
- Mean inter-arrival time
- Variance of inter-arrival time
26Joining Poisson Flows
Sum of n independent Poisson processes is a
Poisson process
p1
pi
p2
pn
27Splitting Poisson Flows
Decomposition of a Poisson process into n
independent processes is a set of Poisson
processes.
l1lp1
p1
p2
l2lp2
choice
l
pn
lnlpn