Skip to main content

Task-Aware Optimization of Dynamic Fractional Permissions

  • Conference paper
  • First Online:
Languages and Compilers for Parallel Computing (LCPC 2013)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8664))

  • 657 Accesses

Abstract

Boyland’s original work on fractional permissions introduced a mechanism to statically reason about the correct use of shared memory in concurrent programs. Permissions are linear capabilities that can be passed from one task to another. By splitting a permission into fractions, a task can grant multiple other tasks concurrent read access. Because writing data requires the full permission–and by definition at most one task can have the full permission–, fractional permissions prevent read/write conflicts.

This paper presents an optimizing compiler for a dynamic variant of fractional permissions where memory accesses are checked at runtime. In this system, every object is associated with a list of tasks that have read and/or write permission for the object. Tasks can grant read permission to subtasks by splitting their own permission into fractions and later collect those fractions back to re-gain the original permission.

To reduce the time and space overhead associated with permission checks, the compiler uses task-ordering information to minimize the places where permission checks must be inserted. For three of the five benchmarks we have investigated, the fully optimized version is within 10 % of the original version without fractional permissions. The average performance overhead over all benchmarks is 48 % which can be attributed to the poor performance of one particular benchmark. (For the other benchmarks, the average overhead is 15 %.)

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The term split stems from the notion of fractional permissions. The whole permission of size \(1\) is split between the \(n\) elements in the ACL such that each element has \({\frac{1}{n}}\)th of the permission.

  2. 2.

    A task may return its permission and make an earlier write check fail while a later check would succeed. For this reason, write checks cannot be moved across synchronization operations and racefully yielding a permission is not guaranteed to succeed.

  3. 3.

    Note that an analysis-time task can be potentially parallel with itself if at runtime several unordered instances of may be created.

References

  1. Lu, S., Park, S., Seo, E., Zhou, Y.: Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. SIGOPS Oper. Syst. Rev. 42, 329–339 (2008)

    Article  Google Scholar 

  2. Matsakis, N.D., Gross, T.R.: A time-aware type system for data-race protection and guaranteed initialization. In: OOPSLA ’10, pp. 634–651. ACM, New York (2010)

    Google Scholar 

  3. Boyland, J.: Checking interference with fractional permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 55–72. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  4. Moir, M.: Transparent support for wait-free transactions. In: Mavronicolas, M. (ed.) WDAG 1997. LNCS, vol. 1320, pp. 305–319. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  5. Harris, T., Fraser, K.: Language support for lightweight transactions. In: OOPSLA ’03, pp. 388–402. ACM, New York (2003)

    Google Scholar 

  6. Adl-Tabatabai, A.R., Kozyrakis, C., Saha, B.: Transactional programming in a multi-core environment. In: PPoPP ’07, p. 272. ACM, New York (2007)

    Google Scholar 

  7. Musuvathi, M., Qadeer, S.: Iterative context bounding for systematic testing of multithreaded programs. In: PLDI ’07, pp. 446–455. ACM, New York (2007)

    Google Scholar 

  8. Qadeer, S., Wu, D.: Kiss: keep it simple and sequential. In: PLDI ’04, pp. 14–24. ACM, New York (2004)

    Google Scholar 

  9. Flanagan, C., Freund, S.N.: Fasttrack: efficient and precise dynamic race detection. In: PLDI ’09, pp. 121–133. ACM, New York (2009)

    Google Scholar 

  10. Angerer, C.M., Gross, T.R.: Exploiting task order information for optimizing sequentially consistent java programs. In: PACT ’11, pp. 393–402 (2011)

    Google Scholar 

  11. Angerer, C.M., Gross, T.R.: Static analysis of dynamic schedules and its application to optimization of parallel programs. In: Cooper, K., Mellor-Crummey, J., Sarkar, V. (eds.) LCPC 2010. LNCS, vol. 6548, pp. 16–30. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  12. Dean, J., Ghemawat, S.: Mapreduce: simplified data processing on large clusters. In: OSDI ’04, p. 10. USENIX Association, Berkeley (2004)

    Google Scholar 

  13. Angerer, C.M., Gross, T.R.: Now happens-before later: static schedule analysis of fine-grained parallelism with explicit happens-before relationships. In: Onward!/SPLASH ’10, pp. 3–10. ACM, New York (2010)

    Google Scholar 

  14. von Praun, C., Gross, T.R.: Object race detection. SIGPLAN Not. 36, 70–82 (2001)

    Article  Google Scholar 

  15. Smith, L.A., Bull, J.M., Obdrzálek, J.: A parallel java grande benchmark suite. In: Supercomputing ’01, p. 8. ACM, New York (2001)

    Google Scholar 

  16. Terauchi, T.: Checking race freedom via linear programming. In: PLDI ’08, pp. 1–10. ACM, New York (2008)

    Google Scholar 

  17. Terauchi, T., Aiken, A.: A capability calculus for concurrency and determinism. ACM Trans. Program. Lang. Syst. 30, 27:1–27:30 (2008)

    Google Scholar 

  18. Boyland, J.T.: Semantics of fractional permissions with nesting. ACM Trans. Program. Lang. Syst. 32, 22:1–22:33 (2010)

    Google Scholar 

  19. Feng, M., Leiserson, C.E.: Efficient detection of determinacy races in cilk programs. In: SPAA ’97, pp. 1–11. ACM, New York (1997)

    Google Scholar 

  20. Raman, R., Zhao, J., Sarkar, V., Vechev, M., Yahav, E.: Efficient data race detection for async-finish parallelism. In: Barringer, H., et al. (eds.) RV 2010. LNCS, vol. 6418, pp. 368–383. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  21. Yu, Y., Rodeheffer, T., Chen, W.: Racetrack: efficient detection of data race conditions via adaptive tracking. In: SOSP ’05, pp. 221–234. ACM, New York (2005)

    Google Scholar 

  22. Marino, D., Musuvathi, M., Narayanasamy, S.: Literace: effective sampling for lightweight data-race detection. In: PLDI ’09, pp. 134–143. ACM, New York (2009)

    Google Scholar 

  23. Bond, M.D., Coons, K.E., McKinley, K.S.: Pacer: proportional detection of data races. In: PLDI ’10, pp. 255–268. ACM, New York (2010)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Christoph M. Angerer .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Angerer, C.M. (2014). Task-Aware Optimization of Dynamic Fractional Permissions. In: Cașcaval, C., Montesinos, P. (eds) Languages and Compilers for Parallel Computing. LCPC 2013. Lecture Notes in Computer Science(), vol 8664. Springer, Cham. https://doi.org/10.1007/978-3-319-09967-5_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-09967-5_3

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-09966-8

  • Online ISBN: 978-3-319-09967-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics