Changeset 3056 for docs/Balisage13


Ignore:
Timestamp:
Apr 19, 2013, 4:29:53 PM (6 years ago)
Author:
lindanl
Message:

Add introduction section

Location:
docs/Balisage13/Bal2013came0601
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • docs/Balisage13/Bal2013came0601/Bal2013came0601.html

    r3055 r3056  
    274274</div>
    275275<div id="mast"><div class="content">
    276 <h2 class="article-title" id="idp66368"></h2>
     276<h2 class="article-title" id="idp246336"></h2>
    277277<div class="author">
    278278<h3 class="author">Nigel Medforth</h3>
     
    324324</div>
    325325<div class="mast-box">
    326 <p class="title"><a href="javascript:toggle('idp67488')" class="quiet"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp67488"></a> <span onclick="javascript:toggle('idp67488');return true">Abstract</span></p>
    327 <div class="folder" id="folder-idp67488" style="display:none"><p id="idp67792">Prior research on the acceleration of XML processing using SIMD and multi-core
     326<p class="title"><a href="javascript:toggle('idp73632')" class="quiet"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp73632"></a> <span onclick="javascript:toggle('idp73632');return true">Abstract</span></p>
     327<div class="folder" id="folder-idp73632" style="display:none"><p id="idp73936">Prior research on the acceleration of XML processing using SIMD and multi-core
    328328            parallelism has lead to a number of interesting research prototypes. This work
    329329            investigates the extent to which the techniques underlying these prototypes could result
     
    339339<p><b>Table of Contents</b></p>
    340340<dl>
    341 <dt><span class="section"><a href="#idp276064" class="toc">Introduction</a></span></dt>
    342 <dt><span class="section"><a href="#idp277856" class="toc">Background</a></span></dt>
     341<dt><span class="section"><a href="#idp281488" class="toc">Introduction</a></span></dt>
     342<dt><span class="section"><a href="#idp288352" class="toc">Background</a></span></dt>
    343343<dd><dl>
    344 <dt><span class="section"><a href="#idp278496" class="toc">Xerces C++ Structure</a></span></dt>
    345 <dt><span class="section"><a href="#idp333696" class="toc">The Parabix Framework</a></span></dt>
    346 <dt><span class="section"><a href="#idp426176" class="toc">Sequential vs. Parallel Paradigm</a></span></dt>
     344<dt><span class="section"><a href="#idp288992" class="toc">Xerces C++ Structure</a></span></dt>
     345<dt><span class="section"><a href="#idp343824" class="toc">The Parabix Framework</a></span></dt>
     346<dt><span class="section"><a href="#idp436192" class="toc">Sequential vs. Parallel Paradigm</a></span></dt>
    347347</dl></dd>
    348 <dt><span class="section"><a href="#idp430592" class="toc">Architecture</a></span></dt>
     348<dt><span class="section"><a href="#idp440608" class="toc">Architecture</a></span></dt>
    349349<dd><dl>
    350 <dt><span class="section"><a href="#idp431264" class="toc">Overview</a></span></dt>
    351 <dt><span class="section"><a href="#idp460576" class="toc">Character Set Adapters</a></span></dt>
    352 <dt><span class="section"><a href="#idp468560" class="toc">Combined Parallel Filtering</a></span></dt>
    353 <dt><span class="section"><a href="#idp485632" class="toc">Content Stream</a></span></dt>
    354 <dt><span class="section"><a href="#idp496352" class="toc">Namespace Handling</a></span></dt>
    355 <dt><span class="section"><a href="#idp539680" class="toc">Error Handling</a></span></dt>
     350<dt><span class="section"><a href="#idp441280" class="toc">Overview</a></span></dt>
     351<dt><span class="section"><a href="#idp471264" class="toc">Character Set Adapters</a></span></dt>
     352<dt><span class="section"><a href="#idp479120" class="toc">Combined Parallel Filtering</a></span></dt>
     353<dt><span class="section"><a href="#idp496160" class="toc">Content Stream</a></span></dt>
     354<dt><span class="section"><a href="#idp506880" class="toc">Namespace Handling</a></span></dt>
     355<dt><span class="section"><a href="#idp550288" class="toc">Error Handling</a></span></dt>
    356356</dl></dd>
    357 <dt><span class="section"><a href="#idp549968" class="toc">Multithreading with Pipeline Parallelism</a></span></dt>
    358 <dt><span class="section"><a href="#idp572016" class="toc">Performance</a></span></dt>
     357<dt><span class="section"><a href="#idp560576" class="toc">Multithreading with Pipeline Parallelism</a></span></dt>
     358<dt><span class="section"><a href="#idp582480" class="toc">Performance</a></span></dt>
    359359<dd><dl>
    360 <dt><span class="section"><a href="#idp574736" class="toc">Xerces C++ SAXCount</a></span></dt>
    361 <dt><span class="section"><a href="#idp598880" class="toc">GML2SVG</a></span></dt>
     360<dt><span class="section"><a href="#idp585200" class="toc">Xerces C++ SAXCount</a></span></dt>
     361<dt><span class="section"><a href="#idp609984" class="toc">GML2SVG</a></span></dt>
    362362</dl></dd>
    363 <dt><span class="section"><a href="#idp624032" class="toc">Conclusion and Future Work</a></span></dt>
     363<dt><span class="section"><a href="#idp627056" class="toc">Conclusion and Future Work</a></span></dt>
    364364</dl>
    365365</div>
    366366<div class="mast-box">
    367 <p class="title"><a href="javascript:toggle('idp69216')" class="linkbox"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp69216"></a> <span onclick="javascript:toggle('idp69216');return true">Nigel Medforth</span></p>
    368 <div class="folder" id="folder-idp69216" style="display:none">
     367<p class="title"><a href="javascript:toggle('idp75360')" class="linkbox"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp75360"></a> <span onclick="javascript:toggle('idp75360');return true">Nigel Medforth</span></p>
     368<div class="folder" id="folder-idp75360" style="display:none">
    369369<h5 class="author-email"><code class="email">&lt;<a class="email" href="mailto:nmedfort@sfu.ca">nmedfort@sfu.ca</a>&gt;</code></h5>
    370370<div class="affiliation">
     
    377377</div>
    378378<div class="personblurb">
    379 <p id="idp50976">Nigel Medforth is a M.Sc. student at Simon Fraser University and the lead
     379<p id="idp57680">Nigel Medforth is a M.Sc. student at Simon Fraser University and the lead
    380380               developer of icXML. He earned a Bachelor of Technology in Information Technology at
    381381               Kwantlen Polytechnic University in 2009 and was awarded the Dean’s Medal for
    382382               Outstanding Achievement.</p>
    383 <p id="idp51984">Nigel is currently researching ways to leverage both the Parabix framework and
     383<p id="idp58688">Nigel is currently researching ways to leverage both the Parabix framework and
    384384               stream-processing models to further accelerate XML parsing within icXML.</p>
    385385</div>
     
    387387</div>
    388388<div class="mast-box">
    389 <p class="title"><a href="javascript:toggle('idp55648')" class="linkbox"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp55648"></a> <span onclick="javascript:toggle('idp55648');return true">Dan Lin</span></p>
    390 <div class="folder" id="folder-idp55648" style="display:none">
     389<p class="title"><a href="javascript:toggle('idp62352')" class="linkbox"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp62352"></a> <span onclick="javascript:toggle('idp62352');return true">Dan Lin</span></p>
     390<div class="folder" id="folder-idp62352" style="display:none">
    391391<h5 class="author-email"><code class="email">&lt;<a class="email" href="mailto:lindanl@sfu.ca">lindanl@sfu.ca</a>&gt;</code></h5>
    392392<div class="affiliation">
     
    394394<p class="orgname">Simon Fraser University </p>
    395395</div>
    396 <div class="personblurb"><p id="idp57360">Dan Lin is a Ph.D student at Simon Fraser University. She earned a Master of Science
     396<div class="personblurb"><p id="idp64064">Dan Lin is a Ph.D student at Simon Fraser University. She earned a Master of Science
    397397             in Computing Science at Simon Fraser University in 2010. Her research focus on on high
    398398             performance algorithms that exploit parallelization strategies on various multicore platforms.
     
    401401</div>
    402402<div class="mast-box">
    403 <p class="title"><a href="javascript:toggle('idp59920')" class="linkbox"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp59920"></a> <span onclick="javascript:toggle('idp59920');return true">Kenneth Herdy</span></p>
    404 <div class="folder" id="folder-idp59920" style="display:none">
     403<p class="title"><a href="javascript:toggle('idp66624')" class="linkbox"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp66624"></a> <span onclick="javascript:toggle('idp66624');return true">Kenneth Herdy</span></p>
     404<div class="folder" id="folder-idp66624" style="display:none">
    405405<h5 class="author-email"><code class="email">&lt;<a class="email" href="mailto:ksherdy@sfu.ca">ksherdy@sfu.ca</a>&gt;</code></h5>
    406406<div class="affiliation">
     
    409409</div>
    410410<div class="personblurb">
    411 <p id="idp61648"> Ken Herdy completed an Advanced Diploma of Technology in Geographical Information
     411<p id="idp68352"> Ken Herdy completed an Advanced Diploma of Technology in Geographical Information
    412412               Systems at the British Columbia Institute of Technology in 2003 and earned a Bachelor
    413413               of Science in Computing Science with a Certificate in Spatial Information Systems at
    414414               Simon Fraser University in 2005. </p>
    415 <p id="idp262928"> Ken is currently pursuing PhD studies in Computing Science at Simon Fraser
     415<p id="idp268240"> Ken is currently pursuing PhD studies in Computing Science at Simon Fraser
    416416               University with industrial scholarship support from the Natural Sciences and
    417417               Engineering Research Council of Canada, the Mathematics of Information Technology and
     
    423423</div>
    424424<div class="mast-box">
    425 <p class="title"><a href="javascript:toggle('idp265664')" class="linkbox"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp265664"></a> <span onclick="javascript:toggle('idp265664');return true">Rob Cameron</span></p>
    426 <div class="folder" id="folder-idp265664" style="display:none">
     425<p class="title"><a href="javascript:toggle('idp270976')" class="linkbox"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp270976"></a> <span onclick="javascript:toggle('idp270976');return true">Rob Cameron</span></p>
     426<div class="folder" id="folder-idp270976" style="display:none">
    427427<h5 class="author-email"><code class="email">&lt;<a class="email" href="mailto:cameron@cs.sfu.ca">cameron@cs.sfu.ca</a>&gt;</code></h5>
    428428<div class="affiliation">
     
    434434<p class="orgname">International Characters, Inc.</p>
    435435</div>
    436 <div class="personblurb"><p id="idp267328">Dr. Rob Cameron is Professor of Computing Science and Associate Dean of Applied
     436<div class="personblurb"><p id="idp272640">Dr. Rob Cameron is Professor of Computing Science and Associate Dean of Applied
    437437               Sciences at Simon Fraser University. His research interests include programming
    438438               language and software system technology, with a specific focus on high performance
     
    450450<div id="main">
    451451<div class="article">
    452 <h2 class="article-title" id="idp66368"></h2>
    453 <div class="section" id="idp276064">
     452<h2 class="article-title" id="idp246336"></h2>
     453<div class="section" id="idp281488">
    454454<h2 class="title" style="clear: both">Introduction</h2>
    455 <p id="idp276704"></p>
    456 <p id="idp276960"></p>
    457 <p id="idp277216"></p>
    458 <p id="idp277472"></p>
    459 </div>
    460 <div class="section" id="idp277856">
     455<p id="idp282128">   
     456        Parallelization and acceleration of XML parsing is a widely
     457        studied problem that has seen the development of a number
     458        of interesting research prototypes using both SIMD and
     459        multicore parallelism.   Most works have investigated
     460        data parallel solutions on multicore
     461        architectures using various strategies to break input
     462        documents into segments that can be allocated to different cores.
     463        For example, one possibility for data
     464        parallelization is to add a pre-parsing step to compute
     465        a skeleton tree structure of an  XML document \cite{GRID2006}.
     466        The parallelization of the pre-parsing stage itself can be tackled with
     467        state machines \cite{E-SCIENCE2007, IPDPS2008}.
     468        Methods without pre-parsing have used speculation \cite{HPCC2011} or post-processing that
     469        combines the partial results \cite{ParaDOM2009}.
     470        A hybrid technique that combines data and pipeline parallelism was proposed to
     471        hide the latency of a "job" that has to be done sequentially \cite{ICWS2008}.
     472      </p>
     473<p id="idp283520">
     474        Fewer efforts have investigated SIMD parallelism, although this approach
     475        has the potential advantage of improving single core performance as well
     476        as offering savings in energy consumption \cite{HPCA2012}.
     477        Intel introduced specialized SIMD string processing instructions in the SSE 4.2 instruction set extension
     478        and showed how they can be used to improve the performance of XML parsing \cite{XMLSSE42}.
     479        The Parabix framework uses generic SIMD extensions and bit parallel methods to
     480        process hundreds of XML input characters simultaneously \cite{Cameron2009, cameron-EuroPar2011}.
     481        Parabix prototypes have also combined SIMD methods with thread-level parallelism to
     482        achieve further acceleration on multicore systems \cite{HPCA2012}.
     483      </p>
     484<p id="idp285424">
     485        In this paper, we move beyond research prototypes to consider
     486        the detailed integration of both SIMD and multicore parallelism into the
     487        Xerces-C++ parser of the Apache Software Foundation, an existing
     488        standards-compliant open-source parser that is widely used
     489        in commercial practice.    The challenge of this work is
     490        to parallelize the Xerces parser in such a way as to
     491        preserve the existing APIs as well as offering worthwhile
     492        end-to-end acceleration of XML processing.   
     493        To achieve the best results possible, we undertook
     494        a nine-month comprehensive restructuring of the Xerces-C++ parser,
     495        seeking to expose as many critical aspects of XML parsing
     496        as possible for parallelization, the result of which we named icXML.   
     497        Overall, we employed Parabix-style methods of transcoding, tokenization
     498        and tag parsing, parallel string comparison methods in symbol
     499        resolution, bit parallel methods in namespace processing,
     500        as well as staged processing using pipeline parallelism to take advantage of
     501        multiple cores.
     502      </p>
     503<p id="idp286864">
     504        The remainder of this paper is organized as follows.   
     505        Section \ref{background} discusses the structure of the Xerces and Parabix XML parsers and the fundamental
     506        differences between the two parsing models.   
     507        Section \ref{architecture} then presents the icXML design based on a restructured Xerces architecture to
     508        incorporate SIMD parallelism using Parabix methods.   
     509        Section \ref{multithread} moves on to consider the multithreading of the icXML architecture
     510        using the pipeline parallelism model. 
     511        Section \ref{performance} analyzes the performance of both the single-threaded and
     512        multi-threaded versions of icXML in comparison to original Xerces,
     513        demonstrating substantial end-to-end acceleration of
     514        a GML-to-SVG translation application written against the Xerces API.
     515        Section \ref{conclusion} concludes the paper with a discussion of future work and the potential for
     516        applying the techniques discussed herein in other application domains.
     517      </p>
     518</div>
     519<div class="section" id="idp288352">
    461520<h2 class="title" style="clear: both">Background</h2>
    462 <div class="section" id="idp278496">
     521<div class="section" id="idp288992">
    463522<h3 class="title" style="clear: both">Xerces C++ Structure</h3>
    464 <p id="idp279136"> The Xerces C++ parser is a widely-used standards-conformant
     523<p id="idp289632"> The Xerces C++ parser is a widely-used standards-conformant
    465524            XML parser produced as open-source software
    466525             by the Apache Software Foundation.
     
    473532            parsing using either pull parsing or SAX/SAX2 push-style parsing as well as a DOM
    474533            tree-based parsing interface. </p>
    475 <p id="idp280400">
     534<p id="idp290896">
    476535            Xerces,
    477536            like all traditional parsers, processes XML documents sequentially a byte-at-a-time from
     
    492551<div class="table-wrapper" id="xerces-profile">
    493552<p class="title">Table I</p>
    494 <div class="caption"><p id="idm855808">Execution Time of Top 10 Xerces Functions</p></div>
     553<div class="caption"><p id="idp9104">Execution Time of Top 10 Xerces Functions</p></div>
    495554<table class="table" xml:id="xerces-profile">
    496555<colgroup span="1">
     
    547606</div>
    548607</div>
    549 <div class="section" id="idp333696">
     608<div class="section" id="idp343824">
    550609<h3 class="title" style="clear: both">The Parabix Framework</h3>
    551 <p id="idp334368"> The Parabix (parallel bit stream) framework is a transformative approach to XML
     610<p id="idp344496"> The Parabix (parallel bit stream) framework is a transformative approach to XML
    552611            parsing (and other forms of text processing.) The key idea is to exploit the
    553612            availability of wide SIMD registers (e.g., 128-bit) in commodity processors to represent
     
    579638<div class="table-wrapper" id="xml-bytes">
    580639<p class="title">Table II</p>
    581 <div class="caption"><p id="idp348928">XML Source Data</p></div>
     640<div class="caption"><p id="idp358528">XML Source Data</p></div>
    582641<table class="table" xml:id="xml-bytes">
    583642<colgroup span="1">
     
    608667<div class="table-wrapper" id="xml-bits">
    609668<p class="title">Table III</p>
    610 <div class="caption"><p id="idp365200">8-bit ASCII Basis Bit Streams</p></div>
     669<div class="caption"><p id="idp374416">8-bit ASCII Basis Bit Streams</p></div>
    611670<table class="table" xml:id="xml-bits">
    612671<colgroup span="1">
     
    675734</table>
    676735</div>
    677 <p id="idp404848"> Consider, for example, the XML source data stream shown in the first line of <a class="xref" href="#derived">Table IV</a>.
     736<p id="idp414544"> Consider, for example, the XML source data stream shown in the first line of <a class="xref" href="#derived">Table IV</a>.
    678737The remaining lines of this figure show
    679738            several parallel bit streams that are computed in Parabix-style parsing, with each bit
     
    689748<div class="table-wrapper" id="derived">
    690749<p class="title">Table IV</p>
    691 <div class="caption"><p id="idp408992">XML Source Data and Derived Parallel Bit Streams</p></div>
     750<div class="caption"><p id="idp418912">XML Source Data and Derived Parallel Bit Streams</p></div>
    692751<table class="table" xml:id="derived">
    693752<colgroup span="1">
     
    739798</table>
    740799</div>
    741 <p id="idp421952"> Two intuitions may help explain how the Parabix approach can lead to improved XML
     800<p id="idp431968"> Two intuitions may help explain how the Parabix approach can lead to improved XML
    742801            parsing performance. The first is that the use of the full register width offers a
    743802            considerable information advantage over sequential byte-at-a-time parsing. That is,
     
    748807            individual decision-bits, an approach that computes many of them in parallel (e.g., 128
    749808            bytes at a time using 128-bit registers) should provide substantial benefit. </p>
    750 <p id="idp423200"> Previous studies have shown that the Parabix approach improves many aspects of XML
     809<p id="idp433216"> Previous studies have shown that the Parabix approach improves many aspects of XML
    751810            processing, including transcoding \cite{Cameron2008}, character classification and
    752811            validation, tag parsing and well-formedness checking. The first Parabix parser used
     
    757816            \cite{HPCA2012}. Although these research prototypes handled the full syntax of
    758817            schema-less XML documents, they lacked the functionality required by full XML parsers. </p>
    759 <p id="idp425328"> Commercial XML processors support transcoding of multiple character sets and can
     818<p id="idp435344"> Commercial XML processors support transcoding of multiple character sets and can
    760819            parse and validate against multiple document vocabularies. Additionally, they provide
    761820            API facilities beyond those found in research prototypes, including the widely used SAX,
    762821            SAX2 and DOM interfaces. </p>
    763822</div>
    764 <div class="section" id="idp426176">
     823<div class="section" id="idp436192">
    765824<h3 class="title" style="clear: both">Sequential vs. Parallel Paradigm</h3>
    766 <p id="idp426816"> Xerces—like all traditional XML parsers—processes XML documents
     825<p id="idp436832"> Xerces—like all traditional XML parsers—processes XML documents
    767826            sequentially. Each character is examined to distinguish between the XML-specific markup,
    768827            such as a left angle bracket <code class="code">&lt;</code>, and the content held within the
    769828            document. As the parser progresses through the document, it alternates between markup
    770829            scanning, validation and content processing modes. </p>
    771 <p id="idp428384"> In other words, Xerces belongs to an equivalent class applications termed FSM
     830<p id="idp438400"> In other words, Xerces belongs to an equivalent class applications termed FSM
    772831            applications\footnote{ Herein FSM applications are considered software systems whose
    773832            behaviour is defined by the inputs, current state and the events associated with
     
    775834            subsequent characters. Unfortunately, textual data tends to be unpredictable and any
    776835            character could induce a state transition. </p>
    777 <p id="idp429296"> Parabix-style XML parsers utilize a concept of layered processing. A block of source
     836<p id="idp439312"> Parabix-style XML parsers utilize a concept of layered processing. A block of source
    778837            text is transformed into a set of lexical bitstreams, which undergo a series of
    779838            operations that can be grouped into logical layers, e.g., transposition, character
     
    784843</div>
    785844</div>
    786 <div class="section" id="idp430592">
     845<div class="section" id="idp440608">
    787846<h2 class="title" style="clear: both">Architecture</h2>
    788 <div class="section" id="idp431264">
     847<div class="section" id="idp441280">
    789848<h3 class="title" style="clear: both">Overview</h3>
    790 <p id="idp432272"> icXML is more than an optimized version of Xerces. Many components were grouped,
     849<p id="idp442336"> icXML is more than an optimized version of Xerces. Many components were grouped,
    791850            restructured and rearchitected with pipeline parallelism in mind. In this section, we
    792851            highlight the core differences between the two systems. As shown in Figure
     
    814873<p class="title">Figure 1: Xerces Architecture</p>
    815874<div class="figure-contents">
    816 <div class="mediaobject" id="idp439440"><img alt="png image (xerces.png)" src="xerces.png" width="150cm"></div>
     875<div class="mediaobject" id="idp450016"><img alt="png image (xerces.png)" src="xerces.png" width="150cm"></div>
    817876<div class="caption"></div>
    818877</div>
    819878</div>
    820 <p id="idp441808"> In icXML functions are grouped into logical components. As shown in Figure
     879<p id="idp452336"> In icXML functions are grouped into logical components. As shown in Figure
    821880             <a class="xref" href="#xerces-arch" title="Xerces Architecture">Figure 1</a>, two major categories exist: (1) the Parabix Subsystem and (2) the
    822881            Markup Processor. All tasks in (1) use the Parabix Framework \cite{HPCA2012}, which
     
    837896            described in Section \ref{section:arch:errorhandling}. From here, two data-independent
    838897            branches exist: the Symbol Resolver and Content Preparation Unit. </p>
    839 <p id="idp446736"> A typical XML file contains few unique element and attribute names—but
     898<p id="idp457328"> A typical XML file contains few unique element and attribute names—but
    840899            each of them will occur frequently. icXML stores these as distinct data structures,
    841900            called symbols, each with their own global identifier (GID). Using the symbol marker
     
    843902               Resolver</span> scans through the raw data to produce a sequence of GIDs, called
    844903            the <span class="ital">symbol stream</span>. </p>
    845 <p id="idp449328"> The final components of the Parabix Subsystem are the <span class="ital">Content
     904<p id="idp459968"> The final components of the Parabix Subsystem are the <span class="ital">Content
    846905               Preparation Unit</span> and <span class="ital">Content Stream
    847906            Generator</span>. The former takes the (transposed) basis bitstreams and selectively
    848907            filters them, according to the information provided by the Parallel Markup Parser, and
    849908            the latter transforms the filtered streams into the tagged UTF-16 <span class="ital">content stream</span>, discussed in Section \ref{section:arch:contentstream}. </p>
    850 <p id="idp452240"> Combined, the symbol and content stream form icXML's compressed IR of the XML
     909<p id="idp462880"> Combined, the symbol and content stream form icXML's compressed IR of the XML
    851910            document. The <span class="ital">Markup Processor</span>~parses the IR to
    852911            validate and produce the sequential output for the end user. The <span class="ital">Final WF checker</span> performs inter-element well-formedness validation that
     
    860919<p class="title">Figure 2: icXML Architecture</p>
    861920<div class="figure-contents">
    862 <div class="mediaobject" id="idp458128"><img alt="png image (icxml.png)" src="icxml.png" width="500cm"></div>
     921<div class="mediaobject" id="idp468816"><img alt="png image (icxml.png)" src="icxml.png" width="500cm"></div>
    863922<div class="caption"></div>
    864923</div>
    865924</div>
    866925</div>
    867 <div class="section" id="idp460576">
     926<div class="section" id="idp471264">
    868927<h3 class="title" style="clear: both">Character Set Adapters</h3>
    869 <p id="idp461248"> In Xerces, all input is transcoded into UTF-16 to simplify the parsing costs of
     928<p id="idp471936"> In Xerces, all input is transcoded into UTF-16 to simplify the parsing costs of
    870929            Xerces itself and provide the end-consumer with a single encoding format. In the
    871930            important case of UTF-8 to UTF-16 transcoding, the transcoding costs can be significant,
     
    874933            other cases, transcoding may involve table look-up operations for each byte of input. In
    875934            any case, transcoding imposes at least a cost of buffer copying. </p>
    876 <p id="idp462304"> In icXML, however, the concept of Character Set Adapters (CSAs) is used to minimize
     935<p id="idp472992"> In icXML, however, the concept of Character Set Adapters (CSAs) is used to minimize
    877936            transcoding costs. Given a specified input encoding, a CSA is responsible for checking
    878937            that input code units represent valid characters, mapping the characters of the encoding
     
    880939            item streams), as well as supporting ultimate transcoding requirements. All of this work
    881940            is performed using the parallel bitstream representation of the source input. </p>
    882 <p id="idp463280"> An important observation is that many character sets are an extension to the legacy
     941<p id="idp473968"> An important observation is that many character sets are an extension to the legacy
    883942            7-bit ASCII character set. This includes the various ISO Latin character sets, UTF-8,
    884943            UTF-16 and many others. Furthermore, all significant characters for parsing XML are
    885944            confined to the ASCII repertoire. Thus, a single common set of lexical item calculations
    886945            serves to compute lexical item streams for all such ASCII-based character sets. </p>
    887 <p id="idp464160"> A second observation is that—regardless of which character set is
     946<p id="idp474848"> A second observation is that—regardless of which character set is
    888947            used—quite often all of the characters in a particular block of input will be
    889948            within the ASCII range. This is a very simple test to perform using the bitstream
     
    892951            be skipped. Transcoding to UTF-16 becomes trivial as the high eight bitstreams of the
    893952            UTF-16 form are each set to zero in this case. </p>
    894 <p id="idp466080"> A third observation is that repeated transcoding of the names of XML elements,
     953<p id="idp476640"> A third observation is that repeated transcoding of the names of XML elements,
    895954            attributes and so on can be avoided by using a look-up mechanism. That is, the first
    896955            occurrence of each symbol is stored in a look-up table mapping the input encoding to a
     
    899958            symbol look up is required to apply various XML validation rules, there is achieves the
    900959            effect of transcoding each occurrence without additional cost. </p>
    901 <p id="idp467136"> The cost of individual character transcoding is avoided whenever a block of input is
     960<p id="idp477696"> The cost of individual character transcoding is avoided whenever a block of input is
    902961            confined to the ASCII subset and for all but the first occurrence of any XML element or
    903962            attribute name. Furthermore, when transcoding is required, the parallel bitstream
     
    910969            using bit scan operations. </p>
    911970</div>
    912 <div class="section" id="idp468560">
     971<div class="section" id="idp479120">
    913972<h3 class="title" style="clear: both">Combined Parallel Filtering</h3>
    914 <p id="idp469248"> As just mentioned, UTF-8 to UTF-16 transcoding involves marking all but the last
     973<p id="idp479808"> As just mentioned, UTF-8 to UTF-16 transcoding involves marking all but the last
    915974            bytes of multi-byte UTF-8 sequences as positions for deletion. For example, the two
    916975            Chinese characters <code class="code">䜠奜</code> are represented as two
     
    926985            may then be completed by applying parallel deletion and inverse transposition of the
    927986            UTF-16 bitstreams\cite{Cameron2008}. </p>
    928 <p id="idp473408"> Rather than immediately paying the costs of deletion and transposition just for
     987<p id="idp483968"> Rather than immediately paying the costs of deletion and transposition just for
    929988            transcoding, however, icXML defers these steps so that the deletion masks for several
    930989            stages of processing may be combined. In particular, this includes core XML requirements
     
    9411000<div class="figure-contents">
    9421001<div class="caption">Line Break Normalization Logic</div>
    943 <pre class="programlisting" id="idp477488">
     1002<pre class="programlisting" id="idp487952">
    9441003# XML 1.0 line-break normalization rules.
    9451004if lex.CR:
     
    9571016</div>
    9581017         </p>
    959 <p id="idp478832"> In essence, the deletion masks for transcoding and for line break normalization each
     1018<p id="idp489424"> In essence, the deletion masks for transcoding and for line break normalization each
    9601019            represent a bitwise filter; these filters can be combined using bitwise-or so that the
    9611020            parallel deletion algorithm need only be applied once. </p>
    962 <p id="idp479488"> A further application of combined filtering is the processing of XML character and
     1021<p id="idp490080"> A further application of combined filtering is the processing of XML character and
    9631022            entity references. Consider, for example, the references <code class="code">&amp;</code> or
    9641023               <code class="code">&lt;</code>. which must be replaced in XML processing with the single
     
    9731032            UTF-16 code unit. In the case, that this is not true, it is addressed in
    9741033            post-processing. </p>
    975 <p id="idp484304"> The final step of combined filtering occurs during the process of reducing markup
     1034<p id="idp494832"> The final step of combined filtering occurs during the process of reducing markup
    9761035            data to tag bytes preceding each significant XML transition as described in
    9771036            section~\ref{section:arch:contentstream}. Overall, icXML avoids separate buffer copying
     
    9831042            Haswell architecture. </p>
    9841043</div>
    985 <div class="section" id="idp485632">
     1044<div class="section" id="idp496160">
    9861045<h3 class="title" style="clear: both">Content Stream</h3>
    987 <p id="idp486304"> A relatively-unique concept for icXML is the use of a filtered content stream.
     1046<p id="idp496832"> A relatively-unique concept for icXML is the use of a filtered content stream.
    9881047            Rather that parsing an XML document in its original format, the input is transformed
    9891048            into one that is easier for the parser to iterate through and produce the sequential
     
    9931052           
    9941053            through the parallel filtering algorithm, described in section \ref{sec:parfilter}. </p>
    995 <p id="idp488816"> Combined with the symbol stream, the parser traverses the content stream to
     1054<p id="idp499344"> Combined with the symbol stream, the parser traverses the content stream to
    9961055            effectively reconstructs the input document in its output form. The initial <span class="ital">0</span> indicates an empty content string. The following
    9971056               <code class="code">&gt;</code> indicates that a start tag without any attributes is the first
     
    10051064            null character in the content stream in parallel, which in turn means the parser can
    10061065            directly jump to the end of every string without scanning for it. </p>
    1007 <p id="idp492208"> Following <code class="code">'fee'</code> is a <code class="code">=</code>, which marks the
     1066<p id="idp502736"> Following <code class="code">'fee'</code> is a <code class="code">=</code>, which marks the
    10081067            existence of an attribute. Because all of the intra-element was performed in the Parabix
    10091068            Subsystem, this must be a legal attribute. Since attributes can only occur within start
     
    10191078            that the appropriate scope-nesting rules have been applied. </p>
    10201079</div>
    1021 <div class="section" id="idp496352">
     1080<div class="section" id="idp506880">
    10221081<h3 class="title" style="clear: both">Namespace Handling</h3>
    1023 <p id="idp497440"> In XML, namespaces prevents naming conflicts when multiple vocabularies are used
     1082<p id="idp507968"> In XML, namespaces prevents naming conflicts when multiple vocabularies are used
    10241083            together. It is especially important when a vocabulary application-dependant meaning,
    10251084            such as when XML or SVG documents are embedded within XHTML files. Namespaces are bound
     
    10381097            uniquely-named items because the current vocabulary is determined by the namespace(s)
    10391098            that are in-scope. </p>
    1040 <div class="table-wrapper" id="idp504560">
     1099<div class="table-wrapper" id="idp515088">
    10411100<p class="title">Table V</p>
    1042 <div class="caption"><p id="idp505072">XML Namespace Example</p></div>
     1101<div class="caption"><p id="idp515600">XML Namespace Example</p></div>
    10431102<table class="table">
    10441103<colgroup span="1">
     
    10741133</table>
    10751134</div>
    1076 <p id="idp514048"> In both Xerces and icXML, every URI has a one-to-one mapping to a URI ID. These
     1135<p id="idp524576"> In both Xerces and icXML, every URI has a one-to-one mapping to a URI ID. These
    10771136            persist for the lifetime of the application through the use of a global URI pool. Xerces
    10781137            maintains a stack of namespace scopes that is pushed (popped) every time a start tag
     
    10821141            those that declare a set of namespaces upfront and never change them, and (2) those that
    10831142            repeatedly modify the namespaces in predictable patterns. </p>
    1084 <p id="idp515184"> For that reason, icXML contains an independent namespace stack and utilizes bit
     1143<p id="idp525712"> For that reason, icXML contains an independent namespace stack and utilizes bit
    10851144            vectors to cheaply perform
    10861145             When a prefix is
     
    10961155            found using a bit-scan intrinsic. A namespace binding table, similar to Table
    10971156            \ref{tbl:namespace1}, provides the actual URI ID. </p>
    1098 <div class="table-wrapper" id="idp519648">
     1157<div class="table-wrapper" id="idp530224">
    10991158<p class="title">Table VI</p>
    1100 <div class="caption"><p id="idp520160">Namespace Binding Table Example</p></div>
     1159<div class="caption"><p id="idp530736">Namespace Binding Table Example</p></div>
    11011160<table class="table">
    11021161<colgroup span="1">
     
    11391198</table>
    11401199</div>
    1141 <p id="idp536240">
     1200<p id="idp546928">
    11421201           
    11431202           
     
    11451204           
    11461205         </p>
    1147 <p id="idp538224"> To ensure that scoping rules are adhered to, whenever a start tag is encountered,
     1206<p id="idp548832"> To ensure that scoping rules are adhered to, whenever a start tag is encountered,
    11481207            any modification to the currently visible namespaces is calculated and stored within a
    11491208            stack of bit vectors denoting the locally modified namespace bindings. When an end tag
     
    11541213         </p>
    11551214</div>
    1156 <div class="section" id="idp539680">
     1215<div class="section" id="idp550288">
    11571216<h3 class="title" style="clear: both">Error Handling</h3>
    1158 <p id="idp540352">
     1217<p id="idp550960">
    11591218           
    11601219            Xerces outputs error messages in two ways: through the programmer API and as thrown
     
    11651224            \ref{fig:icxml-arch}, icXML is divided into two sections: the Parabix Subsystem and
    11661225            Markup Processor, each with its own system for detecting and producing error messages. </p>
    1167 <p id="idp541984"> Within the Parabix Subsystem, all computations are performed in parallel, a block at
     1226<p id="idp552592"> Within the Parabix Subsystem, all computations are performed in parallel, a block at
    11681227            a time. Errors are derived as artifacts of bitstream calculations, with a 1-bit marking
    11691228            the byte-position of an error within a block, and the type of error is determined by the
     
    11981257            detected, the sum of those skipped positions is subtracted from the distance to
    11991258            determine the actual column number. </p>
    1200 <p id="idp547472"> The Markup Processor is a state-driven machine. As such, error detection within it
     1259<p id="idp558080"> The Markup Processor is a state-driven machine. As such, error detection within it
    12011260            is very similar to Xerces. However, reporting the correct line/column is a much more
    12021261            difficult problem. The Markup Processor parses the content stream, which is a series of
     
    12121271</div>
    12131272</div>
    1214 <div class="section" id="idp549968">
     1273<div class="section" id="idp560576">
    12151274<h2 class="title" style="clear: both">Multithreading with Pipeline Parallelism</h2>
    1216 <p id="idp550608"> As discussed in section \ref{background:xerces}, Xerces can be considered a FSM
     1275<p id="idp561216"> As discussed in section \ref{background:xerces}, Xerces can be considered a FSM
    12171276         application. These are "embarrassingly
    12181277         sequential."\cite{Asanovic:EECS-2006-183} and notoriously difficult to
     
    12221281         well into the general model of pipeline parallelism, in which each thread is in charge of a
    12231282         single module or group of modules. </p>
    1224 <p id="idp552464"> The most straightforward division of work in icXML is to separate the Parabix Subsystem
     1283<p id="idp563072"> The most straightforward division of work in icXML is to separate the Parabix Subsystem
    12251284         and the Markup Processor into distinct logical layers into two separate stages. The
    12261285         resultant application, <span class="ital">icXML-p</span>, is a course-grained
     
    12431302            <code class="code">T<sub>2</sub></code> to finish reading the shared data before it can
    12441303         reuse the memory space. </p>
    1245 <p id="idp561584">
     1304<p id="idp572752">
    12461305        <div class="figure" id="threads_timeline1">
    12471306<p class="title">Figure 4: Thread Balance in Two-Stage Pipelines</p>
    12481307<div class="figure-contents">
    1249 <div class="mediaobject" id="idp562976"><img alt="png image (threads_timeline1.png)" src="threads_timeline1.png" width="500cm"></div>
    1250 <div class="mediaobject" id="idp564752"><img alt="png image (threads_timeline2.png)" src="threads_timeline2.png" width="500cm"></div>
     1308<div class="mediaobject" id="idp574096"><img alt="png image (threads_timeline1.png)" src="threads_timeline1.png" width="500cm"></div>
     1309<div class="mediaobject" id="idp575872"><img alt="png image (threads_timeline2.png)" src="threads_timeline2.png" width="500cm"></div>
    12511310<div class="caption"></div>
    12521311</div>
    12531312</div>
    12541313      </p>
    1255 <p id="idp567200"> Overall, our design is intended to benefit a range of applications. Conceptually, we
     1314<p id="idp578320"> Overall, our design is intended to benefit a range of applications. Conceptually, we
    12561315         consider two design points. The first, the parsing performed by the Parabix Subsystem
    12571316         dominates at 67% of the overall cost, with the cost of application processing (including
     
    12591318         scenario, the cost of application processing dominates at 60%, while the cost of XML
    12601319         parsing represents an overhead of 40%. </p>
    1261 <p id="idp568112"> Our design is predicated on a goal of using the Parabix framework to achieve a 50% to
     1320<p id="idp579232"> Our design is predicated on a goal of using the Parabix framework to achieve a 50% to
    12621321         100% improvement in the parsing engine itself. In a best case scenario, a 100% improvement
    12631322         of the Parabix Subsystem for the design point in which XML parsing dominates at 67% of the
     
    12671326         about 33% of the original work. In this case, Amdahl's law predicts that we could expect up
    12681327         to a 3x speedup at best. </p>
    1269 <p id="idp569232"> At the other extreme of our design range, we consider an application in which core
     1328<p id="idp580352"> At the other extreme of our design range, we consider an application in which core
    12701329         parsing cost is 40%. Assuming the 2x speedup of the Parabix Subsystem over the
    12711330         corresponding Xerces core, single-threaded icXML delivers a 25% speedup. However, the most
     
    12731332         the entire latency of parsing within the serial time required by the application. In this
    12741333         case, we achieve an overall speedup in processing time by 1.67x. </p>
    1275 <p id="idp570176"> Although the structure of the Parabix Subsystem allows division of the work into
     1334<p id="idp581296"> Although the structure of the Parabix Subsystem allows division of the work into
    12761335         several pipeline stages and has been demonstrated to be effective for four pipeline stages
    12771336         in a research prototype \cite{HPCA2012}, our analysis here suggests that the further
     
    12811340         the cost of application logic that could match reductions in core parsing cost. </p>
    12821341</div>
    1283 <div class="section" id="idp572016">
     1342<div class="section" id="idp582480">
    12841343<h2 class="title" style="clear: both">Performance</h2>
    1285 <p id="idp572688"> We evaluate Xerces-C++ 3.1.1, icXML, icXML-p against two benchmarking applications: the
     1344<p id="idp583152"> We evaluate Xerces-C++ 3.1.1, icXML, icXML-p against two benchmarking applications: the
    12861345         Xerces C++ SAXCount sample application, and a real world GML to SVG transformation
    12871346         application. We investigated XML parser performance using an Intel Core i7 quad-core (Sandy
     
    12891348         L1 cache, 256 kB (per core) L2 cache, 8 MB L3 cache) running the 64-bit version of Ubuntu
    12901349         12.04 (Linux). </p>
    1291 <p id="idp573600"> We analyzed the execution profiles of each XML parser using the performance counters
     1350<p id="idp584064"> We analyzed the execution profiles of each XML parser using the performance counters
    12921351         found in the processor. We chose several key hardware events that provide insight into the
    12931352         profile of each application and indicate if the processor is doing useful work. The set of
     
    12971356         collection of hardware performance monitoring statistics. In addition, we used the Linux
    12981357         perf \cite{perf} utility to collect per core hardware events. </p>
    1299 <div class="section" id="idp574736">
     1358<div class="section" id="idp585200">
    13001359<h3 class="title" style="clear: both">Xerces C++ SAXCount</h3>
    1301 <p id="idp575408"> Xerces comes with sample applications that demonstrate salient features of the
     1360<p id="idp585872"> Xerces comes with sample applications that demonstrate salient features of the
    13021361            parser. SAXCount is the simplest such application: it counts the elements, attributes
    13031362            and characters of a given XML file using the (event based) SAX API and prints out the
    13041363            totals. </p>
    1305 <p id="idp576112"> Table \ref{XMLDocChars} shows the document characteristics of the XML input files
     1364<p id="idp586576"> Table \ref{XMLDocChars} shows the document characteristics of the XML input files
    13061365            selected for the Xerces C++ SAXCount benchmark. The jaw.xml represents document-oriented
    13071366            XML inputs and contains the three-byte and four-byte UTF-8 sequence required for the
    13081367            UTF-8 encoding of Japanese characters. The remaining data files are data-oriented XML
    13091368            documents and consist entirely of single byte encoded ASCII characters.
    1310   <div class="table-wrapper" id="idp576848">
     1369  <div class="table-wrapper" id="idp587312">
    13111370<p class="title">Table VII</p>
    1312 <div class="caption"><p id="idp577360">XML Document Characteristics</p></div>
     1371<div class="caption"><p id="idp587824">XML Document Characteristics</p></div>
    13131372<table class="table">
    13141373<colgroup span="1">
     
    13591418</div>           
    13601419</p>
    1361 <p id="idp592944"> A key predictor of the overall parsing performance of an XML file is markup
     1420<p id="idp603408"> A key predictor of the overall parsing performance of an XML file is markup
    13621421            density\footnote{ Markup Density: the ratio of markup bytes used to define the structure
    13631422            of the document vs. its file size.}. This metric has substantial influence on the
     
    13661425            of document-oriented and data-oriented XML files to analyze performance over a spectrum
    13671426            of markup densities. </p>
    1368 <p id="idp593952"> Figure \ref{perf_SAX} compares the performance of Xerces, icXML and pipelined icXML
     1427<p id="idp604416"> Figure \ref{perf_SAX} compares the performance of Xerces, icXML and pipelined icXML
    13691428            in terms of CPU cycles per byte for the SAXCount application. The speedup for icXML over
    13701429            Xerces is 1.3x to 1.8x. With two threads on the multicore machine, icXML-p can achieve
     
    13731432            icXML-p performs better as markup-density increases because the work performed by each
    13741433            stage is well balanced in this application. </p>
    1375 <p id="idp594992">
     1434<p id="idp606096">
    13761435        <div class="figure" id="perf_SAX">
    13771436<p class="title">Figure 5: SAXCount Performance Comparison</p>
    13781437<div class="figure-contents">
    1379 <div class="mediaobject" id="idp596336"><img alt="png image (perf_SAX.png)" src="perf_SAX.png" width="500cm"></div>
     1438<div class="mediaobject" id="idp607440"><img alt="png image (perf_SAX.png)" src="perf_SAX.png" width="500cm"></div>
    13801439<div class="caption"></div>
    13811440</div>
     
    13831442         </p>
    13841443</div>
    1385 <div class="section" id="idp598880">
     1444<div class="section" id="idp609984">
    13861445<h3 class="title" style="clear: both">GML2SVG</h3>
    1387 <p id="idp599552">       As a more substantial application of XML processing, the GML-to-SVG (GML2SVG) application
     1446<p id="idp610656">       As a more substantial application of XML processing, the GML-to-SVG (GML2SVG) application
    13881447was chosen.   This application transforms geospatially encoded data represented using
    13891448an XML representation in the form of Geography Markup Language (GML) \cite{lake2004geography}
     
    13971456a known XML format for the purpose of analysis and restructuring to meet
    13981457the requirements of an alternative format.</p>
    1399 <p id="idp600880">Our GML to SVG data translations are executed on GML source data
     1458<p id="idp612032">Our GML to SVG data translations are executed on GML source data
    14001459modelling the city of Vancouver, British Columbia, Canada.
    14011460The GML source document set
     
    14071466<p class="title">Figure 6: Performance Comparison for GML2SVG</p>
    14081467<div class="figure-contents">
    1409 <div class="mediaobject" id="idp602864"><img alt="png image (Throughput.png)" src="Throughput.png" width="500cm"></div>
     1468<div class="mediaobject" id="idp614016"><img alt="png image (Throughput.png)" src="Throughput.png" width="500cm"></div>
    14101469<div class="caption"></div>
    14111470</div>
    14121471</div>
    1413 <p id="idp605152">Figure \ref{perf_GML2SVG} compares the performance of the GML2SVG application linked against
     1472<p id="idp616352">Figure \ref{perf_GML2SVG} compares the performance of the GML2SVG application linked against
    14141473the Xerces, icXML and icXML-p.   
    14151474On the GML workload with this application, single-thread icXML
     
    14181477Using icXML-p, a further throughput increase to 111 MB/sec was recorded,
    14191478approximately a 2X speedup.</p>
    1420 <p id="idp605968">An important aspect of icXML is the replacement of much branch-laden
     1479<p id="idp617168">An important aspect of icXML is the replacement of much branch-laden
    14211480sequential code inside Xerces with straight-line SIMD code using far
    14221481fewer branches.  Figure \ref{branchmiss_GML2SVG} shows the corresponding
     
    14291488<p class="title">Figure 7: Comparative Branch Misprediction Rate</p>
    14301489<div class="figure-contents">
    1431 <div class="mediaobject" id="idp30880"><img alt="png image (BM.png)" src="BM.png" width="500cm"></div>
     1490<div class="mediaobject" id="idp619232"><img alt="png image (BM.png)" src="BM.png" width="500cm"></div>
    14321491<div class="caption"></div>
    14331492</div>
    14341493</div>
    1435 <p id="idp33168">The behaviour of the three versions with respect to L1 cache misses per kB is shown
     1494<p id="idp621520">The behaviour of the three versions with respect to L1 cache misses per kB is shown
    14361495in Figure \ref{cachemiss_GML2SVG}.   Improvements are shown in both instruction-
    14371496and data-cache performance with the improvements in instruction-cache
     
    14451504<p class="title">Figure 8: Comparative Cache Miss Rate</p>
    14461505<div class="figure-contents">
    1447 <div class="mediaobject" id="idp35296"><img alt="png image (CM.png)" src="CM.png" width="500cm"></div>
     1506<div class="mediaobject" id="idp623696"><img alt="png image (CM.png)" src="CM.png" width="500cm"></div>
    14481507<div class="caption"></div>
    14491508</div>
    14501509</div>
    1451 <p id="idp37584">One caveat with this study is that the GML2SVG application did not exhibit
     1510<p id="idp625984">One caveat with this study is that the GML2SVG application did not exhibit
    14521511a relative balance of processing between application code and Xerces library
    14531512code reaching the 33% figure.  This suggests that for this application and
     
    14571516</div>
    14581517</div>
    1459 <div class="section" id="idp624032">
     1518<div class="section" id="idp627056">
    14601519<h2 class="title" style="clear: both">Conclusion and Future Work</h2>
    1461 <p id="idp624720"> This paper is the first case study documenting the significant performance benefits
     1520<p id="idp627744"> This paper is the first case study documenting the significant performance benefits
    14621521         that may be realized through the integration of parallel bitstream technology into existing
    14631522         widely-used software libraries. In the case of the Xerces-C++ XML parser, the combined
     
    14691528         technologies, this is an important case study demonstrating the general feasibility of
    14701529         these techniques. </p>
    1471 <p id="idp626000"> The further development of icXML to move beyond 2-stage pipeline parallelism is
     1530<p id="idp629024"> The further development of icXML to move beyond 2-stage pipeline parallelism is
    14721531         ongoing, with realistic prospects for four reasonably balanced stages within the library.
    14731532         For applications such as GML2SVG which are dominated by time spent on XML parsing, such a
    14741533         multistage pipelined parsing library should offer substantial benefits. </p>
    1475 <p id="idp626768"> The example of XML parsing may be considered prototypical of finite-state machines
     1534<p id="idp629792"> The example of XML parsing may be considered prototypical of finite-state machines
    14761535         applications which have sometimes been considered "embarassingly
    14771536         sequential" and so difficult to parallelize that "nothing
     
    14791538         point in making the case that parallelization can indeed be helpful across a broad array of
    14801539         application types. </p>
    1481 <p id="idp628144"> To overcome the software engineering challenges in applying parallel bitstream
     1540<p id="idp631168"> To overcome the software engineering challenges in applying parallel bitstream
    14821541         technology to existing software systems, it is clear that better library and tool support
    14831542         is needed. The techniques used in the implementation of icXML and documented in this paper
     
    14861545      </p>
    14871546</div>
    1488 <div class="bibliography" id="idp629600">
     1547<div class="bibliography" id="idp632656">
    14891548<h2 class="title" style="clear:both">Bibliography</h2>
    14901549<p class="bibliomixed" id="XMLChip09">[Leventhal and Lemoine 2009] Leventhal, Michael and
  • docs/Balisage13/Bal2013came0601/Bal2013came0601.xml

    r3055 r3056  
    137137
    138138   </info>
    139    <section>
     139 <section>
    140140      <title>Introduction</title>
    141       <para/>
    142       <para/>
    143       <para/>
    144       <para/>
     141      <para>   
     142        Parallelization and acceleration of XML parsing is a widely
     143        studied problem that has seen the development of a number
     144        of interesting research prototypes using both SIMD and
     145        multicore parallelism.   Most works have investigated
     146        data parallel solutions on multicore
     147        architectures using various strategies to break input
     148        documents into segments that can be allocated to different cores.
     149        For example, one possibility for data
     150        parallelization is to add a pre-parsing step to compute
     151        a skeleton tree structure of an  XML document \cite{GRID2006}.
     152        The parallelization of the pre-parsing stage itself can be tackled with
     153        state machines \cite{E-SCIENCE2007, IPDPS2008}.
     154        Methods without pre-parsing have used speculation \cite{HPCC2011} or post-processing that
     155        combines the partial results \cite{ParaDOM2009}.
     156        A hybrid technique that combines data and pipeline parallelism was proposed to
     157        hide the latency of a "job" that has to be done sequentially \cite{ICWS2008}.
     158      </para>
     159      <para>
     160        Fewer efforts have investigated SIMD parallelism, although this approach
     161        has the potential advantage of improving single core performance as well
     162        as offering savings in energy consumption \cite{HPCA2012}.
     163        Intel introduced specialized SIMD string processing instructions in the SSE 4.2 instruction set extension
     164        and showed how they can be used to improve the performance of XML parsing \cite{XMLSSE42}.
     165        The Parabix framework uses generic SIMD extensions and bit parallel methods to
     166        process hundreds of XML input characters simultaneously \cite{Cameron2009, cameron-EuroPar2011}.
     167        Parabix prototypes have also combined SIMD methods with thread-level parallelism to
     168        achieve further acceleration on multicore systems \cite{HPCA2012}.
     169      </para>
     170      <para>
     171        In this paper, we move beyond research prototypes to consider
     172        the detailed integration of both SIMD and multicore parallelism into the
     173        Xerces-C++ parser of the Apache Software Foundation, an existing
     174        standards-compliant open-source parser that is widely used
     175        in commercial practice.    The challenge of this work is
     176        to parallelize the Xerces parser in such a way as to
     177        preserve the existing APIs as well as offering worthwhile
     178        end-to-end acceleration of XML processing.   
     179        To achieve the best results possible, we undertook
     180        a nine-month comprehensive restructuring of the Xerces-C++ parser,
     181        seeking to expose as many critical aspects of XML parsing
     182        as possible for parallelization, the result of which we named icXML.   
     183        Overall, we employed Parabix-style methods of transcoding, tokenization
     184        and tag parsing, parallel string comparison methods in symbol
     185        resolution, bit parallel methods in namespace processing,
     186        as well as staged processing using pipeline parallelism to take advantage of
     187        multiple cores.
     188      </para>
     189      <para>
     190        The remainder of this paper is organized as follows.   
     191        Section \ref{background} discusses the structure of the Xerces and Parabix XML parsers and the fundamental
     192        differences between the two parsing models.   
     193        Section \ref{architecture} then presents the icXML design based on a restructured Xerces architecture to
     194        incorporate SIMD parallelism using Parabix methods.   
     195        Section \ref{multithread} moves on to consider the multithreading of the icXML architecture
     196        using the pipeline parallelism model. 
     197        Section \ref{performance} analyzes the performance of both the single-threaded and
     198        multi-threaded versions of icXML in comparison to original Xerces,
     199        demonstrating substantial end-to-end acceleration of
     200        a GML-to-SVG translation application written against the Xerces API.
     201        Section \ref{conclusion} concludes the paper with a discussion of future work and the potential for
     202        applying the techniques discussed herein in other application domains.
     203      </para>
    145204   </section>
    146205
Note: See TracChangeset for help on using the changeset viewer.