distributed real-time systems 1 by: mahdi sadeghizadeh website: sadeghizadeh.ir advanced computer...

28
Distributed Real-Time systems 1 5.1 By: Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Computer Networks

Upload: antonia-anderson

Post on 26-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Distributed Real-Time systems

1

5.1

By: Mahdi SadeghizadehWebsite: Sadeghizadeh.ir

Advanced Computer Networks

Outline Real-time system

Time Properties Example for Real-time Types of Real-time

Distributed Real-Time Systems What is distributed system Resource management Global scheduling

Transfer policy Selection policy Location policy Information policy

2

Scheduling Concepts Objective Properties Performance measures A simple model Scheduling Algorithms

3Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Real-time system

real-time systems are defined as those systems in which the correctness of the system depends not only on the logical result of computation, but also on the time at which the results are produced.

A real-time system will usually have to meet many demands within a limited time.

a real-time system consists of a controlling system (computer) and a controlled system (environment).

The controlling system interacts with its environment based on information available about the environment.

4Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

a real-time system consists of a controlling system (computer) and a controlled system (environment).

The controlling system interacts with its environment based on information available about the environment.

Real-time system

5Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Release time (or ready time): Time at which the task is ready for processing.

Deadline: Time by which execution of the task should be completed, after the task is released.

Minimum delay: Minimum amount of time that must elapse before the execution of the task is started, after the task is released.

Maximum delay: Maximum permitted amount of time that elapses before the execution of the task is started, after the task is released.

Worst case execution time: Maximum time taken to complete the task.

Run time: Time taken without interruption to complete the task, after the task is released.

Weight (or priority): Relative urgency of the task.

Time Properties

6Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Example For Real-Time

Real-time systems span a broad spectrum of complexity from very simple micro-controllers to highly sophisticated, complex and distributed systems.

Some examples of real-time systems include :

process control systems, flight control systems, flexible manufacturing applications, robotics, intelligent highway systems, and high speed and multimedia communication systems Anti-Brake System (ABS)

7Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Types Of Real-Time

soft real-time tasks firm real-time tasks hard real-time tasks

8Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Objective Properties Performance measures A simple model Scheduling Algorithms Uniprocessor Scheduling Algorithms Multiprocessor Scheduling Algorithms Distributed Real-Time Systems

Scheduling Consepts

9Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Meeting the timing constraints of the system Preventing simultaneous access to shared resources and

devices Attaining a high degree of utilization while satisfying the

timing constraints of the system Reducing the cost of context switches caused by preemption Reducing the communication cost in real-time distributed

systems; we should find the optimal way to decompose the real-time application into smaller ortions in order to have the minimum communication cost between mutual portions

Covering reliability, security, and safety.

Objective

Properties

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Soft/Hard/Firm real-time tasks

Periodic/Aperiodic/Sporadic tasks

Preemptive/Non-preemptive tasks

Multiprocessor/Single processor systems

Fixed/Dynamic priority tasks

Flexible/Static systems

Independent/Dependent tasks

performance measures

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Depending on the type of application we are confronted with, different performance measures or optimality criteria are used to evaluate schedules.

Among the most common measures in scheduling theory are : schedule length

mean flow time

mean weighted flow time

A Simple Model

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Let the deadline Di for each task Ti be Pi

Task Priority PeriodComputation

time

T1 1 7 2

T2 2 16 4

T3 3 31 7

Scheduling for the Simple Model

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Priorities with preemption

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Priorities without preemption

Scheduling for the Simple Model

15

Sch

edulin

g Algorith

ms of R

eal-Tim

e S

ystems

EDFLLF

RM DASALBESA

Distributed Real-Time Systems

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

What is distributed system Resource management Global scheduling

Transfer policy Selection policy Location policy Information policy

What is distributed system?

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

A set of nodes commun. through a network Network could be LAN or WAN Nodes could be homogeneous or heterogeneous

N1

Network (WAN/LAN)

N2

N3

Nn

Why distributed systems?

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Applications themselves are distributedo E.g., command and control, air traffic control

High performanceo Better load balancing

High availability (fault-tolerance)o No single point of failure

problems with distributed systems

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Resource management is difficulto No global knowledge on workloado No global knowledge on resource allocation

No synchronized clock (or clocks need to be synchronized)

Asynchronous nature of the nodes

Communication related errorso Out of order delivery of packets, packet loss, etc.

System model

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

The application is realized on a distributed system

Tasks arrive at each node independent of other nodes

Each node has resource manager for managing the workload at local node and for facilitating migration of workload to remote nodes

Nodes cooperate among themselves for meeting tasks’ deadlines

Workload assumptions

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Periodic tasks and aperiodic tasks

Periodic messages and aperiodic messages

Task may have precedence constraints

The commn. pattern among two communicating periodic tasks is also periodic

Two communicating tasks could be scheduled on two different nodes

Meeting tasks deadlines require bounding and meeting message deadlines

Resource management in Distributed RT systems (Node architecture)

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Local scheduling Resource management within a node Task scheduling, resource reclaiming, etc.

Global scheduling Balancing load across nodes Transfer policy, selection policy, information policy, and

location policy

Communication resource management QoS routing (channel setup time) Resource reservation (channel setup time) Packet scheduling (run-time)

Global scheduling

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Goal: migrate tasks from a local node (when it is heavily loaded) to a lightly loaded node

Transfer policy: when tasks are to be migrated from/to local node to/from remote nodes

Selection policy: which tasks are to be migrated

Location policy: where tasks are to be migrated

Information policy: what information is exchanged among nodes to realize task migration

Transfer policy

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Load index: the quantitative measure of node’s load Non-real-time systems: queue length, processor utilization Real-time systems: processor utilization, tasks’ laxity/deadline

Transfer policy determines whether the current node is suitable to participate in a task migration either as a sender or as a receiver

Threshold-based load index

Two thresholds (L-upper and L-lower) based on which a node’s load is classified as Light, Normal, or Overload

Light load implies the node could be a receiver for task migration

Heavy load implies the node is a sender for task migration

Normal load implies neither sender nor receiver

Fixing thresholds is hard

Selection policy

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Once transfer policy determines the current node is the sender of a task migration, selection policy decides which tasks to migrate

While choosing the tasks, following needs to be considered

End-to-end delay: sum of local decision time, migration time, remote decision time, and task’s execution time must be less than task’s deadline

Task’s affinity to node – e.g., the required resource must be available at the remote node

Task’s “value” – it is better meet deadlines of higher value offering tasks

Location policy

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Choosing the receiver node for a task migration

There are several policies possible

Random policy – select the receiver randomly

Polling policy – poll the potential receivers of their load in sequential or parallel

Information based – based on the information provided by the information policy

Information policy

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Nodes exchange state info so as to obtain global state

Demand-driven policy A node collects state info from other nodes when it becomes a sender

or receiver for task migration Depends on node’s load state change to Light or Heavy

State-driven policy Whenever node’s load state changes, it informs other nodes Similar to other demand-driven

Periodic policy Nodes periodically exchange state info irrespective of their states

Thank You

28