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

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

Dec 26, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Distributed Real-Time systems 1 By: Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Computer Networks.

Distributed Real-Time systems

1

5.1

By: Mahdi SadeghizadehWebsite: Sadeghizadeh.ir

Advanced Computer Networks

Page 2: Distributed Real-Time systems 1 By: Mahdi Sadeghizadeh Website: 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

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

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.

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

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

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

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

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

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)

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

7Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Types Of Real-Time

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

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

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

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

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

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

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

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

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

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

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

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

Scheduling for the Simple Model

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Priorities with preemption

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

Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Networks

Priorities without preemption

Scheduling for the Simple Model

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

15

Sch

edulin

g Algorith

ms of R

eal-Tim

e S

ystems

EDFLLF

RM DASALBESA

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

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

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

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

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

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

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

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.

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

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

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

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

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

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)

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

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

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

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

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

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

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

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

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

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

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

Thank You

28