SYSC 5701 Operating System Methods for RealTime Applications - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

SYSC 5701 Operating System Methods for RealTime Applications

Description:

OK for non-critical, less important activities. may cause aperiodic deadlines to be missed ... Deferred Server Critical Instant ... – PowerPoint PPT presentation

Number of Views:107
Avg rating:3.0/5.0
Slides: 24
Provided by: trevorw
Category:

less

Transcript and Presenter's Notes

Title: SYSC 5701 Operating System Methods for RealTime Applications


1
SYSC 5701Operating System Methods for Real-Time
Applications
  • Scheduling Aperiodic and Sporadic Jobs in
    Priority Driven Systems
  • Winter 2009

2
Liu Ch. 7
  • Assumptions
  • now allow aperiodic or sporadic tasks!!
  • tasks are independent (still)
  • will relax assumption later
  • interdependency ? Liu Ch. 8
  • uniprocessor

3
Aperiodic Events
  • aperiod?ic a. having no natural frequency
  • stochastic inter-arrival times
  • some may be critical sporadic period
  • sporad?ic a. intermittent scattered single
  • will consider techniques
  • background
  • polling
  • sporadic server

4
Aperiodic Service in Background
  • service aperiodic tasks as background process
  • lowest priority always preempt for periodic
    tasks
  • OK for non-critical, less important activities
  • may cause aperiodic deadlines to be missed
  • could starve aperiodic work

5
Background (cont)
  • may cause poor response time for aperiodic work
  • response time
  • time of completed service time of request
  • best case no pending periodic work
  • worst case all periodic work pending
  • background ? OK for some cases, but

6
Integrate with Periodic?
  • how to ensure aperiodic work not starved with RM
    approach?
  • must cast aperiodic tasks into periodic framework
  • must know task inter-arrival characteristics
  • allocate a periodic task that does nothing but
    service aperiodic work!

7
Priority Queues in Kernel
add periodic server jobs to periodic queue
periodic server
periodic jobs
processor
aperiodic jobs
periodic server jobs process aperiodic jobs
8
Aperiodic Service Using Polling
  • goal improve response time to aperiodic
    requests
  • schedule periodic aperiodic service as a
    regular server task period ps, budget es
  • when aperiodic job released
  • ? put it in aperiodic job queue
  • when aperiodic server executes
  • polls aperiodic job queue and execute requests
  • wont exceed allocated budget

9
Polling (cont)
  • if all pending aperiodic jobs completed before
    consuming budget
  • server exhausts remaining budget set 0
  • suspends itself
  • budget replenished at beginning of each period
  • What if job arrives just after server suspends
    self, even though budget existed for job?
  • What to do if aperiodic job misses deadline?
  • How to schedule aperiodic jobs in aperiodic queue?

10
Bandwidth-Preserving Server
  • deferrable server
  • server does not exhaust budget before suspending
    self
  • budget replenished to es at start of each period
  • allows late arrivals to execute without waiting
    until next period
  • improves response time of aperiodic jobs

11
Deferred Server
  • different replenishment algorithm!
  • has sliding window replenishment period
  • replenishment period starts when server begins
    execution with a full budget

not in replenishment period
full budget
release
replenishment period
12
Performance ?
  • Sprunt, Lehoczky, Sha
  • deferred server response time improvement
  • 6 times better than polling
  • 10 times better than background
  • o/s implementation issues
  • more complex
  • hybrid static dynamic scheduling
  • managing server execution capacity
  • ? starts to look like time-slicing !?

13
Theory?
  • for deferred server delaying lower priority jobs
  • worst case critical instant
  • server is highest priority ready job
  • has almost full budget (es )
  • es remaining in period
  • ? will be replenished after es

14
Deferred Server Critical Instant
worst case possibility!
t0
t0 t
  • over time t from critical instant, server can
    delay lower priority tasks by
  • t es

t
t es
es
es
budget from previous period
end of previous period
? ?
? ?
t es
es
es
es
1
ps
ps
15
Equation 7.1 in Liu Text
delay due to higher priority periodic jobs
max. delay due to server
?
i-1
? ?
t es
ek
?i(t) ei es
es
ps
k 0
16
Schedulable Utilization
  • Theorem 7.2 in text

for n periodic tasks
?? ? ?
1 (n1)
us 2 us 1
URM/DS(n) ( n 1)
1
es ps
where us
17
Server Priority
  • if server priority lt priority of task i
  • ? server does not influence response time of task
    i
  • if server priority gt priority of task i
  • ? use Equation 7.1

18
Multiple Servers?
  • might prefer to have different priorities
    associated with different aperiodic tasks
  • use a server for each priority level
  • if m servers with priority gt priority of task i

?
i-1
( )
? ?
t es,k
ek
?i(t) ei 1
es,k
ps,k
k 0
19
Sporadic Server
  • worst case ? replenish server at the end of every
    sporadic server period
  • essentially the same as deferred server
  • acceptance test?
  • only accept if enough slack budget to complete
    job before deadline

20
Fixed Priority Acceptance Test
  • assume sporadic jobs placed in sporadic job queue
    in EDF order
  • slack ? of a job server budget left over after
    executing the job
  • influenced by other jobs accepted by server!

21
Slack of a Job
  • for job Si( t , ds,i , es,i )

execution of previously accepted jobs with
earlier deadlines
?
?s,i(t) ds,i t es es,i
(es,k ?s,k )
? ?
ps
ds,k lt ds,i
number of replenishments before deadline ?
conservative !
completed portion of job
server period
server budget
22
Acceptance
  • must have enough slack
  • accepting wont make previously accepted jobs
    late (wont influence jobs with earlier
    deadlines!)
  • ? each job with a later deadline must have at
    least es,i slack at t

23
Priority Queues in Kernel
add periodic server jobs to periodic queue
periodic server
periodic jobs
processor
2
aperiodic jobs
1
sporadic jobs
test
periodic server jobs process aperiodic and
sporadic jobs
reject
Write a Comment
User Comments (0)
About PowerShow.com