Notes - MIECT
Sistemas Operativos E De Tempo-real
Notes - MIECT
Sistemas Operativos E De Tempo-real
  • Sistemas Operativos e de Tempo-real
  • Basic Concepts About Real-Time Systems
    • Preliminaries
    • Definitions
    • Objective of the Study of RTS
    • Requirements of Real-Time Systems
  • Real Time Model
    • Real Time Model
    • Temporal Control
    • Task states and execution
    • Kernel/RTOS Architecture
      • Time Management Functions
    • Examples of RTOS
  • Practical Class 01
    • Real-Time Services in Linux
    • Using the Linux real-time services
  • Scheduling Basics
    • Basic concepts
    • Scheduling Algorithms
      • Basic algorithms
    • Static Cyclic Scheduling
    • Exercise
  • Fixed Priority Scheduling
    • Online scheduling with fixed priorities
    • Schedulability tests based on utilization
      • Deadline Monotonic Scheduling DM
    • Response-time analysis
  • Practical Class 2
    • Xenomai brief introduction
    • API
    • Developing an application
  • Dynamic Priority Scheduling
    • On-line scheduling with dynamic priorities
    • Analysis: CPU utilization bound
    • Analysis: CPU Load Analysis
    • Other deadline assignment criteria
  • Exclusive Access to Shared Resources
    • The priority inversion problem
    • Techniques for allowing exclusive access
    • Priority Inheritance Protocol
    • Priority Ceiling Protocol
    • Stack Resource Policy
    • Notes
  • Aperiodic Servers
    • Joint scheduling of periodic and aperiodic tasks
    • Aperiodic Servers
    • Fixed Priority Servers
    • Dynamic Priority Servers
  • Limited preemption, release jitter and overheads
    • Non-preemptive scheduling
    • Impact of Release Jitter
    • Accounting for overheads
    • Considerations about the WCET
  • Profiling and Code Optimization
    • Code optimization techniques
      • CPU independent optimization techniques
      • Cache impact
      • Optimization techniques dependent on memory architecture
      • Architecture-dependent optimization techniques
    • Profiling
  • Multiprocessor Scheduling, V1.2
    • Introduction
    • Definitions, Assumptions and Scheduling Model
    • Scheduling for Multicore Platforms
    • Task allocation
Powered by GitBook
On this page
  • Problem
  • Bin packing heuristics - definitions
  • Definitions
  • First fit
  • Best fit
  • Worst fit
  • Next fit
  • First Fit Decreasing
  • Some theoretical results
  • Some utilization bounds
  1. Multiprocessor Scheduling, V1.2

Task allocation

PreviousScheduling for Multicore Platforms

Last updated 2 years ago

How to partition tasks?

  • By information sharing.

  • By functionality.

  • Minimizing resources: number of cores, frequency, energy, etc.

  • and many others (e.g fault-tolerance).

These approaches do not aim at schedulability / real-time performance.

Problem

Partitioning problem (bin packing problem)

Given a set of tasks τ = {τ1 , τ2 , ..., τn }, and a multiprocessor platform with m processors,find an assignment from tasks to processors such that each task is assigned to one and only one processor.

Solutions:

  • Select a fitness criteria

    • Example: task utilization or task density

  • Decide how to sort the tasks (decreasing, increasing, random).

  • Decide what is the fitness evaluation method (assignment rejection rule).

  • Use a fitting policy to assign tasks to processors:

    • FirstFit, BestFit, WorstFit, NextFit (there are others).

Bin packing heuristics - definitions

The Bin Packing problem

Pack n objects of different size a1, a2, ..., an into the minimum number of bins (containers) of fixed capacity c.

Definitions

number of bins used by an algorithm A.

minimum number of bins used by the optimal algorithm.

Number of bins required for sure by any algorithm.

Number of bins that cannot be exceeded for sure by any algorithm.

Simple and immediate bounds

“c” is the capacity of each bin.

Optimality implies clairvoyance for online sequences → heuristics.

Partitioning heuristics (some examples)

First fit (FF)

Place each item in the first bin that can contain it.

Best fit (BF)

Place each item in the bin with the smallest empty space.

Worst fit (WF)

Place each item in the used bin with the largest empty space.

Next fit (NF)

Place each item in the same bin as the last item.

First fit

Place each item in the first bin that can contain it.

Best fit

Place each item in the bin with the smallest empty space.

Worst fit

Places each item in the used bin with the largest empty space, otherwise start a new bin.

Next fit

Place each item in the same bin as the last item. If it does not fit, start a new bin.

The performance of each algorithm strongly depends on the input sequence.

However:

NF

has a poor performance since it does not exploit the empty space in the previous bins.

FF

improves the performance by exploiting the empty space available in all the used bins.

BF

tends to fill the used bins as much as possible.

WF

tends to balance the load among the used bins.

First Fit Decreasing

In this case, sorting tasks by decreasing execution times would allow for minimizing the number of bins.

Some theoretical results

Theoretical results.

  • NF and WF never use more than 2 · M0 bins.

  • FF and BF never use more than (1.7 · M0 + 1) bins.

  • FFD never uses more than ( 4/3 M0 + 1) bins.

  • FFD never uses more than ( 11/9 M0 + 4) bins.

Some utilization bounds

Given a set of n items of volume

No algorithm can use less than

No algorithm can use more than

Any online algorithm uses at least 4/3 times the optimal number of bins:

Any task set with total utilization is schedulable in a multiprocessor made up of m processors using FF allocation and EDF scheduling on each processor.(Lopez-Diaz-Garcia)

Any task set with total utilization is schedulable in a multiprocessor made up of m processors using FF allocation and RM scheduling on each processor.(Oh and Baker)

When each task has utilization , the task set is feasible by global RM scheduling if . (Andersson, Baruah, Jonsson)