adaptive partition scheduler

28
Powerpoint Templates Page 1 Powerpoint Templates ADAPTIVE PARTITION SCHEDULER Nisari Balakrishnan S7 CS Roll No. 09412036

Upload: manzeer-fasaludeen

Post on 15-Jul-2015

357 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 1

Powerpoint Templates

ADAPTIVE PARTITION SCHEDULER Nisari Balakrishnan S7 CS Roll No. 09412036

Page 2: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 2

CONTENTSPartitions

Advantages of partition

Why adaptive?

How CPU time divided between partition?

Underload

Free time

Full load

Page 3: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 3

CONTENTSAdvantages of APS

Adaptive partition Vs Static partition

Partition inheritance

Scheduling policies

How these policies are used?Adaptive partition in multiprocessing systemCase of multiprocessing system

Page 4: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 4

What are partitions?

They are virtual wall around a set of applications.

Each partition is given a particular cpu time.50% 20% 30%

Partition 1 Partition 2 Partition 3

Partition scheduler

Page 5: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 5

ADVANTAGES

Memory protectionOverload protection

Page 6: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 6

ADAPTIVE PARTITION SCHEDULER

Optional thread scheduler that guarantee min cpu time to processes.

Introduced by QNX OS.

Page 7: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 7

WHY ADAPTIVE?

We can dynamically launch an application into a partition

Child thread and child process automatically run in same partition as their parent.

Page 8: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 8

Adaptive partition scheduler was designed to solve two problems in embedded system design

i. Proper working in fully loaded condition.

ii.Prevent untrusted application from monopolizing the system.

Page 9: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 9

HOW CPU TIME DIVIDED BETWEEN PARTITIONS

It guarantees minimum amount of cpu time to partitions (overload).

It’s a preemptive priority-based scheduler (underload).

Page 10: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 10

UNDERLOAD

Partition demand less cpu time

Scheduler chooses partition based on priority.

Cpu time Critical time

Partition name

id budget used budget used

system 0 70% 6.23% 200ms 0.00ms

Pa 1 20% 15.56% 0ms 0.00ms

Pb 2 10% 5.23% 0ms 0.00ms

TOTAL 100% 27.02%

Page 11: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 11

Budget available

Blocked Ready

Blocked

Running

(Highest priority

ready thread)

6

6

8

9

6

7

6

10

4

Budget available

Blocked Ready

Blocked

Running

(Highest priority

ready thread)

6

6

8

9

6

7

6

10

4

Page 12: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 12

FREE TIME

Occurs when one partition isn’t running.

Cpu time Critical time

Partition name

id budget used budget used

system 0 70% .11% 200ms 0.00ms

Pa 1 20% 20.02% 0ms 0.00ms

Pb 2 10% 79.83% 0ms 0.00ms

TOTAL 100% 99.95%

Page 13: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 13

FULL LOAD

Occurs when all partitions demands their full budget.

Divides time between them by ratio of their budget

Cpu time Critical time

Partition name

id budget used budget used

system 0 70% 69.80% 200ms 0.00ms

Pa 1 20% 19.99% 0ms 0.00ms

Pb 2 10% 9.81% 0ms 0.00ms

TOTAL 100% 99.61%

Page 14: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 14

6

6

8

9

6

7

6

10

4

Budget availableBudget exhausted

Blocked

Ready

Running (highest priority ready thread)

Blocked

Page 15: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 15

ADVANTAGES OF APSProvide cpu time guarantees when system is

heavily loadedUse realtime,priority-based scheduling when

system is lightly loaded.Make use of free cpu time.

Page 16: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 16

Overlay APS onto existing system without code changes.

Dynamically add and configure partitions at runtime.

Guarantees CPU cycles for recovery operations.

Stop malicious code from stealing all cpu time.

Page 17: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 17

ADAPTIVE PARTITION Vs STATIC PARTITION

Unlike static partition adaptive partition

i. Isn’t locked to a fixed set of code, we can add and configure partition.

ii.Avoid wastage of cpu time.

Page 18: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 18

PARTITION INHERITANCERun server thread in partition of their client

threadADVANTAGES

i. Enhance performance

ii.Avoid redesign of server budget when more clients are added.

Page 19: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 19

6

6

8

9

9

Message

6

6 7

104

Message

10

Page 20: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 20

SCHEDULING POLICIES

FCFSRound-robin

Page 21: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 21

HOW THESE POLICIES ARE USED?Scheduler may: Stop a thread running before the end of its

timeslice (round-robin case)

OR

before thread has run to completion (FIFO case)

Page 22: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 22

ADAPTIVE PARTITION IN MULTIPROCESSING SYSTEM

On an SMP machine , APS considers time to be 100%.

APS first keep every processor busy , only then it apply budget.

Page 23: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 23

EXAMPLE

Thread 1 Thread 2 Thread 3 Thread 4

P.1

70%

P.2

10%

P.3

10% 10%

P.4

P.3 APS run all 4 threads all timeScheduler reports partition’s consumed time as 25%,25%,25%,25%

Page 24: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 24

WHAT’S THE CASE OF MULTITHRAEADED SYSTEM?

Method called runmask select cpu on which thread is allowed to run.

Not enough thread are permitted to run on a processor.

Page 25: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 25

CONCLUSIONAPS can guarantee minimum usage of cpu time

by each process.Increases maximum utilization of cpu time.Increases performance.In embedded systems APS

• ensures proper working in fully loaded condition.

• prevent unimportant application from monopolizing the system.

Page 26: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 26

REFERENCE

Wikipedia www.seminarprojects.com www.qnxsoftwaresystems.com

Page 27: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 27

Page 28: ADAPTIVE PARTITION           SCHEDULER

Powerpoint TemplatesPage 28

THANK YOU