Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

High-Level Concurrency Constructs

  • Chapter
  • First Online:
Understanding Control Flow
  • 1069 Accesses

Abstract

Chapter 7, p. 313 on threads and locks ended with the readers and writer problem, which is an important concurrent problem. However, it is clear that the solutions to the readers and writer problem were becoming complex; too complex to feel comfortable about the correctness of the solution without extensive analysis. While coding conventions like split-binary semaphores and baton passing give a formal design approach, the resulting programs are still complex, both to manage and maintain; basically, relying on programmers following coding conventions to assure correctness is a poor approach. As well, there is the subtle problem of properly handling staleness and writing because of the “window” for interrupt ion between releasing the entry semaphore and blocking. In essence, we have arrived at the same impasse that occurred with software solutions for mutual exclusion, that is, the complexity and inefficiency of the locking solution is increasing for more complex critical-section. Therefore, it is worthwhile to search for a different approach to reduce the complexity, as for hardware solutions for mutual exclusion. However, in this case, the programming language, not the hardware, provides the mechanism to simplify the solution.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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
Hardcover Book
USD 54.99
Price excludes VAT (USA)
  • Durable hardcover 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.

    Aliasing problems may preclude complete checking for nested deadlock situations.

  2. 2.

    No shared variables were supported; hence, the region statement had only a conditional expression so only one critical region could be active in a program.

  3. 3.

    Simula67 [9] was the first object-oriented programming language.

  4. 4.

    In fact, a counter is unnecessary because the state of the buffer, i.e., full or empty, can be determined by appropriate comparisons between front and back. However, these comparisons can be subtle, whereas the counter is straightforward.

  5. 5.

    This section is a revision of “Monitor Classification” in [8] ©1995 ACM. Portions reprinted by permission.

  6. 6.

    For all tables of this form, the queue head is on the left. Also, for a line with a “wait” comment, the wait operation has already been performed by the task in the monitor on the previous line, and the “wait” line shows that task already blocked on the specified condition variable.

  7. 7.

    Again, no dynamic allocation is performed by this algorithm, as the list node is created as a local variable on the task’s stack, which eliminates the need for dynamic storage-allocation.

  8. 8.

    Modula-3 takes this one step further by defining the signal routine to wake up at least one task, which implies that it may wake up more than one task. This semantics is modelled in the taxonomy as a no-priority non-blocking monitor with a loop around each signal that executes a random number of times.

References

  1. Andrews, G.R.: Concurrent Programming: Principles and Practice. Benjamin/Cummings Publishing, Redwood City (1991)

    MATH  Google Scholar 

  2. Birrell, A., Brown, M.R., Cardelli, L., Donahue, J., Glassman, L., Gutag, J., Harning, J., Kalsow, B., Levin, R., Nelson, G.: Systems Programming with Modula-3. Prentice Hall Series in Innovative Technology. Prentice-Hall, Englewood Cliffs (1991)

    Google Scholar 

  3. Brinch Hansen, P.: Structured multiprogramming. Commun. ACM 15(7), 574–578 (1972)

    Article  MATH  Google Scholar 

  4. Brinch Hansen, P.: Concurrent programming concepts. Softw. Pract. Exp. 5(4), 223–245 (1973)

    MATH  Google Scholar 

  5. Brinch Hansen, P.: The programming language concurrent pascal. IEEE Trans. Softw. Eng. 2, 199–206 (1975)

    Article  Google Scholar 

  6. Brinch Hansen, P.: The design of Edison. Softw. Pract. Exp. 11(4), 363–396 (1981)

    Article  MATH  Google Scholar 

  7. Buhr, P.A.: Are safe concurrency libraries possible? Commun. ACM 38(2), 117–120 (1995)

    Google Scholar 

  8. Buhr, P.A., Fortier, M., Coffin, M.H.: Monitor classification. ACM Comput. Surv. 27(1), 63–107 (1995)

    Article  Google Scholar 

  9. Dahl, O.J., Myhrhaug, B., Nygaard, K.: Simula67 Common Base Language. Norwegian Computing Center, Oslo Norway (1970)

    Google Scholar 

  10. Dijkstra, E.W.: Hierarchical ordering of sequential processes. Acta Inf. 1, 115–138 (1971)

    Article  MathSciNet  Google Scholar 

  11. Hoare, C.A.R.: Towards a theory of parallel programming. In: Hoare, C.A.R., Perott, R.H. (eds.) Operating Systems Techniques, pp. 61–71. Academic Press, New York (1972)

    Google Scholar 

  12. Hoare, C.A.R.: Monitors: An operating system structuring concept. Commun. ACM 17(10), 549–557 (1974)

    Article  MATH  Google Scholar 

  13. Howard, J.H.: Signaling in monitors. In: Proceedings Second International Conference Software Engineering, pp. 47–52. IEEE Computer Society, San Francisco, U.S.A (1976)

    Google Scholar 

  14. Kessels, J.L.W.: An alternative to event queues for synchronization in monitors. Commun. ACM 20(7), 500–503 (1977)

    Article  MATH  Google Scholar 

  15. Lampson, B.W., Redell, D.D.: Experience with processes and monitors in mesa. Commun. ACM 23(2), 105–117 (1980)

    Article  Google Scholar 

  16. Lea, D.: Concurrent Programming in Java: Design Principles and Patterns, 1st edn. Addison-Wesley, Boston (1997)

    MATH  Google Scholar 

  17. Mitchell, J.G., Maybury, W., Sweet, R.: Mesa language manual. Tech. Rep. CSL–79–3, Xerox Palo Alto Research Center (1979)

    Google Scholar 

  18. Trono, J.A.: A new exercise in concurrency. SIGCSE Bull. 26(3), 8–10 (1994)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Buhr, P.A. (2016). High-Level Concurrency Constructs. In: Understanding Control Flow. Springer, Cham. https://doi.org/10.1007/978-3-319-25703-7_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-25703-7_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-25701-3

  • Online ISBN: 978-3-319-25703-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics