You are on page 1of 56

TABLE OF CONTENTS

COPYRIGHT iii

DECLARATION iv

RECOMMENDATION v

DEPARTMENTAL ACCEPTANCE vi

ACKNOWLEDGEMENT I

ABSTRACT II

TABLE OF CONTENTS III

LIST OF FIGURES VI

LIST OF TABLES VIII

LIST OF ABBREVIATIONS IX

1 INTRODUCTION 1

1.1 Background and Motivation . . . . . . . . . . . . . . . . . . . . . . 1

1.1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1.2 Real-time Systems . . . . . . . . . . . . . . . . . . . . . . . 2

1.1.3 Multiprocessor Platforms . . . . . . . . . . . . . . . . . . . . 2

1.1.4 Task and Platform Model . . . . . . . . . . . . . . . . . . . 3

1.1.5 Deadline in Real-time Systems . . . . . . . . . . . . . . . . . 5

1.1.6 Optimal Scheduling and Clairvoyance . . . . . . . . . . . . . 5

1.1.7 Quantum Annealing . . . . . . . . . . . . . . . . . . . . . . 6

1.1.8 Totally Unimodular Matrix . . . . . . . . . . . . . . . . . . 8

1.2 Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1.3 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1.4 Scope of the Work . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

III
1.5 Originality of the Work . . . . . . . . . . . . . . . . . . . . . . . . . 9

1.6 Organisation of the Work . . . . . . . . . . . . . . . . . . . . . . . . 10

2 LITERATURE REVIEW 11

3 METHODOLOGY 14

3.1 Block Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.1.1 Using Quantum Annealing . . . . . . . . . . . . . . . . . . . 14

3.1.2 Using Linear Programming Relaxations . . . . . . . . . . . . 14

3.2 Quantum Annealing Methodology . . . . . . . . . . . . . . . . . . . 15

3.2.1 Task System Generation . . . . . . . . . . . . . . . . . . . . 15

3.2.2 Scheduling Problem Formulation . . . . . . . . . . . . . . . 16

3.2.3 Reduction to the Constrained Quadratic Model . . . . . . . 17

3.2.4 Solution of CQM via Quantum Annealing . . . . . . . . . . 18

3.2.5 Design of Multiprocessor RTOS Simulation Kernel . . . . . . 18

3.2.6 Task Allocation to Processors . . . . . . . . . . . . . . . . . 19

3.2.7 Optimal Uniprocessor Scheduling . . . . . . . . . . . . . . . 19

3.2.8 Job Generation . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.3 Linear Programming Relaxation Methodology . . . . . . . . . . . . 21

3.3.1 Linear Programming Relaxations to the Scheduling Problem 21

3.3.2 Solution of Linear Program . . . . . . . . . . . . . . . . . . 23

3.3.3 Feasibility Testing . . . . . . . . . . . . . . . . . . . . . . . 23

4 RESULTS AND ANALYSIS 24

4.1 Intermediate Results . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4.1.1 Uniprocessor Scheduling Results . . . . . . . . . . . . . . . . 24

4.2 Final Results and Analysis . . . . . . . . . . . . . . . . . . . . . . . 26

4.2.1 Multiprocessor Scheduling Results . . . . . . . . . . . . . . . 26

IV
4.2.2 Theoretical Analysis of Task System Generation . . . . . . . 27

4.2.3 Quantitative Analysis of Task System Generation . . . . . . 29

4.2.4 Quantitative Analysis of LP Relaxation Method . . . . . . . 38

4.2.5 Quantitative Analysis of Algorithm Runtimes . . . . . . . . 40

5 CONCLUSION AND FUTURE WORK 43

5.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

5.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

REFERENCES 49

V
LIST OF FIGURES

1.1 The Energy Diagram in Quantum Annealing . . . . . . . . . . . . . 7

3.1 Block Diagram using Quantum Annealing . . . . . . . . . . . . . . 14

3.2 Block Diagram using Linear Programming Relaxations . . . . . . . 14

3.3 RTOS Kernel Design . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4.1 Uniprocessor EDF schedule of the Three-task System for 100 Time
Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4.2 Uniprocessor EDF schedule of the Ten-task System for 100 Time
Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

4.3 Multiprocessor Partitioned Schedule for 100 Time Steps . . . . . . . 26


m
4.4 Variation of the function f (m) = (1−e−σu )m
with σu . . . . . . . . . 29

4.5 Problem Complexity vs Feasibility Ratio at various values of Problem


Size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4.6 Problem Complexity vs Feasibility Ratio at various values of Scale


of Exponential Distribution. . . . . . . . . . . . . . . . . . . . . . 33

4.7 Problem Complexity vs Feasibility Ratio at various values of Dead-


line Range. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

4.8 Problem Complexity vs Overall Utilization at various values of


Problem Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

4.9 Problem Complexity vs Overall Utilization at various values of Scale


of Exponential Distribution . . . . . . . . . . . . . . . . . . . . . . 36

4.10 Problem Complexity vs Overall Utilization at various values of


Deadline Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

VI
4.11 Problem Size vs LP Feasibility Ratio at various values of Problem
Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

4.12 Problem Size vs LP Feasibility Ratio at various values of Scale of


Exponential Distribution . . . . . . . . . . . . . . . . . . . . . . . . 39

4.13 Problem Size vs LP Feasibility Ratio at various values of Deadline


Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

4.14 High-level view of the Overall Quantum Annealing Process . . . . 41

4.15 Problem size vs Runtime for Branch-and-Bound and Quantum


Annealing algorithms (left) and the LP relaxation method (right) . 42

VII
LIST OF TABLES

3.1 A Sample Implicit-deadline Task System . . . . . . . . . . . . . . . 15

4.1 Parameters for the Three-task Tasksystem . . . . . . . . . . . . . . 24

4.2 Parameters for the Ten-task Tasksystem . . . . . . . . . . . . . . . 25

4.3 Parameters for the Seven-task Multiprocessor Task System . . . . . 26

4.4 Values of System Parameters used for the Analysis . . . . . . . . . 41

VIII
LIST OF ABBREVIATIONS

CMOS : Complementary Metal-Oxide Semiconductor


P : Deterministic Polynomial-time complexity class
NP : Non-deterministic Polynomial-time complexity class
CQM : Constrained Quadratic Model
QUBO : Quadratic Unconstrained Binary Optimization
WCET : Worst-Case Execution Time
L&L : Liu and Layland
EDF : Earliest Deadline First
RM : Rate Monotonic
DAG : Directed Acyclic Graph
MPSoC : Multi-Processor System-on-Chip
QAOA : Quantum Approximate Optimization Algorithm
VQE : Variational Quantum Eigensolver
IP : Integer Program(ming)
ILP : Integer Linear Program(ming)
LP : Linear Program(ming)
KKT : Karush-Kuhn-Tucker
BQP : Bounded-error Quantum Polynomial-time
PH : Polynomial Heirarchy

IX
CHAPTER 1

INTRODUCTION

1.1 Background and Motivation

1.1.1 Motivation

Since the beginning of the millennium, computer hardware industry has seen
a major shift from production of high-frequency uniprocessor chips to that of
multiprocessing platforms. This shift was a necessary engineering decision due to
high power dissipation in CMOS circuits caused by static power output due to
quantum tunneling of charge carriers when the chip size was around 90 nm [1].
Due to this limitation, further increase in computation power was only possible
via distribution of the circuitry on multiple cores operating at a lower frequency,
which could be cooled separately. This gave rise to a multiprocessing paradigm
of computation which was a relatively unchartered teritory at the time in both
industry and academia. Since then, significant research has been conducted on
both theoretical and practical aspects of multiprocessing systems mainly along the
lines of code parallelization [2] and optimal resource allocation and scheduling [3].
It has been seen that the solutions for many problems that have efficient solutions
for uniprocessor systems generalize with increased computational complexity on
multiprocessing platforms, often rendering their exact solutions intractable. Parti-
tioned scheduling of hard real-time tasks on multiprocessing systems is one of those
problems that is known to be at least strongly non-deterministic polynomial-time-
hard (NP-hard) (assuming P ̸= N P ) [4]. The intractability of the problems in
multiprocessor platforms has lead to the development of efficient polynomial-time
approximation algorithms [5]. However, these algorithms often produce suboptimal
results.

The emergence of near-term quantum computing systems that can be used in


practice such as the quantum annealing [6] [7] system offered by D-wave systems
and the gate model quantum system of IBM has opened new aveneus of research in

1
many fields which involve the exact solution of NP-hard combinatorial optimization
problems. This thesis work is motivated by the application of quantum annealing
for the exact solution of the partitioned-scheduling of implicit-deadline hard real-
time recurrent sporadic task systems on unrelated multiprocessor platforms which
presents itself as either a bin-packing problem [8] [9] or as an integer programming
problem [10] [4], which can be reduced to an equivalent representation in the
form of either a discrete constrained quadratic problem (CQM) or a Quadratic
Unconstrained Binary Optimization problem (QUBO), both of which are directly
solvable by physical quantum hardware.

1.1.2 Real-time Systems

Any system is called a real-time system if the tasks that the system performs have
two criteria to determine their correctness:

a) Correctness of value—that the value(s) produced after the computation must


be correct.

b) Correctness of timing—that the value(s) of the computation must be produced


at the correct time.

Based upon the degree with which the correctness of timing criterion needs to
be enforced, hard (in which the timing constraints must be satisfied at all costs),
soft (in which the timing constraints can be violated occasionally) and firm (in
which the timing constraints can be violated only to some pre-specified level of
tolerance) real-time systems have been defined. In this thesis work, only hard
real-time systems have been considered.

1.1.3 Multiprocessor Platforms

Multiprocessor platforms are abstractions to real multiprocessing systems that


group such systems into categories based upon significant system parameters. Based
on the execution power of the processors, three basic categories of multiprocessor
platforms have been defined:

2
Identical platform

A multiprocessor platform P = {pi : i ∈ {1, 2..., m}} is said to be identical if given


a universal task set U (comprising of all possible tasks that can be possibly executed
on the platform) ∀pi , pj ∈ P ∧ τ ∈ U, T (τ, pi ) = T (τ, pj ), where T : U × P −→ Z +
gives the execution time of a job produced by a task τ ∈ U on processor pi ∈ P .

Uniform platform

A multiprocessor platform P = {pi : i ∈ {1, 2..., m}} is said to be uniform if for


each processor there is an associated set of computing capacities S = {si : i ∈
{1, 2, ..., m}} in the sense that if a job executes on processor pi for t units of time,
then si × t units of execution will have completed.

Unrelated platform

A multiprocessor platform P = {pi : i ∈ {1, 2..., m}} is said to be unrelated if for


each job j produced by a task, there is an associated set of execution rates on
the processors. i.e. a function R : J × P −→ Z + can be defined which gives the
execution rate of a job j on processor p in the sense that if r = R(j, pi ) and if
j executes for t units of time on processor pi , r × t units of execution will have
completed.

1.1.4 Task and Platform Model

Definitions

a) Task:

A task is an abstraction to a set of instructions that can be executed by a


processing platform.

b) Job:

A job is an execution of a certain task upon a certain processing platform.


Since a task can be executed multiple times on a processing platform, it can

3
be understood as a set of jobs.

c) Recurrent Task:

A task is said to be recurrent if it releases multiple jobs at multiple instants


in time.

d) Periodic Task:

A recurrent task is said to be periodic if it releases jobs periodically (at


constant time intervals).

e) Sporadic Task:

A recurrent task is said to be sporadic is if the difference between successive


release times of corresponding jobs have a lower bound but no upper bound.

f) Task System:

A task system is a countable set of tasks all of which have a pre-specified set
of common properties.

The Model

The model studied in this work has been considered in [4] and is a generalization
of the three-parameter model [11]. In this work, a task system Γ = {τ1 , τ2 , ..., τn }
of n recurrent tasks has been considered on an unrelated multiprocessing platform
P = {p1 , p2 , ..., pm } consisting of m processors. Furthermore, the Worst-case
Execution Time (WCET) of a task τi is given by a m-tuple (Ci1 , Ci2 , ..., Cim ) where
Cij is the maximum time that task τi takes to complete its execution on processor
pj . A task τi can release a countably infinite sequence of jobs. Each job released
by τi at time t must complete its execution before or at time t + Di , where Di is
called the relative deadline of task τi . Furthermore, a parameter Ti is defined for
each task τi such that if τi has released a job at time instant t, it cannot release
another job before t + Ti . Ti is hence called the period of the task [4].

4
1.1.5 Deadline in Real-time Systems

A real time system can be categorized into three categories based upon the relation
between the deadline of a task and its period. The categories are discussed below.

Implicit-deadline Systems

A real-time task system (whether periodic or sporadic) is called an implicit deadline


system if ∀τi ∈ Γ, Di = Ti . In this case, the three parameter model [11] reduces to
the Liu and Layland model [12].

Constrained-deadline Systems

A real-time task system is called a constrained-deadline system if ∀τi ∈ Γ, Di ≤ Ti .

Arbitrary-deadline Systems

A real-time task system is called an arbitrary-deadline system if ∀τi ∈ Γ, Di and


Ti are independent.

1.1.6 Optimal Scheduling and Clairvoyance

Clairvoyant Scheduler

A scheduler S is said to be clairvoyant if it knows everything about the future,


especially about the execution times and arrival times of all the jobs to be executed
on the platform.

Optimal Scheduler

A scheduler S is said to be optimal if it produces the same schedule on the same


scheduling problem as the best clairvoyant scheduler would.

5
1.1.7 Quantum Annealing

The Ising Model

The Ising Model [13] is a model of ferromagnetism in physics. The model is defined
using discrete variables which represent atomic spins, which in the classical realm,
take two values: either +1 or -1. The spins are configured in the form of a graph
where the individual spins form the vertices and the edges represent the interaction
between two adjacent spins. Consider a graph G = (V, E) representing the Ising
model of some ferromagnetic system. The energy of this system is given by the
energy Hamiltonian [14]:

X X
Ĥ = − Ji σ̂z(i) − Ji Jj σ̂z(i) σ̂z(j) (1.1)
i∈V (i,j)∈E

(i)
where Ji and Jj are scalar coefficients and σ̂z has a dual meaning. In the
(i)
classical realm, σ̂z is the discrete variable representing the spin state of vertex i
(i)
(σ̂z ∈ {−1, +1}) and the Hamiltonian Ĥ gives the energy of the system. On the
other hand, if the ferromagnetic system is considered as a quantum mechanical
(i)
system, then, σ̂z represents the Pauli-z operator [15] to be applied to the individual
(i) (j)
state vector |ψi ⟩ representing the spin state of vertex i and σ̂z σ̂z represents the
(i) (j)
tensor product of the operators (i.e.σ̂z ⊗ σ̂z ). It has been shown that the
evaluation of the ground state of Ĥ is an NP-hard problem [16].

Quantum Annealing with External Fields

Consider the Ising Model with longitudnal and transverse fields [17]:

X X X
Ĥ(t) = −h σ̂z(i) − Ji Jj σ̂z(i) σ̂z(j) − Γ(t) σ̂x(i) (1.2)
i∈V (i,j)∈E i∈V

Here, h is a scalar coefficient of the longitudinal field and Γ(t) is the quantum
tunneling [18] coefficient which is analogous to the temperature parameter in
simulated annealing.

6
Quantum annealing starts off with the qubits in the uniform superposition state

1 X
|ψ⟩ = p |i⟩ (1.3)
|V | i∈V

which corresponds to the transverse or tunneling field component in the energy


P (i)
Hamiltonian (Γ(0) i∈V σ̂x ), which is the initial ground state of the system. In
order to encode the problem we are trying to solve into the quantum state, both
P (i)
the longitudinal field’s energy component −h i∈V σ̂z and the coupling energy
P (i) (j)
component − (i,j)∈E Ji Jj σ̂z σ̂z are introduced which raise the energy barrier
between the two states {+1, −1} and create a bias between the energy levels of +1
and -1 states as depicted in the energy diagrams below.

Figure 1.1: The Energy diagrams of the ground state (left), after having applied
the coupling between the qubits (center) and after having applied a longitudinal
field (right). Source: [19]

The evolution of the quantum system through time is governed by the time-
dependent Schrödinger’s equation [20] as:

∂|ψ(t)⟩
ih̄ = Ĥ|ψ(t)⟩ (1.4)
∂t

Given that the tunneling coefficient is not too large, it has been shown that the
system will converge to the global minimum of the energy landscape [17]. The
P (i)
transverse field term −Γ(t) i∈V σ̂x is responsible for state transitions in the Ising
P (i)
model. The longitudinal field term −h i∈V σ̂z , on the other hand, introduces a
bias that differentiates between the classical 0 and 1 states. Finally, the coupling
term makes the energy function non-convex by raising the energy barrier, thus
rendering the problem NP-hard. The NP-hard nature of the minimization problem
makes it amenable for any NP-hard problem to be reduced to the problem of

7
energy minimization in the Ising model, and hence can be solved directly by a
quantum computer.

1.1.8 Totally Unimodular Matrix

A matrix is totally unimodular if and only if every minor of the matrix is either 0,
+1 or -1. A minor of a matrix is the determinant of a square submatrix formed by
eliminating one or more of its rows and columns.

1.2 Problem Definition

Given the system model, with an additional constraint that the system is implicit-
deadline, find a partition function F : Γ −→ P such that given any optimal
uni-processor scheduling algorithm A, all possible schedules produced by A on all
partitions generated by F are optimal.

1.3 Objectives

The objectives of this work are:

• To solve the partitioned scheduling problem using quantum annealing.

• To develop a framework for utilization of quantum computation for scheduling


real-time systems.

• To analyze the effectiveness of the linear programming relaxation method for


solving the partitioned scheduling problem.

1.4 Scope of the Work

This work considers partitioned scheduling of implicit-deadline, hard real-time,


recurrent sporadic task system on unrelated multiprocessor platform and uses
quantum annealing and linear programming relaxation methods to find global
optimum solution(s) to the problem. Furthermore, susbsequent analysis of the

8
performance of the algorithms, the feasibility and the overall utilization of the
schedules have been performed via simulation.

1.5 Originality of the Work

The NP-hard nature of the partitioned scheduling problem has prevented evaluation
of its global optimum solutions. Significant research effort has been invested
to devise polynomial-time approximation algorithms as well as algorithms using
metaheuristics for the problem. However, direct evaluation of the optimum solution
via quantum annealing has not been conducted. This work has bridged this research
gap: quantum supremacy has been observed for the problem over the classical
branch-and-bound algorithm with metaheuristic improvements [21] [22].

Additionally, this work introduces the linear programming relaxation methodology


which has been shown to be superior to both branch-and-bound algorithm and
the quantum annealing algorithm with incredible speedup over them while being
feasible over a large range of problem sizes.

Furthermore, this work also generalizes the uniprocessor task system generation
algorithm to unrelated multiprocessor platform which can serve as an important
tool for subsequent research.

Also, this work introduces a simulation model for hard real-time task-system simu-
lation on unrelated multiprocessor platforms. Although uniprocessor simulators
and multiprocessor simulators for identical platforms were readily available, those
for unrelated multiprocessor platforms were difficult to come by. The simulation
model introduced in this work can be readily reused for subsequent research work.

Last, but not the least, this work performs detailed quantitative analysis of the
task-system generation algorithm which has validated its stability and also sheds
light upon the different aspects of its behavior. This analysis will form a platform
for using the algorithm with confidence in subsequent research work.

9
1.6 Organisation of the Work

The remaining portion of this document discusses the following.

Chapter 2 discusses the progress of research effort in both real-time scheduling


and in quantum annealing that have formed a starting point for this work.

Chapter 3 discusses the methodologies in detail.

Chapter 4 discusses the results of this work and the subsequent analyses.

Chapter 5 discusses the conclusion of the work done and provides recommendations
for further research.

10
CHAPTER 2

LITERATURE REVIEW

Task scheduling is an age-old problem that has continued to fascinate researchers in


both the operations research community [23] [24] [25] as well as in the field of real-
time systems[26] [3]. The problem of uni-processor scheduling for real-time systems
has been studied extensively and it has been shown that optimal pre-emptive
scheduling is possible in polynomial time via the Earliest Deadline First (EDF)
scheduling policy [1]. A similar result has also been obtained for fixed-task-priority
family of scheduling algorithms via the Rate Monotonic (RM) scheduling policy
[12]. However, the results do not generalize to the multi-processor case and the
corresponding problems are at least strongly NP-hard. A hierarchy of complexity
classes for real-time scheduling problems for multi-processor platforms has been
established in [4].

A formal study of the workload and platform models for multiprocessing platforms
began with the Liu and Layland model [12] in which a two-parameter (a worst-case
execution time and a deadline) characterization of the system was defined. It was
generalized to the three parameter model [11] in which an additional parameter (the
task period) was added. The three parameter model is the most analysed model
in the literature [1]. Both of these models, however, did not consider intra-task
parallelism. To address this issue, the directed acyclic graph (DAG) task model [27]
was proposed in which each task is characterized by a DAG of jobs where the vertices
represent jobs and edges represent precedence constraints. Although the DAG task
model is fairly general, it has two key issues: firstly, sufficient theory has not been
developed for the model and system designers cannot rely on strong theoretical
guarantees which are available for other models; secondly, even in the case of
identical multiprocessor platforms, feasibility tests for the proposed schedules are
intractable [1]. Also, with the widespread use of Heterogeneous Multi-Processor
System-on-Chip (MPSoCs) platforms (such as the STM32MP157C-DK2 MPSoC
[28]) on modern embedded systems [29] [30] [31], the systems are modeled quite

11
accurately via unrelated multiprocessor platform models with no job migration
(since job migration between processors with different architectures and instruction
sets is a difficult problem) [32]. Hence, the unrelated multiprocessor generalization
to the three-parameter-model as considered in [4] has been considered in this work.

Quantum computation for the solution of hard combinatorial optimization problems


has been one of the most important research areas in quantum computing since it
affects diverse fields such as operations research, biomedical engineering, finance
and economics and many more [10]. Key breakthroughs in the field are three
main algorithms: the quantum annealing algorithm [17] [14] [33], the Quantum
Approximate Optimization Algorithm (QAOA) [34] and the Variational Quantum
Eigensolver (VQE) [35]. The latter two are hybrid quantum algorithms that
utilize both a classical computer and a gate-model universal quantum computer
[36]. The quantum annealing algorithm, on the other hand, runs on a specialized
superconducting quantum integrated circuit, which is not a universal quantum
computer. It naturally solves the Quadratic Unconstrained Binary Optimization
(QUBO) problem. NP-hard problems including the Integer Programming (IP)
problem can be reduced in polynomial time to an equivalent QUBO and vice
versa [37]. The D-wave quantum annealing system provides upto 5000 qubits with
15 connections per qubit [38], which overshadows the 127 qubits available in the
gate-model IBM quantum systems [39]. Furthermore, with the introduction of the
hybrid solvers, problems with more than 1 million variables can be solved.

Much debate has been done on whether quantum supremacy could be achieved
in practice. However, in recent years confirmations of quantum supremacy are
emerging. The groundbreaking theoretical result of [40] showed an oracle separation
of the Bounded-error Quantum Polynomial-time (BQP) class and the Polynomial
Heirarchy (PH). It was shown that the problem of deciding whether two (possibly
infinite) sequence of numbers are independent could be solved by a quantum
algorithm in BQP, whereas there exists no classical algorithm in PH that can
solve the problem, even with infinite oracle queries. In another research, a million-
fold speedup has been achieved over the classical counterpart in quantum matter
simulation using quantum annealing [41]. This result has paved a path for quantum
computing applications research and is also an inspiration for this work.

12
The linear programming relaxation method is a well-known method for finding
fractional solutions or bounds on the solution of hard integer linear programs. The
relaxation method proposed in this work arose out of a well-understood result in
polyhedral combinatorics: the fact that the relaxation of the integer constraints
from a linear program preserves integrality only if the coefficient matrix of the
relaxed problem is totally unimodular [42] [43]. In general, the relaxation method
has been employed in a variety of scenarios such as solving graph cut problems [44]
[45], k-means clustering [46], k-medians clustering [47], boolean tensor factorization
[48] among others.

13
CHAPTER 3

METHODOLOGY

3.1 Block Diagrams

3.1.1 Using Quantum Annealing

Figure 3.1: Block Diagram using Quantum Annealing

3.1.2 Using Linear Programming Relaxations

Figure 3.2: Block Diagram using Linear Programming Relaxations

14
3.2 Quantum Annealing Methodology

3.2.1 Task System Generation

Task system generation involves defining an implicit-deadline hard real-time re-


current sporadic task system Γ = {τ1 , τ2 , ..., τn }. Each such task has a m-tuple
of worst-case-execution-time parameters Ci = (Ci1 , Ci2 , ..., Cim ) on an unrelated
multiprocessor platform of m processors. Additionally it has a deadline parameter
Di and a period parameter Ti with the added constraint for the system that Di = Ti
for an implicit-deadline system as defined in section 1.1.4. A sample of such a task
system is illustrated below with n = 5 and m = 4.

Task (τi ) WCET (Ci ) Deadline(Di = Ti )


1 (1,3,6,2) 7
2 (3,5,10,4) 12
3 (2,4,6,5) 6
4 (1,1,2,1) 3
5 (3,3,4,6) 10
Table 3.1: A Sample Implicit-deadline Task System

For task system generation, the algorithm as described in [49] has been generalized
to the multiprocessor case without the feasibility test since the feasibility test
does not generalize with tractability to unrelated multiprocessor platforms. The
algorithm has been outlined below.

Algorithm 1 Task System Generation


Require: σu ∈ R, n ∈ Z + , m ∈ Z + , m < n, Tmin , Tmax ∈ Z + , Tmin < Tmax
procedure GenerateTaskSet(σu , n, m, Tmin , Tmax )
for i ← 1 to n do
Ui ← [2, 2...]m
Ci ← [0, 0...]m
Ti ← ⌊U (Tmin , Tmax )⌋ ▷ Generate period from uniform distribution
while ∃Uij > 1 do
Uij ← Exp(σu ) ▷ Generate utilization from exponential distribution
Cij ← ⌊Uij × Ti ⌋
end while
end for
Γ ← {(Ci , Ti ) | i ∈ {1, 2, ..n}}
return Γ
end procedure

15
Since no polynomial-time feasibility test exists for scheduling tasks on unrelated
multiprocessors, the partitioning algorithms themselves have been used for feasibil-
ity testing.

3.2.2 Scheduling Problem Formulation

The scheduling problem has been formulated as an integer linear program (ILP) as
follows, for the Earliest-Deadline-First (EDF) algorithm [12] for scheduling tasks
on each processor, which is guarenteed to be optimal under certain constraints
(discussed in section 3.2.7).

Define xij ∈ {0, 1} ∀(i, j) ∈ {1, 2, ..., n} × {1, 2, ..., m} as binary decision variables
with the following interpretation:

1 if τi is assigned to processor pj

xij = (3.1)
0 otherwise

Then, solve the following ILP:

n X
m
X Cij
minimize xij · subject to (3.2)
i=1 j=1
Ti

m
X
xij ≥ 1 ∀ i ∈ {1, 2, ..., n} and (3.3)
j=1

n
X Cij
xij · ≤ 1 ∀ j ∈ {1, 2, ..., m} (3.4)
i=1
Ti

The objective defined in equation 3.2 tries to minimize the overall utilization across
all processors since given two feasible schedules, the one that utilizes less resources
Cij
(with utilization of a task on a processor given by Ti
) is trivially optimal. The
first set of constraints defined in equation 3.3 indicates that each task τi must be
assigned to at least one processor [4]. The second set of constraints defined in
equation 3.4, on the other hand, indicates that the tasks assigned to each processor
pj must be EDF-schedulable on the processor [4].

16
3.2.3 Reduction to the Constrained Quadratic Model

The constrained quadratic model is a general quadratic optimization problem of


the form [50]:
X X
minimize ai x i + bij xi xj + r (3.5)
i i<j

subject to the constraints:

X (c)
X (c)
ai x i + bij xi xj + r(c) ≤ 0, c ∈ {1, 2, ..., nineq } (3.6)
i i<j

X (d)
X (d)
ai x i + bij xi xj + r(d) = 0, d ∈ {1, 2, ..., neq } (3.7)
i i<j

(c) (d) (c) (d)


where xi ∈ Z, ai , bij , ai , ai , bij , bij , r, r(c) , r(d) ∈ R ∀ i, j, c, d ∈ Z +

When the binary decision variables xi are considered as qubits (i.e. |xi ⟩) they
become complex vectors. Then, the objective function, along with the constraints
become continuously differentiable functions of the decision variables. Thus, an
equivalence exists between the CQM model and the Quadratic Unconstrained
Binary Optimization (QUBO) problem [51] by the introduction of the Karush-Kuhn-
Tucker multipliers [52] since the necessary condition for the KKT conditions to be
applied [53] are satisfied. In the special case of binary CQM, the correspondence is
straightforward. The equivalent QUBO problem is:
!
X X X X (c)
X (c)
minimize ai x i + bij xi xj + r + λ(c) ai xi + bij xi xj + r(c) +
i i<j c i i<j
!
X X (d)
X (d)
λ(d) ai x i + bij xi xj + r(d)
d i i<j

(3.8)

for the set of KKT multipliers λ(c) , λ(d) ∈ R.

The ILP of section 3.2.2 is a linear program with integer constraints, hence has a
reduction (in polynomial number of steps) to the Constrained Quadratic Model.

17
The reduction has been illustrated below.

Cij
a(i−1)×m+j = (3.9)
Ti

(c) (d)
bij = 0, bij = 0, bij = 0 (3.10)

(c) (c)
r = 0, r1 = 1, r2 = −1, r(d) = 0 (3.11)

(1) (2) Cij


ai = −1, ai = ∀j (3.12)
Ti

3.2.4 Solution of CQM via Quantum Annealing

Since an equivalence exists between the CQM model and a QUBO problem, a
quantum computer can find the solution for the CQM problem. The CQM solver
provided by the D-wave systems quantum computer estimates the KKT multipliers
internally, without us having to tune the multipliers ourselves. Upto 1 million
decision variables are available for the solution of binary quadratic problems [54].

Hence, after having converted the problem into the CQM form, quantum annealing
has been done according to equations 1.2 and 1.4.

3.2.5 Design of Multiprocessor RTOS Simulation Kernel

After having obtained the solution of the partitioning problem, the solution has to
be converted to equivalent partitioning on some multiprocessor system. For the
subsequent analytical work, a multiprocessor simulation kernel has been designed
and implemented. The multiprocessor kernel is composed of a set of uniprocessor
kernels with separate job queues, as required by the partitioned scheduling approach.
The design of the RTOS kernel has been depicted below.

18
Figure 3.3: RTOS Kernel Design

3.2.6 Task Allocation to Processors

The solution of quantum annealing is a partition of n tasks to m processors. After


having obtained the solution from the quantum computer, the task set Γ has been
partitioned accordingly and the partitioned task systems were provided to the
corresponding uni-processor kernels for scheduling.

3.2.7 Optimal Uniprocessor Scheduling

Although estimating the schedulability of a general task system Γ is intractable


upon multiprocessing platforms, it is efficient to verify the schedulability for a given
partitioning of Γ. For the Earliest-Deadline-First (EDF) uniprocessor scheduling
algorithm [1], it can be verified in linear time using the following test [4].

X Ci
A partition Γp ⊆ Γ is EDF-schedulable iff ≤ 1. (3.13)
τ ∈Γ
Ti
i p

If the test fails upon any partition, then the partitioning provided by the quantum
annealer has violated some constraints. It can mean one of two things: either an
infeasible solution has been found by the annealer (due to errors in computation),
or the task system has no feasible solution. The former case was addressed via

19
sampling the annealer for multiple runs which would yeild a feasible solution
(whether optimal or suboptimal). In the latter case, however, it had to be assumed
that the task system has no feasible partitioned schedule (although not provably
so). In that case, the designer of the real-time system has to relax his/her design
so that a feasible solution can be found.

EDF-scheduling on a Uniprocessor

The Earliest Deadline First (EDF) scheduling algorithm [55] has been used for
scheduling partitioned task system Γp on a particular processor pi . The EDF
scheduling algorithm has been shown to be optimal for preemptive scheduling on
uniprocessor platforms [56] [55]. Hence, it has been used for this work.

3.2.8 Job Generation

After having designed a partitioned schedule for the tasks, the jobs of the tasks
were generated and sent to the job queue at different times greater than or equal
to the task period. They were then scheduled by the algorithm. There are two
non-deterministic variables in the job generation process: the actual execution time
(n)
ci and the arrival time of the nth job of process τi : ai . These will be modeled as
random variables as follows.
ci ∼ U (0, Ci ) (3.14)

(n)
bi ∼ Exp(λ) (3.15)

(n) (n) (n−1)


ai = bi + ai + Di (3.16)

where λ is a parameter called the arrival rate which can be adjusted during
simulation.

20
3.3 Linear Programming Relaxation Methodology

3.3.1 Linear Programming Relaxations to the Scheduling Problem

The integer linear program formulated in section 3.2.2 is NP-hard in the strong
sense. However, if we apply the following relaxations, the relaxed version of the
problem can be shown to induce an integral polyhedron in the problem space: i.e.
any extreme point (vertex) of the polyhedron has all integer components. A direct
consequence is that the direct LP solution of the relaxed problem is guarenteed to
be the optimal solution of the problem without the integer relaxation.

R1. Remove the second set of constraints (equation 3.4).

R2. Relax the domain of the decision variables xij from {0, 1} to [0, 1] ⊆ R.

The linear programming problem after having applied the relaxations is depicted
below.
n X
m
X Cij
minimize xij · subject to (3.17)
i=1 j=1
Ti
m
X
xij ≥ 1 ∀ i ∈ {1, 2, ..., n} (3.18)
j=1

0 ≤ xij ≤ 1 ∀xij (3.19)

Theorem 1. If the LPP above has a finite optimum solution, then it is also an
integer optimum solution.

Proof. The problem can be rewritten in the matrix form as:

minimize v T (X ⊙ U )v subject to (3.20)

v T xi ≥ 1 ∀ i ∈ {1, 2, ..., n} (3.21)

0m×1 ≤ xi ≤ 1m×1 ∀ i ∈ {1, 2, ..., n} (3.22)


h i
Cij
where X = [xij ]n×m , U = [uij ]n×m = Ti
, v = [1 ∀ j ∈ {1, 2, ..., m}]m×1 , xi
n×m
is the transpose of the ith row of X and ⊙ is the Hadamard product of matrices.

21
Let x = [∥ni=1 xi ]mn×1 where ∥ is the concatenation operator. Similarly, let ui be
the transpose of the ith row of U and u = [∥ni=1 ui ]mn×1 . Then, the problem can be
reformulated as:
minimize uT x subject to (3.23)

Ax ≥ 1n×1 (3.24)

0mn×1 ≤ x ≤ 1mn×1 . (3.25)

where,  
1 0 0 ... 01×m
 1×m 1×m 1×m 
 
 01×m 11×m 01×m ... 01×m 
A=
 .. .. .. .. ..

 (3.26)
 . . . . . 
 
01×m 01×m 01×m ... 11×m
n×mn

Lemma 1.1. (Heller and Tompkins, 1956)[42] Let A be a matrix whose rows can
be partitioned into two disjoint sets S1 and S2 with the following properties:

1. Every value in A is either +1, 0 or −1.

2. Every column of A contains at most two non-zero entries.

3. If a column of A contains two non-zero entries, and both have the same sign,
then one is in S1 and the other in S2 .

4. If a column of A contains two non-zero entries they have opposite signs, then
both are in S1 or in S2 .

Then, the matrix A is totally unimodular.

Lemma 1.2. The matrix A of equation 3.26 is totally unimodular.

Proof. Since A has only 0 and 1 as elements, property 1 is trivially satisfied. Also,
since A has 1s at different columns in each row (clearly seen from the structure of
the matrix), every column of A has exactly 1 non-zero entry. Hence, property 2 is
also satisfied. This fact also implies that the premises of properties 3 and 4 are
false, hence properties 3 and 4 are vacuously true. Thus, the matrix A is totally
unimodular.

22
Lemma 1.3. (Hoffman and Kruskal, 1956) [43] Let Q(b, b′ , c, c′ ) = {x : b ≤ Ax ≤
b′ and c ≤ x ≤ c′ } be a polyhedron in k-dimensional space with b, b′ , c, c′ being
vectors with components in either Z or ±∞. Q is an integer polyhedron if and
only if A is totally unimodular.

Lemma 1.4. The polyhedron induced by the constraints (equations 3.24 and 3.25)
is an integer polyhedron.

Proof. Let b = 1n×1 , b′ = ∞n×1 , c = 0mn×1 and c′ = 1mn×1 . Clearly all the
components of b, b′ , c, c′ ∈ Z ∪ ±∞. Since A is totally unimodular, it follows that
the polyhedron induced by the constraints is an integer polyhedron.

Thus, if a finite optimum solution exists for the LPP, it must occur at one of the
faces (or vertices) of the integer polyhedron, which will, by definition be a vector
of integers. This proves the theorem.

3.3.2 Solution of Linear Program

Once the integer program had been relaxed to the linear program, it was solved
using GLOP [22], which is Google’s open source linear programming solver system.
It utilizes the revised primal-dual simplex algorithm [57][58], which has been
optimized for sparse matrices. This is perfectly suited for this work as the matrix
A in the above problem has been seen to be highly sparse.

3.3.3 Feasibility Testing

The trade-off of relaxation of the schedulability constraint in the problem definition


is the fact that the resulting solution (although integral) may not be feasible upon
the platform. Hence, feasibility testing has to be done. If the solution is found to
not be feasible, methods to solve the full integer problem (such as the quantum
annealing method) have to be employed.

Since the optimal EDF algorithm [1] has been considered for this work, the
feasibility testing was performed according to equation 3.13 as described in section
3.2.7.

23
CHAPTER 4

RESULTS AND ANALYSIS

4.1 Intermediate Results

4.1.1 Uniprocessor Scheduling Results

Initially, the uniprocessor RTOS was designed and implemented. The results of
uniprocessor scheduling for certain task systems upon the RTOS are depicted
below.

1. A three-task system simulated for 100 time steps

Task Worst-case Execution Time (WCET) Relative Deadline


1 4 10
2 5 26
3 6 17
Table 4.1: Task System Parameters

Figure 4.1: Schedule generated by Uniprocessor EDF algorithm for 100 time steps.
The numbers at the top of the bars indicate the job number of the corresponding
task.

24
2. A ten-task system simulated for 100 time steps

Task Worst-case Execution Time (WCET) Relative Deadline


1 2 10
2 3 26
3 2 99
4 4 60
5 7 45
6 3 100
7 4 50
8 4 65
9 6 80
10 3 92
Table 4.2: Task System Parameters

Figure 4.2: Schedule generated by Uniprocessor EDF algorithm for 100 time steps.
The numbers at the top of the bars indicate the job number of the corresponding
task.

25
4.2 Final Results and Analysis

4.2.1 Multiprocessor Scheduling Results

A set of uniprocessor RTOS were combined to develop the multiprocessor RTOS.


Some scheduling results upon the multiprocessor RTOS are presented below.

Task Worst-case Execution Times (WCET) Relative Deadline


1 [2,27,29] 30
2 [18,19,18] 27
3 [5,5,7] 14
4 [1,1,1] 5
5 [2,11,9] 18
6 [7,5,12] 27
7 [22,3,26] 27
Table 4.3: Task System Parameters

Figure 4.3: Schedule generated by Multiprocessor Partitioned Scheduling for 100


time steps. The numbers at the top of the bars indicate the job number of the
corresponding task.

Similar results have been obtained for multiprocessor scheduling of task systems
with upto 12000 tasks and 122 processors. These results indicate that the multi-
processor RTOS system works correctly and can be used for subsequent analysis.

26
4.2.2 Theoretical Analysis of Task System Generation

Since the task system generation algorithm used in this work is a generalization of
the uniprocessor task system generation algorithm proposed in [49], an analysis
is required to establish the validity of the algorithm. In this section, theoretical
aspects of the algorithm have been analysed and the detailed quantitative analysis
follows in the next section.

Theorem 2. Algorithm 1 halts with probability 1.

(k)
Proof. Let qij = P (Uij > 1) be the probability that the j th entry in the WCET
array is > 1 in the k th run of the while loop for a fixed value of i. Also, let
(k) (k)
pij = 1 − qij . Then, we have:
Z ∞
(k)
qij = P (Uij > 1) = σu e−σu x dx = e−σu (4.1)
x=1

(k) (k)
pij = 1 − qij = 1 − e−σu (4.2)

(k)
Let pi be the probability that ∀j Uij ≤ 1 for the given i in the k th run of the while
loop. Then,
m
Y m
Y
(k) (k)
pi = pij = (1 − e−σu ) = (1 − e−σu )m (4.3)
j=1 j=1

Let X be a random variable that represents the number of while loops that have
to be run when the condition ∀j Uij ≤ 1 is encountered for the first time for a
particular i. Then, X is distributed according to the geometric distribution. Hence,

 k−1 m k−1 m
(k) (k)
P (X = k) = 1 − pi pi = 1 − 1 − e−σu 1 − e−σu (4.4)

 k k
(k)
P (X ≤ k) = 1 − 1 − pi = 1 − 1 − (1 − e−σu )m (4.5)

Let P (H) be the probability that the algorithm halts. We have,

k
P (H) = lim P (X ≤ k) = lim 1 − 1 − (1 − e−σu )m (4.6)
k→∞ k→∞

27
We have,

0 ≤ (1 − e−σu ) ≤ 1 (since it is a probability)

or, 0 ≤ (1 − e−σu )m ≤ 1, (m > 0)

or, 0 ≥ −(1 − e−σu )m ≥ −1, (m > 0)

or, 0 ≤ 1 − (1 − e−σu )m ≤ 1 (m > 0)

or, 0 ≤ (1 − (1 − e−σu )m )k ≤ 1 (m, k > 0)

Thus,

k k
lim 1 − (1 − e−σu )m = 0, so P (H) = lim 1 − 1 − (1 − e−σu )m = 1 (4.7)
k→∞ k→∞

 
nm
Theorem 3. Algorithm 1 has an average runtime of O (1−e−σu )m
.

Proof. We have, the expected value of the geometric random variable X:

1 1
E[X] = = (4.8)
(k)
pi (1 − e−σu )m

This is the expected number of steps for which the while loop has to be run. Since
m
each test of the while loop takes an average of 2
steps (linear search) and the outer
loop has to be run for n steps (1 for each task), the average runtime of algorithm 1
 
nm
is O (1−e−σu )m .

Corollary 3.1. Algorithm 1 has an average runtime linear in m at the limit


σu → ∞.

Proof. We have,
nm nm
lim −σ m
= = nm (4.9)
σu →∞ (1 − e u ) (1 − 0)m

m
It has to be noted that even at moderate values of σu , the function (1−e−σu )m
is
almost linear in m. So, a very fast average performance (linear in the problem size
nm) can be expected from the algorithm as is evident from the graphs below.

28
m
Figure 4.4: Variation of the function f (m) = (1−e−σu )m
with σu

4.2.3 Quantitative Analysis of Task System Generation

Metrics used for Analysis

Certain metrics derived from the parameters of the tasksystem generation algorithm
that have been used for analysis are discussed below.

Problem Size

The problem size indicates the number of binary variables required to represent the
task system partitioning problem as an integer linear program. It is calculated as:

s=n×m (4.10)

where s is the problem size, n is the number of tasks and m is the number of
unrelated processors.

29
Problem Complexity

Since the task partitioning problem is essentially a bin-packing problem with


processors as bins and tasks as items, a quantitative characterization of the
hardness of the problem can be derived. Problem complexity is calculated as:

n
c= (4.11)
m

where c is the problem complexity, n and m are number of tasks and number
of processors respectively. Intuitively, higher the problem complexity, the more
difficult it is to pack the bins.

Scale of the Exponential Distribution

The scale parameter of the exponential distribution used to generate utilization


values for the tasks is an important simulation parameter as it directly controls
the probability of generating task systems with different utilization behavior. It is
denoted by σu ∈ R and it dictates the ranges of overall system utilization of the
generated task systems.

Feasibility Ratio

The feasibility ratio of a population of k task systems where r of them are feasible
upon the given multiprocessor platform is given by:

r
fr = (4.12)
k

where f r denotes the feasibility ratio. Intuitively, with the other parameters re-
maining fixed, the feasibility ratio describes the efficiency of task system generation
algorithm.

Deadline Range

The deadline range is another metric of the hardness of the partitioning problem.

30
It can be defined as:

dr = max deadline − min deadline (4.13)

where the task system generator generates task systems with deadline within the
range [min deadline, max deadline]. Intuitively, larger the deadline range, more
are the possibilities for generation of task deadlines. With more possibilities, the
probability of selecting task deadlines that induce feasible task systems is expected
to increase.

Problem Complexity vs Feasibility Ratio Analysis

Problem complexity and feasibility ratio capture most of the important system
parameters. Hence they have been chosen as the primary variables for the analysis.
Other variables are varied to generate the different curves as shown below.

31
Figure 4.5: Problem Complexity vs Feasibility Ratio at various values of Problem
Size.

The results indicate that the tasksystem generation algorithm is stable and reliably
produces feasible task systems until the entire problem space becomes infeasible
due to very high problem complexity. With the increase in problem size, the cutoff
is delayed and feasible problems with higher complexity can be generated.

32
Figure 4.6: Problem Complexity vs Feasibility Ratio at various values of Scale of
Exponential Distribution.

The results indicate that lowering the value of the scale of the exponential distri-
bution improves the feasibility ratio. This result matches the expected behavior
since at lower values of σu , task systems with better utilization behavior are likely
to be generated.

33
Figure 4.7: Problem Complexity vs Feasibility Ratio at various values of Deadline
Range.

The results indicate that increasing the deadline range improves the feasibility
ratio. This is the expected behavior since the generator has a greater degree of
freedom in selecting deadlines when the deadline range is larger and the likelihood
of selecting deadlines that induce feasible task systems increases.

Problem Complexity vs Overall Utilization Analysis

The worst-case utilization of tasks is one of the random variables that is modeled
by the task system generation algorithm. However, the actual utilization can only
be observed after having performed a complete simulation of the system. The
simulation analysis of the overall system utilization is presented below. The system
has been simulated for 100 logical time-steps with the arrival rate λ = 2.0 to
generate these results.

34
Figure 4.8: Problem Complexity vs Overall Utilization at various values of
Problem Size

The results show a general trend of increasing overall system utilization upon
increasing the problem complexity. This behavior was expected since problems
with higher complexity have a need of fitting a greater number of tasks upon a
relatively smaller number of processors.

Furthermore, at the same complexity, with the increase in problem size, the results
show an increase in overall utilization. This is a bit of a mysterious result. However,
an investigation upon the relation of problem size with the formulated ILP sheds
light on the matter: with the increase in problem size, the number of constraints
in the ILP increases, which worsens (increases) the optimal value of the objective
(the overall utilization).

35
Figure 4.9: Problem Complexity vs Overall Utilization at various values of Scale
of Exponential Distribution

The result also shows increasing trend of overall utilization upon increasing problem
complexity.

Furthermore, with the increase in the scale of the exponential distribution used to
generate the task systems, the overall utilization has been observed to increase at
the same value of problem complexity. With the shrinking of the feasible region (as
was evident from the feasibility ratio analysis), at higher values of σu , the optimal
utilization is worsened (increased).

36
Figure 4.10: Problem Complexity vs Overall Utilization at various values of
Deadline Range

The result also shows increasing trend of overall utilization upon increasing problem
complexity.

Furthermore, at the same value of problem complexity, the overall utilization has
been observed to increase upon increasing the deadline range. The relation between
deadline range and overall utilization is implicit. The task system generation
algorithm (algorithm 1) generates WCETs as Cij ← ⌊Uij × Ti ⌋. With higher value
of deadline range, with the minimum deadline held constant, higher values of Ti
are generated which increase the values of Cij . Task systems with higher values of
WCETs naturally have a higher value of overall utilization.

37
4.2.4 Quantitative Analysis of LP Relaxation Method

Since the LP relaxation method finds optimal integer solutions which may or may
not be feasible upon the multiprocessor platform, the first property of the method
that has been analyzed is the feasibility ratio of a general population of tasksystems
when solved using the LP relaxation method against that using direct solution
methods (such as the quantum annealing method).

The feasibility ratio that contrasts the performance of LP relaxation method against
the direct methods is formalized as the following system parameter:

LP-feasibility ratio

The LP-feasibility ratio of a population of task systems where r of them are deemed
feasible by a direct method (for instance the quantum annealing method) and h
of them deemed feasible by both direct methods and by LP relaxation method is
given by:
h
lpf r = (4.14)
r
Intuitively, the LP-feasibility ratio depicts the proportion of tasksystems that is
correctly solved by the LP relaxation method even when the relaxed constraint
is taken into consideration. High values of the LP-feasibility ratio would indicate
high degree of usability and reliability of the LP relaxation method.

The analytical results depicting LP-feasibility ratio at various values of the system
parameters have been presented below.

38
Figure 4.11: Problem Size vs LP Feasibility Ratio at various values of Problem
Complexity

Figure 4.12: Problem Size vs LP Feasibility Ratio at various values of Scale of


Exponential Distribution

39
Figure 4.13: Problem Size vs LP Feasibility Ratio at various values of Deadline
Range

The results indicate a remarkable property of the LP relaxation method: that the
proportion of the tasksystem population that can be solved with feasibility by the
LP relaxation method tends to 1 as we increase the problem size, all else being
constant. It means that the LP relaxation method can be reliably used in practice
and the speedup it offers over its counterparts (evident from the subsequent runtime
analysis) makes it the preferred method for solving the partitioned scheduling
problem.

4.2.5 Quantitative Analysis of Algorithm Runtimes

The primary benefit of using quantum annealing for solving partitioned scheduling
problems is the speedup it offers over its counterparts. Google’s implementation
of the branch-and-bound algorithm for solving ILPs [21] [22] has been used for
comparison. It is a metaheuristic algorithm that is surprisingly more powerful
than the original branch and bound algorithm as are evident from the results that
follow. Furthermore, the LP relaxation method has also been analyzed and the

40
results have been presented subsequently.

The quantum annealing process has a unique method of estimating the runtime.
The process is illustrated below.

Figure 4.14: High-level view of the Overall Quantum Annealing Process

The results that follow depict the estimate for the runtimes provided by D-wave
systems for analysis and have been performed at the following values of the system
parameters.

S.N. Parameter Value


1. Deadline range (dr) 100
2. Scale of Exponential Distribution (σu ) 2.0
Table 4.4: Values of System Parameters used for the Analysis

The problem size vs runtime graphs have been depicted below for both the direct
methods and the LP relaxation method respectively.

41
Figure 4.15: Problem size vs Runtime for Branch-and-Bound and Quantum
Annealing algorithms (left) and the LP relaxation method (right)

The results show that the LP relaxation method is far superior to both quantum
annealing and branch and bound methods offering a speedup of over more than
50 times over the quantum annealing method and more than 100 times over the
branch and bound method for large enough problem sizes. Hence, the LP relaxation
method should be the preferred method for all problem sizes. However, if the
subsequent feasibility test fails, the direct methods should be employed.

The results also show that for problem sizes upto 1.25 × 106 , the runtimes of
Google’s branch and bound implementation and the quantum annealer are fairly
equal. However, beyond this limit, the quantum annealer is clearly faster than
its counterpart. It has to be noted that the metaheuristic improvements to the
branch-and-bound algorithms are really appreciable and should be preferred over
the quantum annealing method for problems below the limit due to the cost of
using the quantum computer. Quantum annealer should be used only for large
problems beyond this limit.

Also, it has been noted that beyond the problem size of 1.4 × 106 , the Branch and
Bound algorithm could not solve the problems even when run for more than an
hour. It probably shows that the NP-hard nature of the problem has finally caught
up with the classical algorithm.

42
CHAPTER 5

CONCLUSION AND FUTURE WORK

5.1 Conclusion

This work has successfully achieved partitioned scheduling of implicit-deadline,


hard real-time, recurrent, sporadic task systems on unrelated multiprocessor task
systems using quantum annealing and LP relaxation methods. The LP relaxation
method has been shown to be far superior to both quantum annealing and branch
and bound algorithm with metaheuristic improvements. Quantum supremacy of
quantum annealing has been demonstrated over the branch-and-bound algorithm
with metaheuristic improvements.

Furthermore, the proposed algorithm for multiprocessor task system generation


on unrelated platforms has been shown to be fast, stable and to reliably produce
feasible task systems within a certain range. This algorithm, along with knowledge
about its properties obtained from the analytical results, can be used for further
research work in the field.

Finally, an end-to-end framework has been established for simulation study of the
application of quantum as well as classical algorithms for scheduling of hard-real
time multiprocessor systems.

5.2 Future Work

The success of the LP-relaxation method has paved a way to analyze more complex
models of real-time systems that may arise in practice. This work has shown that
the NP-hard barrier of computation can be circumvented for the particular model
using the relaxation method. Similar solutions may be found on other models and
their applicability in practice can be analyzed in future research endeavours.

43
REFERENCES

[1] Sanjoy Baruah, Marko Bertogna, and Giorgio Buttazzo. Multiprocessor


scheduling for real-time systems. Springer, 2015.

[2] Sudhakar Sah and Vinay G Vaidya. A review of parallelization tools and
introduction to easypar. International Journal of Computer Applications,
56(12), 2012.

[3] Robert I Davis and Alan Burns. A survey of hard real-time scheduling for
multiprocessor systems. ACM computing surveys (CSUR), 43(4):1–44, 2011.

[4] Pontus Ekberg and Sanjoy Baruah. Partitioned scheduling of recurrent real-
time tasks. In 2021 IEEE Real-Time Systems Symposium (RTSS), pages
356–367. IEEE, 2021.

[5] Omar U Pereira Zapata and Pedro Mejıa Alvarez. Edf and rm multiproces-
sor scheduling algorithms: Survey and performance evaluation. Seccion de
Computacion Av. IPN, 2508, 2005.

[6] Tadashi Kadowaki and Hidetoshi Nishimori. Quantum annealing in the


transverse Ising model. , 58(5):5355–5363, November 1998.

[7] A. B. Finnila, M. A. Gomez, C. Sebenik, C. Stenson, and J. D. Doll. Quantum


annealing: A new method for minimizing multidimensional functions. Chemical
Physics Letters, 219(5):343–348, March 1994.

[8] Silvano Martello and Paolo Toth. Bin-packing problem. Knapsack problems:
Algorithms and computer implementations, pages 221–245, 1990.

[9] Farhang Nemati. Partitioned scheduling of real-time tasks on multi-core


platforms, May 2010.

[10] Christos H Papadimitriou and Kenneth Steiglitz. Combinatorial optimization:


algorithms and complexity. Courier Corporation, 1998.

44
[11] Aloysius Ka-Lau Mok. Fundamental design problems of distributed systems
for the hard-real-time environment. PhD thesis, Massachusetts Institute of
Technology, 1983.

[12] Chung Laung Liu and James W Layland. Scheduling algorithms for multi-
programming in a hard-real-time environment. Journal of the ACM (JACM),
20(1):46–61, 1973.

[13] Ernst Ising. Contribution to the theory of ferromagnetism. Z. Phys, 31(1):253–


258, 1925.

[14] William M Kaminsky and Seth Lloyd. Scalable architecture for adiabatic
quantum computing of np-hard problems. Quantum computing and quantum
bits in mesoscopic systems, pages 229–236, 2004.

[15] Michael A Nielsen and Isaac Chuang. Quantum computation and quantum
information, 2002.

[16] Francisco Barahona. On the computational complexity of ising spin glass


models. Journal of Physics A: Mathematical and General, 15(10):3241, 1982.

[17] Tadashi Kadowaki and Hidetoshi Nishimori. Quantum annealing in the


transverse ising model. Physical Review E, 58(5):5355, 1998.

[18] Razavy Mohsen. Quantum theory of tunneling, 2003.

[19] Mark W Johnson, Mohammad HS Amin, Suzanne Gildert, Trevor Lanting,


Firas Hamze, Neil Dickson, Richard Harris, Andrew J Berkley, Jan Johansson,
Paul Bunyk, et al. Quantum annealing with manufactured spins. Nature,
473(7346):194–198, 2011.

[20] Erwin Schrödinger. An undulatory theory of the mechanics of atoms and


molecules. Physical review, 28(6):1049, 1926.

[21] Ailsa H Land and Alison G Doig. An automatic method for solving discrete
programming problems. In 50 Years of Integer Programming 1958-2008, pages
105–132. Springer, 2010.

45
[22] Laurent Perron and Vincent Furnon. Or-tools. https://developers.google.
com/optimization/.

[23] Robert McNaughton. Scheduling with deadlines and loss functions. Manage-
ment science, 6(1):1–12, 1959.

[24] Xiuli Wang and TCE Cheng. Heuristics for parallel-machine scheduling with
job class setups and delivery to multiple customers. International Journal of
Production Economics, 119(1):199–206, 2009.

[25] Shijin Wang, Ruochen Wu, Feng Chu, and Jianbo Yu. Identical parallel
machine scheduling with assurance of maximum waiting time for an emergency
job. Computers & Operations Research, 118:104918, 2020.

[26] Lui Sha, Tarek Abdelzaher, Anton Cervin, Theodore Baker, Alan Burns,
Giorgio Buttazzo, Marco Caccamo, John Lehoczky, Aloysius K Mok, et al.
Real time scheduling theory: A historical perspective. Real-time systems,
28(2):101–155, 2004.

[27] Sanjoy Baruah, Vincenzo Bonifaci, Alberto Marchetti-Spaccamela, Leen


Stougie, and Andreas Wiese. A generalized parallel task model for recurrent
real-time processes. In 2012 IEEE 33rd Real-Time Systems Symposium, pages
63–72. IEEE, 2012.

[28] STMicroelectronics. STM32MP157C-DK2 data brief, 2019.

[29] Christian El Salloum, Martin Elshuber, Oliver Höftberger, Haris Isakovic,


and Armin Wasicek. The across mpsoc–a new generation of multi-core pro-
cessors designed for safety–critical embedded systems. Microprocessors and
Microsystems, 37(8):1020–1032, 2013.

[30] Ravikumar V Chakaravarthy, Hyun Kwon, and Hua Jiang. Vision control
unit in fully self driving vehicles using xilinx mpsoc and opensource stack. In
2021 26th Asia and South Pacific Design Automation Conference (ASP-DAC),
pages 311–317. IEEE, 2021.

[31] Lucas Mohimont, Mathias Roesler, Luiz Angelo Steffenel, Nathalie Gaveau,
Marine Rondeau, François Alin, Clément Pierlot, Rachel Ouvinha de Oliveira,

46
Marcello Coppola, and Philipe Doré. Ai-driven yield estimation using an
autonomous robot for data acquisition, 2021.

[32] Antoine Bertout, Joël Goossens, Emmanuel Grolleau, and Xavier Poczekajlo.
Workload assignment for global real-time scheduling on unrelated multicore
platforms. In Proceedings of the 28th International Conference on Real-Time
Networks and Systems, pages 139–148, 2020.

[33] J Brooke, David Bitko, Rosenbaum, and Gabriel Aeppli. Quantum annealing
of a disordered magnet. Science, 284(5415):779–781, 1999.

[34] Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. A quantum approximate
optimization algorithm. arXiv preprint arXiv:1411.4028, 2014.

[35] Alberto Peruzzo, Jarrod McClean, Peter Shadbolt, Man-Hong Yung, Xiao-Qi
Zhou, Peter J Love, Alán Aspuru-Guzik, and Jeremy L O’brien. A variational
eigenvalue solver on a photonic quantum processor. Nature communications,
5(1):1–7, 2014.

[36] Paul Benioff. The computer as a physical system: A microscopic quantum me-
chanical Hamiltonian model of computers as represented by Turing machines.
Journal of Statistical Physics, 22(5):563–591, May 1980.

[37] Andrew Lucas. Ising formulations of many np problems. Frontiers in physics,


page 5, 2014.

[38] Catherine McGeoch and Pau Farré. The d-wave advantage system: An
overview. D-Wave Systems Inc., Burnaby, BC, Canada, Tech. Rep, 2020.

[39] Philip Ball et al. First quantum computer to pack 100 qubits enters crowded
race. Nature, 599(7886):542–542, 2021.

[40] Ran Raz and Avishay Tal. Oracle separation of bqp and ph. In Proceedings
of the 51st annual ACM SIGACT symposium on theory of computing, pages
13–23, 2019.

[41] Andrew D King, Jack Raymond, Trevor Lanting, Sergei V Isakov, Masoud
Mohseni, Gabriel Poulin-Lamarre, Sara Ejtemaee, William Bernoudy, Isil

47
Ozfidan, Anatoly Yu Smirnov, et al. Scaling advantage over path-integral
monte carlo in quantum simulation of geometrically frustrated magnets. Nature
communications, 12(1):1–6, 2021.

[42] Isidore Heller and Charles B Tompkins. An extension of a theorem of dantzig’s.


In Linear Inequalities and Related Systems.(AM-38), Volume 38, pages 247–
254. Princeton University Press, 2016.

[43] Alan J Hoffman and Joseph B Kruskal. Integral boundary points of convex
polyhedra. In 50 Years of integer programming 1958-2008, pages 49–76.
Springer, 2010.

[44] Svatopluk Poljak and Zsolt Tuza. The expected relative error of the polyhedral
approximation of the max-cut problem. Operations Research Letters, 16(4):191–
198, 1994.

[45] David Avis and Jun Umemoto. Stronger linear programming relaxations of
max-cut. Mathematical Programming, 97(3):451–469, 2003.

[46] Antonio De Rosa and Aida Khajavirad. The ratio-cut polytope and k-means
clustering. SIAM Journal on Optimization, 32(1):173–203, 2022.

[47] Alberto Del Pia and Mingchen Ma. K-median: exact recovery in the extended
stochastic ball model. arXiv preprint arXiv:2109.02547, 2021.

[48] Alberto Del Pia and Aida Khajavirad. Rank-one boolean tensor factorization
and the multilinear polytope. arXiv preprint arXiv:2202.07053, 2022.

[49] Marko Bertogna. Evaluation of existing schedulability tests for global edf. In
2009 International Conference on Parallel Processing Workshops, pages 11–18.
IEEE, 2009.

[50] Dwave Systems. Constrained quadratic models. Extracted electronically from:


https://docs.ocean.dwavesys.com/en/stable/concepts/cqm.html, May 2022.

[51] Gary Kochenberger, Jin-Kao Hao, Fred Glover, Mark Lewis, Zhipeng Lü,
Haibo Wang, and Yang Wang. The unconstrained binary quadratic program-

48
ming problem: a survey. Journal of combinatorial optimization, 28(1):58–81,
2014.

[52] Harold W Kuhn and Albert W Tucker. Nonlinear programming. In Traces


and emergence of nonlinear programming, pages 247–258. Springer, 2014.

[53] William Karush. Minima of functions of several variables with inequalities as


side constraints. M. Sc. Dissertation. Dept. of Mathematics, Univ. of Chicago,
1939.

[54] Dwave Systems. Hybrid solver for constrained quadratic models -


dwavesys.com, May 2022.

[55] Giorgio C Buttazzo. Hard real-time computing systems: predictable scheduling


algorithms and applications, volume 24. Springer Science & Business Media,
2011.

[56] Michael Dertouzos. Control robotics: The procedural control of physical


processes. In Proc. IFIP congress, pages 807–813, 1974.

[57] George B Dantzig. Origins of the simplex method. In A history of scientific


computing, pages 141–151. 1990.

[58] Steven S Morgan. A comparison of simplex method algorithms. PhD thesis,


University of Florida, 1997.

49

You might also like