<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Performance Evaluation of Transaction Handling Policies on Real-Time DBMS Prototype</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>© Alexander Zharkov</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Penza State University zharkov@sura.ru</string-name>
        </contrib>
      </contrib-group>
      <abstract>
        <p>We have implemented Soft Real-Time DBMS prototype called ZDBMS. Using this prototype we have investigated performance for commonly used policies EDF, LSF and for new transaction handling policy SPF oriented for using in cases when transactions have different static priorities. The results represent these policies performance for equal sets of experiments.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Preface</title>
      <p>At present more and more industrial applications
interacts in real time. Some of them are manipulating
with large amounts of information. So they need in
realtime databases and appropriate transaction handling.
There is a wide area of industrial applications
concerned with process control and SCADA systems
which need in specialized real-time database servers.
These systems have some distinctive features such as:
- lifecycle is divided into two parts — design-time
and work time;</p>
      <p>- database clients have limited subset of SQL query
templates, and these templates are constant in
worktime part;</p>
      <p>- sensor and system transactions have different static
priorities which reflects subsequent transaction
semantics;</p>
      <p>- user transactions usually takes much longer time
then sensor and system ones;</p>
      <p>These features exert influence on transaction
handling of Real-Time Database Management System
(RT DBMS) used with SCADA system. Traditional
works on RT DBMS scheduling policies considers
transaction and data consistency taking into account
only transaction deadlines and data deadlines. We
propose new transaction handling policy which takes
into account transaction flow irregularity represented by
different static transactions priorities.</p>
      <p>Another problem is that some critical (high-priority)
sensor or system transactions fails due-to long user
query transactions are executed on database server. We
decided to use the mechanism of precompiled
materialized views for remote database clients.
Although influence of materialized views on system
performance is not investigated in this paper
materialized views management subsystem is the part of
client system architecture.</p>
      <p>In this paper we describe Soft Real-Time DBMS
prototype architecture which implements model for
investigating transaction handling policies. In
performance evaluation distributed system is used to
minimize influence clients (transaction generators) on
database server performance.</p>
      <sec id="sec-1-1">
        <title>Related Works</title>
        <p>There are a lot of works concerned with transaction
handling policies so we will mention only papers which
results have influenced on this work. Common
transaction handling aspects in Real-Time DBMS were
considered in [1, 2, 4]. Issues with Timing constraints
were described in [3]. Works [5] and [6] are concerns
with practical implementation of real-time transaction
handling. Real-Time DBMS peculiarity is that research
in this area tightly correlated with investigations in area
of temporal and active database management systems.
Survey on active databases represented in [7] while
temporal DBMS is fully described in [8]. During
developing query subsystem we investigated commonly
used query optimization techniques (represented in [9]).
Modern line of investigations in multi-query
optimizations which used in materialized views support
subsystem represented in [10].</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2 Supported transaction model</title>
      <p>Supported transaction model is based on composite
transactions which can be divided into subset of
microtransactions (atomic transactions such as add row,
modify row, etc.). If atomic transaction fails all
composite transaction is being revoked.</p>
      <p>
        Transaction taxonomy represented in Figure 1. It
describes transactions RT transactions which can appear
in typical SCADA system and respectively in
appropriate Real-Time DBMS.
wmicro = x, d , p, m, ta , trvi , texec , tend , (
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
where x — db object which corresponds to given
transaction;
d — data associated with atomic transaction;
p — static transaction priority;
m — atomic transaction type, m ∈ M , M={Add,
GroupAdd, Insert, GroupInsert, Modify, GroupModify,
ScanModify, Delete, GroupDelete, ScanDelete,
ScanSelect, ScanSelectID, ScanIndex, ScanSort,
NestedLoopsJoin, NestedLoopsIndexJoin, HashJoin}
— set of possible atomic transaction types;
ta — timestamp represents arrival time;
trvi — relative validity interval — time interval
when data associated with transaction keeps its validity;
texec — timestamp represents execution beginning;
— timestamp represents transaction end time
tend
(failure or success);
      </p>
    </sec>
    <sec id="sec-3">
      <title>3 Real-Time DBMS prototype architecture</title>
      <p>Implemented experiment system contains two types of
RT DBMS prototype applications:</p>
      <p>- dedicated server — RT DBMS server which
handles clients requests</p>
      <p>- transaction generator — this application emulates
clients activity and combines pure transaction generator
with RT DBMS server to handle queries to materialized
views (materialized views influence is not evaluated in
this paper).</p>
      <p>Both application types are based on common system
architecture represented in illustration below (Figure 2).
Main components are: Network Manager, Transaction
Decomposer, Query Manager, Priority Manager,
Transaction Scheduler, Transaction Pool and
DBobjects Manager</p>
      <sec id="sec-3-1">
        <title>Network Manager</title>
        <p>Network Manager handles all communication between
current server and over applications. Communication is
based on own protocol, which supports control packets
and transaction packets. This protocol is datagram
protocol based upon UDP protocol. Network Manager
stores its own settings (clients/servers map, datagram
resend policy etc) in XML configuration file which can
be loaded from the disk or sent throw the LAN by using
special control packet.</p>
      </sec>
      <sec id="sec-3-2">
        <title>Transaction Decomposer</title>
        <p>Transaction decomposer receives waiting transaction
from the Network Manager queue, decomposes
transaction into atomic transactions and passes
microtransactions subset either to Query Manager (for user
queries) or to Transaction Scheduler queue.
Transaction scheduler is component which handles all
atomic transactions sets and assigns them into
unoccupied threads from transaction thread pool.
Transaction Scheduler has special thread used for
synchronization — all scheduling actions are performed
within this thread to avoid resource management
deadlocks.</p>
        <p>All atomic transaction sets are waiting for their
assignment in queue. In each scheduling step
Transaction Scheduler checks this queue for failed
transactions to return failed transaction back to the
client.</p>
        <p>When assigning transaction to the thread
Transaction scheduler uses priority returned by Priority
Manager in compliance with current transaction
handling policy.</p>
      </sec>
      <sec id="sec-3-3">
        <title>Transaction Pool</title>
        <p>Transaction Pool is a set of threads capable of
transaction executing. When transaction is assigned to
the subsequent thread this thread locks object need for
the first atomic transaction in the set. For locking Db
object two-phase locking method used. First Lock is
made by synchronization thread of Transaction
Scheduler and second phase is performed by transaction
executing thread. In execution step transaction is
checked for data consistency and is aborted if deadline
or data-deadline achieved. So all the transaction
scheduling policies has data consistency check, but –
DC suffix is omitted.</p>
      </sec>
      <sec id="sec-3-4">
        <title>DB-objects Manager</title>
        <p>Objects Manager is the component which represents
InMemory database. It supports the following object
types: tables; indexes (B-tree index); hashes;
materialized views;</p>
        <p>All objects represented in block-list (or paged)
structure. Access to each object can be locked on
pagelevel. Each object has a set of temporal attributes used
in priority handling. Let X is object in RT DBMS then
it has the following attributes:</p>
        <p>LUT(X) — last update time of the X object — this
time is calculated automatically by system;</p>
        <p>RVI(X) — relative validity interval — this value is
set to each object at the design time. It represents time
interval in which object keeps its validity;</p>
        <p>AVI ( X ) — Absolute Validity Interval is the time
interval which can be calculated as follows:</p>
        <p>
          AVI ( X ) = [LUT ( X ), LUT ( X ) + RVI ( X )] (
          <xref ref-type="bibr" rid="ref2">2</xref>
          )
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4 Transaction handling policies</title>
      <p>
        All transaction handling (scheduling) policies are based
on transaction model represented in (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ), temporal object
properties LUT(X), RVI(X), AVI(X) and a subset of
dynamic transaction properties described below.
      </p>
      <sec id="sec-4-1">
        <title>Dynamic transaction properties</title>
        <p>
          — transaction deadline is defined as
DL(T ) = ta + min(RVI (d ), trvi ) , (
          <xref ref-type="bibr" rid="ref3">3</xref>
          )
        </p>
        <p>—data deadline depends on temporal</p>
        <p>DL(T )
follows:</p>
        <p>
          DDL(T )
object properties:
DDL(T ) = AVI ( x) = LUT ( x) + RVI ( x) (
          <xref ref-type="bibr" rid="ref4">4</xref>
          )
EET (T ) = f ( x, d , m)
—
estimated execution
time is the function which depends on transaction type,
transaction data and object statistics.
        </p>
        <p>ETT (T ) — execution transaction time is defined
as follows::</p>
        <p>
          ETT (T ) = now() − texec , (
          <xref ref-type="bibr" rid="ref5">5</xref>
          )
where now() — special temporal function which
returns current system time.
        </p>
        <p>SF (T ) — slack factor is a parameter which takes
into account estimated amount of time to transaction
deadline. Slack factor is defined as follows:</p>
        <p>
          SF (T ) = DL(T ) − (now() + EET (T )) . (
          <xref ref-type="bibr" rid="ref6">6</xref>
          )
PR(T )
        </p>
        <p>
          — proposed function which combines
traditional priority handling policies (EDF, EDDF,
LSF). We define this function as :
PR(T ) = PREDF (T ) × (1 − μ ) +
μ
SF (T ) − 1
, (
          <xref ref-type="bibr" rid="ref7">7</xref>
          )
where PREDF (T ) (
          <xref ref-type="bibr" rid="ref8">8</xref>
          ) — priority handling function
which combines EDF and EDDF policies is defined as:
PREDF (T ) = (α × DDL(T ) + (1 −α )× DL(T )) (
          <xref ref-type="bibr" rid="ref8">8</xref>
          )
        </p>
        <sec id="sec-4-1-1">
          <title>Parameters α</title>
          <p>and μ
are tuning parameters and
used to handle which policy should be used at current
moment.</p>
          <p>To include semantic priority to this policy
combining functions we introduce priority comparison
function PRc defined as:</p>
          <p>
            PRc (T1 , T2 ) = β × SIGN ( p(T1 ) − p(T2 )) +
(1 − β )× SIGN (PR(T1 ) − PR(T2 ))
, (
            <xref ref-type="bibr" rid="ref9">9</xref>
            )
where β ∈ [0,1] — tuning parameter which helps to
combine static priority p(T ) with dynamic priority
          </p>
        </sec>
        <sec id="sec-4-1-2">
          <title>PR(T ) defined in (7);</title>
          <p>1,if v &gt;= 0
SIGN (v) = 
0,if v &lt; 0</p>
          <p>— sign function.</p>
          <p>As result we have a set of functions which can be
used to combine different transaction handling policies
at the same time by using tuning parameters α ,β , μ .</p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>Transaction handling policies supported by RT</title>
      </sec>
      <sec id="sec-4-3">
        <title>DBMS prototype</title>
        <p>
          EDF — Earliest Deadline First — this scheduling
policy is historically first. It takes into account only
transaction deadlines. Tuning parameters for it
according to (
          <xref ref-type="bibr" rid="ref7 ref8 ref9">7-9</xref>
          ) are α = 0, β &lt; 0.5,μ = 0 .
EDDF — Earliest Data Deadline First — transactions
with earliest data deadline served first. This strategy
does not takes into account transaction deadline. Tuning
parameters for it are α = 1, β &lt; 0.5, μ = 0 .
Hybrid — Hybrid approach — takes into account both
transaction and data deadline. Here tuning parameter
α is defined as:
 ETT (T )

α =  EET (T )

1, ETT (T ) &gt; EET (T )
, ETT (T ) ≤ EET (T )
(
          <xref ref-type="bibr" rid="ref10">10</xref>
          ).
        </p>
        <p>
          Other tuning parameters are β &lt; 0.5,μ = 0 .
HH — Half-Half approach — another way to
compromise between transaction and data deadline.
Here α is defined as:
 ETT (T ) ETT (T )
 ,
 EET (T ) EET (T )
α = 
1, ETT (T ) &gt; 0.5
 EET (T )
≤ 0.5
(
          <xref ref-type="bibr" rid="ref11">11</xref>
          )
LSF — Least Slack First — highest priority is assigned
to transactions with least positive slack factor. Tuning
parameters are β &lt; 0.5, μ = 1 , parameterα does not
influence on transation priority for this policy.
EDF-DC and LSF-DC — policies are similar to EDF
and LSF except in each execution step they have data
consistency check (fails if data deadline detected).
SPF — Static Priority First — newly proposed strategy
which takes into account transaction semantics through
its static priority. In this strategy static priority is more
valuable then dynamic temporal priorities. Tuning
parameters for this policy is β &gt; 0.5 , parameters α
and μ , depends on secondary temporal policy. This
policy could be used in systems which have a variety of
transaction types with different semantic priorities.
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5 Performance evaluation results</title>
      <p>Performance evaluation in this paper is devoted to
comparison of proposed SPF policy with EDF and LSF
policies. All policies are used with data consistency
check, so we omit –DC suffix.</p>
      <p>Experiment system has two PC connected through
100 Mbit Ethernet. One PC was used for dedicated
server and another one for transaction generator.
Dedicated server had test database with 20 tables (each
table with 10000 rows, RVI(X)=100ms). Server had
transaction pool with 10 threads. Transaction generator
had 10 generation threads each generates 2 transactions
(with static priority 100 and 500) per time. Generation
period varies from 10 to 300 ms. Generated transactions
are uniformly distributed within generation period.
Relative validity interval for transaction data is
t rvi =40ms. Each generated transaction contains 1000
atomic transactions of ModifyRow type.</p>
      <p>For each generation period there was 10 test with
1000 transactions generated. After each test application
was reloaded. For each test average miss ratio was
calculated (miss ration = failed count / total count) and
average miss ratio for high-priority (500) and
lowpriority (100) transactions. Tables 1 and 2 contain
performance evaluation results for each policy
represented with total miss ratio (Table 1) and miss
ratio for high-priority transactions (Table 2). Figure 3
contains appropriate diagram.</p>
    </sec>
    <sec id="sec-6">
      <title>6 Further work</title>
      <p>As further work we consider more experiments with
scheduling policies with evaluating SPF policy
performance in dependence of β tuning parameters.
Another direction of further experiments is
investigating of materialized views using influence on
common system performance. This work is concerned
with tuning parameters and scheduling policy for
clientside server, which handles materialized views. And as
final part we propose the experiments on computational
system which simulates real SCADA system with
appropriate database structure and hosts configuration.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Patrick</given-names>
            <surname>E. O'Neil</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Ramamritham</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Calton</given-names>
            <surname>Pu</surname>
          </string-name>
          .
          <article-title>Towards Predictable Transaction Execution in Real-Time Database Systems</article-title>
          . Dept. of Computer Sc.,
          <source>Univ. of Massachusetts</source>
          , 1995
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Shuoqi</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Ying</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <surname>Sang H. Son</surname>
            , John A. Stankovic,
            <given-names>Yuan</given-names>
          </string-name>
          <string-name>
            <surname>Wei</surname>
          </string-name>
          .
          <article-title>Event Detection Services Using Data Service Middleware in Distributed Sensor Networks</article-title>
          . Department of Computer Science, University of Virginia. Kluwer Academic Publishers. Printed in the Netherlands,
          <year>2003</year>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>K.</given-names>
            <surname>Ramamritham</surname>
          </string-name>
          .
          <article-title>Time for Real-Time Temporal Databases</article-title>
          . Dept. of Computer Sc.,
          <source>Univ. of Massachusetts</source>
          , 1995
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J. R.</given-names>
            <surname>Haritsa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Ramamritham</surname>
          </string-name>
          .
          <article-title>Real-Time Database Systems in the New Millennium</article-title>
          . Dept. of Computer Sc.,
          <source>Univ. of Massachusetts</source>
          , 1999
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Chanjung</given-names>
            <surname>Park</surname>
          </string-name>
          , Seog Park,
          <string-name>
            <surname>Sang</surname>
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Son</surname>
          </string-name>
          .
          <article-title>Multiversion Locking Protocol with Freezing for Secure Real-Time Database Systems</article-title>
          .
          <article-title>IEEE transactions on knowledge and data engineering</article-title>
          , vol.
          <volume>14</volume>
          , no.
          <issue>5</issue>
          , september/october 2002
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>John</surname>
            <given-names>A Stankovic</given-names>
          </string-name>
          , Marco Spuri, Marco Di Natale,
          <string-name>
            <given-names>Giorgio</given-names>
            <surname>Buttazzoy</surname>
          </string-name>
          .
          <article-title>Implications of Classical Scheduling Results For Real-Time Systems</article-title>
          . June 23 1994
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Norman</surname>
            <given-names>W.</given-names>
          </string-name>
          <string-name>
            <surname>Paton</surname>
          </string-name>
          , Oscar Di´az,
          <source>Active Database Systems. // ACM Computing Surveys</source>
          , Vol.
          <volume>31</volume>
          , No. 1,
          <string-name>
            <surname>March</surname>
            <given-names>1999</given-names>
          </string-name>
          , p
          <fpage>63</fpage>
          -
          <lpage>103</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Christian</surname>
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Jensen</surname>
          </string-name>
          .
          <article-title>Temporal Database Management</article-title>
          .
          <source>Dr. techn. Thesis, defended April</source>
          <year>2000</year>
          , http://www.cs.auc.dk/~csj/Thesis/
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Joseph</surname>
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Hellerstein</surname>
          </string-name>
          .
          <article-title>Optimization and Execution Techniques for Queries with Expensive Methods. Doctor of Philosophy dissertation</article-title>
          . University of Wisconsin-Madison,
          <year>1995</year>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Prasan</given-names>
            <surname>Roy</surname>
          </string-name>
          .
          <article-title>Multy-Query Optimization and Applications</article-title>
          .
          <source>Doctor Of Philosophy degree thesis</source>
          , Department of Computer Science and Engineering, Indian Institute of Technology, Bombay,
          <year>2000</year>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>A. V.</given-names>
            <surname>Zharkov</surname>
          </string-name>
          .
          <article-title>Using SQL to Access Data of SCADA KRUG-2000</article-title>
          .
          <source>In Proceedings of international scientific and technical conference "Automation and Management Problems in Engineering Systems". Penza</source>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>B. D.</given-names>
            <surname>Shashkov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. V.</given-names>
            <surname>Zharkov</surname>
          </string-name>
          .
          <article-title>Microtransaction Handling in Real-Time Database Management Systems</article-title>
          .
          <source>In Proceedings of Computer-Based Conference "Contemporary information technologies - 2005". Penza</source>
          ,
          <year>2005</year>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>A. V.</given-names>
            <surname>Zharkov</surname>
          </string-name>
          .
          <article-title>Distributed Real-Time Database Management System Prototype for Transaction Handling Methods Simulation</article-title>
          .
          <source>In Proceedings of scientific and technical conference "Microsoft Technologies in Programming Theory and Practice". N. Novgorod</source>
          ,
          <year>2007</year>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>