Changeset 1044


Ignore:
Timestamp:
Mar 25, 2011, 9:06:20 PM (9 years ago)
Author:
cameron
Message:

Done

Location:
docs/PACT2011
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • docs/PACT2011/03-research.tex

    r1043 r1044  
    6464
    6565In order represent the byte-oriented character data as parallel bitstreams, the source data is first loaded in sequential order and converted into its transposed representation through a series of packs, shifts, and bitwise operations.
    66 Using the SIMD capabilities of current commodity processors, this transposition of source data to bitstreams incurs an amortized overhead of about 1 CPU cycle per byte for transposition \cite{CameronHerdyLin2008}. When parsing, we need to consider multiple properties of characters at different stages during the process. Using the basis bitstreams, it is possible to combine them using bitwise logic in order to compute character-class bitstreams; that is, streams that identify the positions at which characters belonging to a specific character class occur. For example, the $j$-th character is an open angle bracket `<' if and only if the $j$-th bit of $B_2, B_3, B_4, B_5 =$ 1 and the $j$-th bit of $B_0, B_1, B_6, B_7 =$ 0. Once these character-class bitstreams are created, a $bitscan$ operation, which is an 1-cycle intrinsic function for commodity processors, can be used for sequential markup scanning and data validation operations. A common operation in all XML parsers is identifying the start tags (`<') and their accompanying end tags (either ``/>'' or ``>'' depending whether the element tag is an empty element tag or not, respectively).
     66Using the SIMD capabilities of current commodity processors, this transposition of source data to bitstreams incurs an amortized overhead of about 1 CPU cycle per byte for transposition \cite{CameronHerdyLin2008}. When parsing, we need to consider multiple properties of characters at different stages during the process. Using the basis bitstreams, it is possible to combine them using bitwise logic in order to compute character-class bitstreams; that is, streams that identify the positions at which characters belonging to a specific character class occur. For example, the $j\th$ character is an open angle bracket `<' if and only if the $j$-th bit of $B_2, B_3, B_4, B_5 =$ 1 and the $j\th$ bit of $B_0, B_1, B_6, B_7 =$ 0. Once these character-class bitstreams are created, a {\em bit-scan} operation, which is an 1-cycle intrinsic function for commodity processors, can be used for sequential markup scanning and data validation operations. A common operation in all XML parsers is identifying the start tags (`<') and their accompanying end tags (either ``/>'' or ``>'' depending whether the element tag is an empty element tag or not, respectively).
    6767
    6868\begin{figure}[h]
     
    8989In Figure \ref{fig:Parabix1StarttagExample}, the first marker stream $M_0$ is created and the parser begins scanning the source data for an open angle bracket `<', starting at position 1. Since the source data begins with `<', $M_0$ is assigned a cursor position of 1. The $advance$ operation then then shifts the $M_0$'s cursor position by 1, resulting in the creation of a new marker stream, $M_1$, with the cursor position at 2. The following $bitscan$ operation takes the cursor position from $M_1$ and sequentially scans every position until it locates either an `/' or `>'. It finds a `>' at position 4 and returns that as the new cursor position for $M_2$. Calculating $M_3$ advances the cursor again, and the $bitscan$ used to create $M_4$ locates the new opening angle bracket. This process continues until every open and closing angle bracket is located within the basis stream, resulting in a process that requires 3 logical operations to find each individual start and end tag pair.
    9090
    91 Unlike traditional parsers, these sequential operations are accelerated significantly since the bitscan operation can perform up to $W$ finite state transitions per clock cycle. This approach has recently been applied to Unicode transcoding and XML parsing to good effect, with research prototypes showing substantial speed-ups over even the best of byte-at-a-time alternatives \cite{CameronHerdyLin2008, CameronLin2009, Cameron2010}.
     91Unlike traditional parsers, these sequential operations are accelerated significantly since the bit-scan operation can skip up to $w$ positions, where $w$ is the processor word width in bits. This approach has recently been applied to Unicode transcoding and XML parsing to good effect, with research prototypes showing substantial speed-ups over even the best of byte-at-a-time alternatives \cite{CameronHerdyLin2008, Herdy2008, Cameron2009}.
    9292
    9393\subsection{Parabix2}
    9494
    95 In Parabix2, we replaced the sequential single-cursor parsing using bit scan instructions with a parallel parsing method using bitstream addition. Unlike the single-cursor approach of Parabix1 (and conceptually of all sequential XML parsers), Parabix2 processes multiple cursors in parallel. For example, using the source data from Figure \ref{fig:Parabix1StarttagExample}, Figure \ref{fig:Parabix2StarttagExample} shows how Parabix2 identifies and moves each of the start tag markers forwards to the corresponding end tag. Unlike Parabix1, Parabix2 begins scanning by creating two character-class marker streams, $N$, denoting the position of every alpha numeric character within the basis stream, and $M_0$, marking the position of every potential start tag in the bitstream. $M_0$ is then advanced to create $M_1$, which is fed into the first $scanto$ operation along with $N$.  To handle variable length tag names, the $scanto$ operation effectively locates the cursor positions of the end tags in parallel by adding $M_1$ to $N$, and using the bitwise AND operation of the negation of $N$ to find only the true end tags of $M_1$. Because and end tag may end on an `/' or '>', $scanto$ is called again to advance any cursor from `/' to `>'. For additional details, please refer to technical report ``Parallel Parsing with Bitstream Addition: An XML Case Study'' \cite{Cameron2010}.
     95In Parabix2, we replaced the sequential single-cursor parsing using bit scan instructions with a parallel parsing method using bitstream addition.
     96Unlike the single-cursor approach of Parabix1 (and conceptually of all sequential XML parsers),
     97Parabix2 processes multiple cursors in parallel. For example, using the source data from
     98Figure \ref{fig:Parabix1StarttagExample}, Figure \ref{fig:Parabix2StarttagExample} shows how Parabix2 identifies and moves each of the start tag markers forwards to the corresponding end tag. Unlike Parabix1, Parabix2 begins scanning by creating two character-class marker streams, $N$, denoting the position of every alpha numeric character within the basis stream, and $M_0$, marking the position of every potential start tag in the bitstream. $M_0$ is then advanced to create $M_1$, which is fed into the first $scanto$ operation along with $N$.  To handle variable length tag names, the $scanto$ operation effectively locates the cursor positions of the end tags in parallel by adding $M_1$ to $N$, and using the bitwise AND operation of the negation of $N$ to find only the true end tags of $M_1$. Because and end tag may end on an `/' or '>', $scanto$ is called again to advance any cursor from `/' to `>'. For additional details, see the technical report \cite{Cameron2010}.
    9699
    97100
  • docs/PACT2011/main.bbl

    r1018 r1044  
    5555  York, NY, USA, 2008. ACM.
    5656
    57 \bibitem{CameronLin2009}
    58 R.~D. Cameron and D.~Lin.
    59 \newblock Architectural support for {SWAR} text processing with parallel bit
    60   streams: the inductive doubling principle.
    61 \newblock In {\em {ASPLOS} '09: Proceeding of the 14th international conference
    62   on Architectural support for programming languages and operating systems},
    63   pages 337--348, New York, NY, USA, 2009. ACM.
    64 
    6557\bibitem{expat}
    6658J.~Clark.
     
    9486\newblock {Xerces C++ Parser}.
    9587\newblock {http://xerces.apache.org/xerces-c/}.
     88
     89\bibitem{Herdy2008}
     90K.~S. Herdy, D.~S. Burggraf, and R.~D. Cameron.
     91\newblock High performance {GML} to {SVG} transformation for the visual
     92  presentation of geographic data in web-based mapping systems.
     93\newblock In {\em Proceedings of {SVG} Open 2008}, August 2008.
    9694
    9795\bibitem{XMLSSE42}
Note: See TracChangeset for help on using the changeset viewer.