28
Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: • periodic tasks that execute critical control activities • aperiodic tasks that are event-driven

Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Fixed-Priority Servers

Typical Real-Time systems are hybrids characterized by:

• periodic tasks that execute critical control activities

• aperiodic tasks that are event-driven

Page 2: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Assumptions for Fixed Priority Servers:

Page 3: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Scheduling Strategies we will explore:

• Background Service

First Come First Served (FCFS) service as availability permits

• Polling Server (PS)

Pseudo periodic task(s) provides slot for serving aperiodic tasks

• Deferrable Server (DS)

Unused capacity is saved for future aperiodic arrivals

• Priority Exchange Server (PE)

“Loans” unusable capacity to ready periodic tasks

• Sporadic Server

Loans unusable capacity to ready periodic tasks and delays recoup

• Slack Stealing

Passive task steals unnecessary slack time in scheduling

Page 4: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Background Service

Background Service simply queues up aperiodic tasks and services them perhaps on a First Come First Served basis. There are no guarantees.

Advantages: Simple, Can use alternate scheduling algorithm for aperiodic tasks

Disadvantage: No inherent guarantees

Page 5: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Background Service Example

Page 6: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Polling Server

Advantages:

Advantages: Relatively easy to implement

Disadvantages: Not a big advantage in performance

Page 7: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Polling Server Example

Page 8: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Deferrable Server

Advantages: Much better response time for aperiodic tasks compared to polling

Disadvantages: More complex and DS violates the RM principle that the highest priority task runs when it is ready.

Page 9: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Example of Deferrable Server

Page 10: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Deferrable Server ExampleShows that Deferrable Server violates the RM task running guarantee

Page 11: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Another Example of Deferrable ServerShows that the deferring can cause a task deadline to be missed

Page 12: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Priority Exchange Server

Advantages: Provides a better Schedulability bound for periodic requests

Disadvantages: Provides worse response for aperiodic tasks compared to Deferrable Server

Page 13: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Example of Priority Exchange

Page 14: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Another Example of Priority Exchange

Page 15: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Sporadic Server

Page 16: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Example of Medium-Priority Sporadic Server

Page 17: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Example of High-Priority Sporadic Server

Page 18: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Slack Stealing

Advantages: Substantial improvement in aperiodic task response time

Disadvantages: Complexity

Page 19: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Example of Slack Stealing

Page 20: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Slack Stealing Example Continued: s=0

Page 21: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Slack Stealing Example Continued: s=0

Page 22: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Performance Comparison of PS, DS, PE, & SS

Page 23: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Performance Comparison of Slack Stealer wrt background, PS, & SS

Page 24: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Summary of Fixed-Priority Strategies

Page 25: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks
Page 26: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Homework #5 Lecture 5/15

1) Schedule the following tasks with a Polling Server with intermediate priority.

2) Solve the same scheduling problem with a Sporadic Server with intermediate priority.

3) Solve the same scheduling problem with a Deferrable Server and highest priority.

4) Solve the same scheduling problem utilizing Slack Stealing.

Page 27: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Slack Stealing Does not Lead to an Optimal Schedule

Page 28: Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic tasks

Example to Show Non-existence of Optimal Server