Cache-conscious scheduling of streaming applications

  • Kunal Agrawal
  • , Jeremy T. Fineman
  • , Jordan Krage
  • , Charles E. Leiserson
  • , Sivan Toledo

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

10 Scopus citations

Abstract

This paper considers the problem of scheduling streaming applications on uniprocessors in order to minimize the number of cache-misses. Streaming applications are represented as a directed graph (or multigraph), where nodes are computation modules and edges are channels. When a module fires, it consumes some data-items from its input channels and produces some items on its output channels. In addition, each module may have some state (either code or data) which represents the memory locations that must be loaded into cache in order to execute the module. We consider synchronous dataflow graphs where the input and output rates of modules are known in advance and do not change during execution. We also assume that the state size of modules is known in advance. Our main contribution is to show that for a large and important class of streaming computations, cache-efficient scheduling is essentially equivalent to solving a constrained graph partitioning problem. A streaming computation from this class has a cache-efficient schedule if and only if its graph has a low-bandwidth partition of the modules into components (subgraphs) whose total state fits within the cache, where the bandwidth of the partition is the number of data items that cross intercomponent channels per data item that enters the graph. Given a good partition, we describe a runtime strategy for scheduling two classes of streaming graphs: pipelines, where the graph consists of a single directed chain, and a fairly general class of directed acyclic graphs (dags) with some additional restrictions. The runtime scheduling strategy consists of adding large external buffers at the input and output edges of each component, allowing each component to be executed many times. Partitioning enables a reduction in cache misses in two ways. First, any items that are generated on edges internal to subgraphs are never written out to memory, but remain in cache. Second, each subgraph is executed many times, allowing the state to be reused. We prove the optimality of this runtime scheduling for all pipelines and for dags that meet certain conditions on buffersize requirements. Specifically, we show that with constantfactor memory augmentation, partitioning on these graphs guarantees the optimal number of cache misses to within a constant factor. For the pipeline case, we also prove that such a partition can be found in polynomial time. For the dags we prove optimality if a good partition is provided; the partitioning problem itself is NP-complete.

Original languageEnglish
Title of host publicationSPAA'12 - Proceedings of the 24th ACM Symposium on Parallelism in Algorithms and Architectures
Pages236-245
Number of pages10
DOIs
StatePublished - 2012
Event24th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA'12 - Pittsburgh, PA, United States
Duration: Jun 25 2012Jun 27 2012

Publication series

NameAnnual ACM Symposium on Parallelism in Algorithms and Architectures

Conference

Conference24th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA'12
Country/TerritoryUnited States
CityPittsburgh, PA
Period06/25/1206/27/12

Keywords

  • Caching
  • Dag
  • Graph
  • Partitioning
  • Pipelining
  • Scheduling
  • Streaming
  • Synchronous dataflow

Fingerprint

Dive into the research topics of 'Cache-conscious scheduling of streaming applications'. Together they form a unique fingerprint.

Cite this