28
SParK: An Integrated SParK: An Integrated Real-Time System Real-Time System Vibhooti Verma Vibhooti Verma 05305016 05305016

SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Embed Size (px)

Citation preview

Page 1: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

SParK: An Integrated SParK: An Integrated Real-Time SystemReal-Time System

Vibhooti VermaVibhooti Verma

0530501605305016

Page 2: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

OutlineOutline

• Introduction• SParK: System Requirements• SParK: Design Issues• Related Work on Scheduling• Our Proposed Modifications to Static &

Dynamic Scheduling to consider:– Blocking factor– Aperiodic tasks

• Conclusions and Further Work

Page 3: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Introduction to Integrated Introduction to Integrated Real-Time Systems (IRTS)Real-Time Systems (IRTS)

• Applications with different levels of criticality– Hard real-time– Soft real-time – Non real-time

• Tasks with different arrival patterns– Aperiodic – Periodic

• Spatial and Temporal partitioning

Page 4: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

MotivationMotivation

• Fault Containment• Easy Verification and Validation• Application Specific Operating System• Local Schedulability Analysis• Efficient Utilization of Resources

Page 5: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Basic TermsBasic Terms

• Virtual slow processor• Constant Bandwidth Server (CBS)• Total Bandwidth Server (TBS)• Partition• Hierarchical Scheduling

Page 6: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

SParK: System RequirementsSParK: System Requirements

• Strongly partitioned architecture– Temporal and Spatial partitioning

• Multiplex system resources among different partitions

• Support partitions with different RTOS• Inter-Partition Communication• Simple design• Diskless system

Page 7: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

SParK: Design IssuesSParK: Design Issues

• Virtualization– Interrupts– I/O Devices– Processor– Memory– Timer

• Partition Scheduling• Inter Partition Communication

Page 8: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

SParK: System ArchitectureSParK: System Architecture

Page 9: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

SParK: Design IssuesSParK: Design Issues

• Interrupt Handling– Requirement: To guarantee min. ‘n’ number of

interrupts, if not all, in a particular partition will be served with bounded delay at any given point of time

– Proposed Approach: Interrupt Bandwidth Server

Allocation Scheme Global Local Hybrid

Budget allocatedCommon to all partitions

Separate for each partition

Separate for critical partition and common for others

Bandwidth required to ensureISR latency of an interrupt

Large Small Medium

Decrease in schedulability Small Large Medium

Responsiveness to burstyinterrupts for a partition

Good Bad Medium

Page 10: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

SParK: Design IssuesSParK: Design Issues• I/O Virtualization

GuestOS VMM Hosted I/O Bypass IDD

DD Location GuestOS VMM HostOSGuestOS and VMM

Dedicate partition

Isolation Guarantee

No Yes Yes Yes Yes

Fault Containment Guarantee

Yes No No Yes Yes

VMM Role No Large ModerateOnce for setup

Only for registration

Real-Time response

Fast Slow Medium Fast Medium

DD reuse Yes No Yes No Yes

Special driverNo No No Yes (small) Yes

Device intelligence

No No No Yes No

Design simplicity

Simple Complex Simple Moderate Simple

Ease of impl Easy Moderate Easy Difficult Difficult

Page 11: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Existing work in IRTS Existing work in IRTS SchedulingScheduling

• Open Environment ‘s Dynamic-Priority-Driven (EDF) SchedulingCBS & TBS for scheduling partitions– Handling Aperiodic tasks not clear– Handling Blocking factor with TBS only

• SPIRIT’s Cyclic Scheduling– Non-preemptable sections not handled

Page 12: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Our Scheduling StrategiesOur Scheduling Strategies

• CBS: Failure to Handle Non-preemptable(NP) Sections

Partition Task (WCET, P) UtilizationLength of NP section

Relative start of NP section

P1T1 (8, 80)T2 (8, 80)

0.220

00

P2 T1 (80, 800) 0.1 48 30

Page 13: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Our Scheduling StrategiesOur Scheduling Strategies

• Handling NP Sections: CBS with Budget Lending

– Modified schedulability bound:

– Modified server size:

111

N

i i

iN

ii

BU

ij

ji LB

ii BU

where is the maximum blocking duration

N - total number of applications in the systemLj - is longest critical section in Pj

- relative shortest deadline in partition Pji

Page 14: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Our Scheduling StrategiesOur Scheduling Strategies

• CBS with Budget Lending: Example

Page 15: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Our Scheduling StrategiesOur Scheduling Strategies

• Handling Hard Aperiodic Tasks in TBS provides no guarantee

• Handling Hard Aperiodic Tasks in CBS

– Dedicated Aperiodic Server – Online Acceptance Test

• Algorithm-1: Schedules them as early as possible− Poor responsiveness to soft aperiodic tasks+ High acceptance ratio for hard aperiodic tasks

• Algorithm-2: Schedules them as late as possible+ Better responsiveness to soft aperiodic tasks– Low acceptance ratio for hard aperiodic tasks

Page 16: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Comparisons of AlgorithmsComparisons of Algorithms

• Algorithm 2 gives better responsiveness to Soft Aperiodic Tasks

Task Type Task set Server Type Server Budget

Periodic (2,4) Periodic 0.5

Hard Aperiodic (2,2,10) Aperiodic 0.5

Soft Aperiodic (2,2,6)Idle time of Both

0

Page 17: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Our Scheduling StrategiesOur Scheduling Strategies• Comparison of Algorithm1 and Algorithm2: Algorithm 2 gives better responsiveness to Soft Aperiodic Tasks

Algorithm-1

Algorithm-2

Page 18: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Comparisons of AlgorithmsComparisons of Algorithms

• Algorithm 1 gives higher acceptance ratio for hard aperiodic tasks

Task Type Task set Server Type Server Budget

Periodic (2,4) Periodic 0.5

Hard Aperiodic(2,2,10)(6,2,10)

Aperiodic 0.5

Soft Aperiodic(0,2,4)(0,2,4)

Idle time of Both

0

Page 19: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Comparisons of AlgorithmsComparisons of Algorithms

Algorithm-1

Algorithm-2

Page 20: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Cyclic SchedulingCyclic Scheduling

• Handling Aperiodic Tasks-dedicated partition for aperiodic task

-left sliding

-right putting

• Handling Non-preemptable section– no provision -may lead to deadline miss of tasks in

some partition.

Page 21: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Failure of Cyclic Scheduling to Failure of Cyclic Scheduling to Handle NP SectionHandle NP Section

Partition

Task set

Non-premptable section length

start of non-premptable section

Server Budget

Cycle Length

P1 (2,5) 0 NA 0.4 5

P2 (7,40) 2 0 0.2 40

P3 (2,5) 1 0 0.4 5

Page 22: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Our Scheduling StrategiesOur Scheduling Strategies

• Handling NP Sections: Blocked Partition lend their budget to blocking partition

– Modified schedulability bound:

– Modified server size:

111

N

i i

iN

ii

BU

ij

ji LB

ii BU

where is the maximum blocking duration

N - total number of applications in the systemLj - is longest critical section in Pj

- relative shortest deadline in partition Pji

Page 23: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Static Scheduling with budget LendingStatic Scheduling with budget LendingPartition

Task set

Non-premptable Section length

start of non-premptable section

Utilization Bi Modified serverbudget

Cycle Length

P2 (7,40) 2 0 0.175 0.025 0.2 40

P3 (2,5) 1 0 0.4 0.4 0.8 5

Page 24: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Open System Vs Cyclic Open System Vs Cyclic SchedulingScheduling

EDF based open system

Cycle Driven

Partition Scheduling Dynamic Static

Scheduling hierarchy Two-level Two-level

OS Scheduler EDF based Cyclic

Handling Non-premptable section

Total Banadwidth Server No Provision

Hard aperiodic tasks No Provision Hard AperiodicServer

Soft aperiodic tasks TBS Idle Time

Upper level algorithm Any Any Fixed Priority

Context Switch Overhead

Large Small

CPU Utilization High Low

Real-time Guarantees Strict Strict

Flexibility Yes No

Page 25: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

VM Environment Vs SParKVM Environment Vs SParK

VM Environment SParKStrict Temporal Partitioning

Not Required Necessary

Scheduling of Guest OS

Any scheduling RT Algorithm ensuring real-time constraints

Memory Virtualization Complex Simple

Memory Virtualization Techniques

Shadow paging Static allocation

Interrupt Handling Delay

Acceptable Leads to deadline miss

Separate Interrupt Server

Not Necessary Necessary

Inter-partition Communication

Not required Required

Under Utilization of CPU

Not Acceptable Acceptable

Main Motivation Cost Reduction Fault Containment

Page 26: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Conclusions Conclusions

• Analogies are drawn between VM environment and SParK

• Partial design of SParK is presented

• Proposed modifications to (dynamic & static) scheduling algorithms to consider:– Blocking factor– Aperiodic tasks

• Proposed strategies for handling interrupts

Page 27: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

Future WorkFuture Work

• Detailed analysis of:– Interrupt handling– Aperiodic tasks and Blocking factor

• Timekeeping• Memory management• Prototype of the system

Page 28: SParK: An Integrated Real-Time System Vibhooti Verma 05305016

ReferencesReferences• Daeyoung Kim. Strongly Partitioned System Architecture For

Integration Of Real-Time Applications. PhD thesis, UNIVERSITY OF FLORIDA, 2001

• Zhong Deng, Jane W.-S. Liu, Lynn Zhang, Seri Mouna, and Alban Frei. An open environment for real-time applications. Real-Time Systems, 16(2-3):155{185, 1999

• Mendel Rosenblum and Tal Garnkel. Virtual machine monitors: Current technology and future trends. IEE Computer Magazine, May 2005

• Tullio Facchinetti, Giorgio Buttazzo, Mauro Marinoni, and Giacomo Guidi. Non-preemptive interrupt scheduling for safe reuse of legacy drivers in real-time systems. In ECRTS '05, pages 98-105, Washington, DC, USA, 2005. IEEE Computer Society

• Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, and Andrew Wareld. Xen and the art of virtualization. In SOSP '03, pages 164{177, New York, NY, USA, 2003. ACM Press