Concepts of Programming Languages

(Sean Pound) #1

626 Chapter 13 Concurrency



  1. What is a thread of control in a program?

  2. Why are coroutines called quasi-concurrent?

  3. What is a multithreaded program?

  4. What are four reasons for studying language support for concurrency?

  5. What is a heavyweight task? What is a lightweight task?

  6. Define task, synchronization, competition and cooperation synchronization,
    liveness, race condition, and deadlock.

  7. What kind of tasks do not require any kind of synchronization?

  8. Describe the five different states in which a task can be.

  9. What is a task descriptor?

  10. In the context of language support for concurrency, what is a guard?

  11. What is the purpose of a task-ready queue?

  12. What are the two primary design issues for language support for
    concurrency?

  13. Describe the actions of the wait and release operations for semaphores.

  14. What is a binary semaphore? What is a counting semaphore?

  15. What are the primary problems with using semaphores to provide
    synchronization?

  16. What advantage do monitors have over semaphores?

  17. In what three common languages can monitors be implemented?

  18. Define rendezvous, accept clause, entry clause, actor task, server task,
    extended accept clause, open accept clause, closed accept clause, and com-
    pleted task.

  19. Which is more general, concurrency through monitors or concurrency
    through message passing?

  20. Are Ada tasks created statically or dynamically?

  21. What purpose does an extended accept clause serve?

  22. How is cooperation synchronization provided for Ada tasks?

  23. What is the purpose of an Ada terminate clause?

  24. What is the advantage of protected objects in Ada 95 over tasks for
    providing access to shared data objects?

  25. Specifically, what Java program unit can run concurrently with the main
    method in an application program?

  26. Are Java threads lightweight or heavyweight tasks?

  27. What does the Java sleep method do?

  28. What does the Java yield method do?

  29. What does the Java join method do?

  30. What does the Java interrupt method do?

  31. What are the two Java constructs that can be declared to be
    synchronized?

Free download pdf