SBSE - profs.info.uaic.ro

advertisement

SBSE

Course 4

Overview: Design

• Translate requirements into a representation of software

• Focuses on

– Data structures

– Architecture

– Interfaces

– Algorithmic details

• Also include

– Resource and task allocation in a distributed system

Applications: Design

• Multiprocessor scheduling

• Task and resource allocation in distributed systems

• Hardware/software co-design in embedded systems

• Protocol construction

• Architecture design

Design

Multiprocessor scheduling

• Context: multiprocessor system

• Goal: minimize total run time of the task

• Multiprocessor scheduling: static/dynamic

– Consider communication

– Message passing

– Waiting / possible deadlocks

• MPS (s/d): a.k.a. Load Balancing

◙ A Multiprocessor Scheduling Scheme

Using Problem-Space Genetic Algorithms

• Nodes: tasks

• Edges: communication

• Weights: cost of communication

Solution

• Discussion: possible approaches

◙ A Modified Genetic Algorithm for Task

Scheduling in Multiprocessor Systems

• Topic: Multiprocessor scheduling

• Approach: Partitioned

GA-s

– Divide and conquer

– Divide the problem into subproblems, solve them, then combine them

• Task graph is partitioned

• Results: better than the classical GA

Efficient Scheduling of Arbitrary Task Graphs to

Multiprocessors using A Parallel Genetic Algorithm

• Uses a parallel implementation of GA

– Examples of approaches

• Parallel evaluation

• Parallel evolution/ island model

Discussion of techniques

Other articles

• Pareto-based Soft Real-Time Task

Scheduling in Multiprocessor Systems

– Discussion of Pareto: multi-objective optimization

– Discussion of elitism

Task and resource allocation in distributed systems

• Data, functionality usually allocated to specific nodes

• Node may need resources it owns or shared resources

• Inter-node communication may cause delays and reliability problems

Hardware/software co-design in embedded systems

• Hardware and software (designers) must cooperate

– Hardware/software co-design

Implementation

Implementation

• Automatic programming, N-version programming, search for compiler optimisations and re-engineering

• Review: GP techniques

◙ Automatic generation of object-oriented programs using genetic programming

• Generation of OO-programs

– Memory zone allocated for “data”

– Methods are supposed to learn to operate properly on the attributes

• Application

– Evolved structures like stack, queue using primitive operations

◙ Automatic programming and program maintenance with genetic programming

• Turing programs are evolved my means of

GP

• Once such program solves a problem, it is added to a library of reusable code snippets

• -> see modern ADF-s

◙ Generating Multiple Diverse Software

Versions with Genetic Programming

• A variant for N-Version programming

• Start more GP processes, each with its specific settings, aiming to synthesize

“new ideas”.

Steps

• 1. The design and implement fitness function by using software specification.

• 2. Decide, which GP system parameters will be varied.

• 3. Decide how parameters will vary.

• 4. Choose the parameter value combinations to use in

GP runs.

• 5. Let GP system to run for each combination of parameter values.

• 6. Measure fitness for each generated GP program.

Calculate the diversity.

• 7. Select the program combinations with lowest failure probability to the software fault tolerance structure.

Re-engineering

• A program becomes too old, to “cracky”, needs to be “refurbished”.

• ◙ Automatic re-engineering of software using genetic programming

– Program parallelisation

• ◙ Genetic algorithm based restructuring of object-oriented designs using metrics

– Restructure OO design

Search for compiler optimizations

• ◙ Optimizing for Reduced Code Space using Genetic Algorithms

– Each optimization method is given a letter, the problem is to find which is the better sequence of optimizations to apply

• ◙ GAPS: A Compiler Framework for

Genetic Algorithm (GA) Optimised

Parallelisation

Lab tasks (optional)

• Parameter control in Genetic Algorithms: dwindling mutation rate

• Multi-objective optimization

– As many ‘1001’-s as possible

– As many ‘11101’-s as possible

• Smart bug (GP application)

• Textual notation for UML research

– http://www.infoiasi.ro/~ogh/tep

Tasks

• Read the survey

• Skim over the articles

• Like one? Choose it!

• You are not supposed to like a 2-page article, unless you can implement the techniques described in it.

• Don’t like any? Find your own SBSE article on the net and talk to me about it.

Download