Top Banner
Feedback Queueing Models for Time Shared Systems Present By : Ishara Amarasekera Prabath Weerasinghe By Edward G. Coffman and Leonard Kleinrock
30

Feedback Queueing Models for Time Shared Systems

Jun 25, 2015

Download

Documents

This presentation was prepared by Ishara Amarasekera and Prabath Weerasinghe based on the paper, Feedback Queueing Models for Time Shared Systems by Edward G. Coffman and Leonard Kleinrock.

This presentation contains a summary of the content provided in this research paper and was presented as a paper discussion for the course, Advanced Operating Systems.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Feedback Queueing Models for Time Shared Systems

Feedback Queueing Models for Time Shared Systems

Present By : Ishara Amarasekera Prabath Weerasinghe

 

By Edward G. Coffman and Leonard Kleinrock

Page 2: Feedback Queueing Models for Time Shared Systems

Introduction

• Stochastic Process – A process that describes the data of a random process.

• Markov Property - The memory less characteristic of stochastic process.

• Memory less - Future state can be predicted without knowing the previous states

1

Page 3: Feedback Queueing Models for Time Shared Systems

Scheduling

What is Scheduling?

Scheduling is the method by which threads, processes or data flows are given access to system resources.

Why need Scheduling?

To load balance and share system resources effectively or achieve a target quality service.

2

Page 4: Feedback Queueing Models for Time Shared Systems

Round Robin Model

P

QUEUEA(t)

PROCESSOR

B(r)

q

• Units arrive from infinite source

• Units take the end of the queue immediately on their arrival

• Served a fixed amount of service (q) on FCFS basis

• If a unit being served completely within q, it exits the system

• If not, is removed from the processor and put back to the end of the queue

How it works

3

Page 5: Feedback Queueing Models for Time Shared Systems

Round Robin Model

• Once all units ahead are served, the interrupted unit is again served. –Preemptive Resume

• The same will continue for all the units in the queue

How it works

P

QUEUEA(t)

PROCESSOR

B(r)

q

4

Page 6: Feedback Queueing Models for Time Shared Systems

Processor Shared Model

• Average service time B(r) and Average arrival time A(r) is constant

• Q = Total Capacity or No. of instructions can be processed per second

• n= No of units per second

• Therefore, Q/n = Amount of capacity shared among each unit per second..

Consider RR system in which q 0

Q

PROCESSOR

q 0n

5

Page 7: Feedback Queueing Models for Time Shared Systems

Processor Shared Model

• Thus the processor is being shared among all units with Q/n amount.

This leads to a Processor Shared ModelBy making all units in the system receive service concurrently and experience no waiting time in the queue.

Consider RR system in which q 0

Q

PROCESSOR

q 0n

6

Page 8: Feedback Queueing Models for Time Shared Systems

Priority Processor Shared Model

• Input traffic is broken into P separate priority groups.

• Service Time given to a unit with priority p when q = 0 = gpq

• when q = 0 Service Time given to a unit with priority p = gp/ ∑ gini

f1f1

.

.f1f2f2

.

.f2

.

.

fp

fp

.

fp

.

.

ƛp

N1 PRIORITY UNITS

N2 PRIORITY UNITS

NP PRIORITY UNITS

• Unit with priority p might get a service time which is > Q/n due to it’s priority

• A generalization of the processor shared model.

gp = Priority groupni = number of members from the group I present in the system

7

Page 9: Feedback Queueing Models for Time Shared Systems

Multiple Level FB ModelHow it works

PROCESSOR

q

ƛ

N

2

1

::

P

• Unit at the service point at any given queue level will not be serviced unless all tower level queues are empty

•Unit at service is given a quantum (q) of service like in the RR model

•If q is not enough, the unit will be subsequently placed at the end of the next higher level queue 8

Page 10: Feedback Queueing Models for Time Shared Systems

Multiple Level FB Model

When q 0 and N is finite it gives a FCFS Model

When q 0 and N is infinite it gives a RR Model

i + 1

i

:

PROCESSOR

q

ƛ

N

1

P:

9

Page 11: Feedback Queueing Models for Time Shared Systems

Priority Feebback Model

i + 1i

:

PROCESSOR

q

ƛ1

1

P:

ƛ2

ƛp

• Different quantum sizes for different levels and different mean times for different priory-level units are given.

• Units can come from outside.

•Until the Lowest level is the highest priority queue is processed they need to wait.

10

Page 12: Feedback Queueing Models for Time Shared Systems

Assumptions

• For all the models no overhead or swap time is associated with the process of unloading and loading units from the processor .

• Therefore the results may be viewed as upper bound of system performance.

11

Page 13: Feedback Queueing Models for Time Shared Systems

Shortest Job First Model

• Process with smallest time will be processed first

• Waiting time in the queue W(t).

• Non pre emptive, therefore this results slow response time to new jobs.

t - service timeλ - Arrival rateµ - Service rate

12

Page 14: Feedback Queueing Models for Time Shared Systems

RR – Round Robin

Processor-Shared Models(q -> 0)

Priority Processor-Shared Model

Multiple Level FB Model

Priority Based Multiple Level FB Model

Shortest Job First

FCFS

Urhhh… What were those models again ?

When q limits to zero q -> 0

With priorities assigned – gp

With priorities assigned – gp

13

Page 15: Feedback Queueing Models for Time Shared Systems

So what about the performance ?

• Performances differ on each model.• So need to analysis before recommending.• Using Average Waiting Time W(t) is a good choice.

Wait.. define Average Waiting Time.

14

Page 16: Feedback Queueing Models for Time Shared Systems

Average Wait Time…..

“Average wait time for a given model is the sum of the time spent in queues and the service.”

15

Page 17: Feedback Queueing Models for Time Shared Systems

Okay.. Let's Start With Round Robin & FBN Models

• Considering q ≠ 0 and time in service as negligible, only the time in queue is taken to calculate the average wait time.

• In FBN N -> α

• Wk = W(t) – t

• A graph is drawn with the average waiting time Wk against the load ƿ.

• Load ƿ can be considered as the number if arrivals per service.

ƿ = λ/μ 16

Page 18: Feedback Queueing Models for Time Shared Systems

Graph for RR and FBN

17

Page 19: Feedback Queueing Models for Time Shared Systems

Anything Interesting ?

•FCFS is used as a reference.

•With respect to that;

o The average waiting time behavior of FN and RR models at low load values.

o Which one is better for short service time units ?

o Which one is better for longer service time units ?

18

Page 20: Feedback Queueing Models for Time Shared Systems

RR & FBN Models – Average Time Vs. Quantum Size

• When q ≠ 0, N -> α, λ = 0.5 sec, μ = 1.0 sec

• Two separate graphs for both RR and FBα with two events.

• 2 seconds service time event and 0.5 sec service time event.

19

Page 21: Feedback Queueing Models for Time Shared Systems

RR Model Graph s

What is this ?

Why is this saw tooth shape ?

What explains the upper envelope slope…..

20

Page 22: Feedback Queueing Models for Time Shared Systems

FBα Model GraphSame questions can be asked as of the RR model

21

Page 23: Feedback Queueing Models for Time Shared Systems

Any Interesting observations ?

• Why those serrations ?

• What makes the increasing slopes ?

• What makes the decreasing slopes ?

• Reasoning the behavior between two discontinuities ?

22

Page 24: Feedback Queueing Models for Time Shared Systems

Explain With An Example

Unit with 2 sec service time. System with 1 sec average service time.

Model A : q = 2.0 – ε Model B : q = 1.0 – ε

What would contribute to the wait time the most ?

23

Page 25: Feedback Queueing Models for Time Shared Systems

Similar Analysis with FB4 Model•Number of levels = 4 •Below 2/3 sec quantum size -> Sends the unit to level 4

24

Page 26: Feedback Queueing Models for Time Shared Systems

Analysis of Other Models

•Processor-Shared Model

•Preemptive Processor-Shared Model

•Shortest Job First

All the above get analyzed in two graphs.

25

Page 27: Feedback Queueing Models for Time Shared Systems

Load Vs. Average Wait Time

26

Page 28: Feedback Queueing Models for Time Shared Systems

Service Time Vs. Average Wait Time

27

Page 29: Feedback Queueing Models for Time Shared Systems

Some of the Important Average Wait Times

• Round Robin Model : Late – Arrival Systems Average Wait Time

28

Page 30: Feedback Queueing Models for Time Shared Systems

Conclusion

• There’s one in all kind of scheduling model.

• All are different in their own ways and usage differs with the applications

• According to the Conservation Law : - Any favors to some units would result in a

discrimination of some others.

• This is because of having a constant CPU capability.

29Images and the other resources used in this presentation were taken from the research paper and the Internet.