adaptive partition scheduler
TRANSCRIPT
Powerpoint TemplatesPage 1
Powerpoint Templates
ADAPTIVE PARTITION SCHEDULER Nisari Balakrishnan S7 CS Roll No. 09412036
Powerpoint TemplatesPage 2
CONTENTSPartitions
Advantages of partition
Why adaptive?
How CPU time divided between partition?
Underload
Free time
Full load
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
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
Powerpoint TemplatesPage 5
ADVANTAGES
Memory protectionOverload protection
Powerpoint TemplatesPage 6
ADAPTIVE PARTITION SCHEDULER
Optional thread scheduler that guarantee min cpu time to processes.
Introduced by QNX OS.
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.
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.
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).
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%
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
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%
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%
Powerpoint TemplatesPage 14
6
6
8
9
6
7
6
10
4
Budget availableBudget exhausted
Blocked
Ready
Running (highest priority ready thread)
Blocked
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.
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.
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.
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.
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)
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.
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%
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.
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.
Powerpoint TemplatesPage 26
REFERENCE
Wikipedia www.seminarprojects.com www.qnxsoftwaresystems.com
Powerpoint TemplatesPage 27