Concepts of Programming Languages

(Sean Pound) #1
Problem Set 627


  1. How can the priority of a thread be set in Java?

  2. Can Java threads be actor threads, server threads, or either?

  3. Describe the actions of the three Java methods that are used to support
    cooperation synchronization.

  4. What kind of Java object is a monitor?

  5. Explain why Java includes the Runnable interface.

  6. What are the two methods used with Java Semaphore objects?

  7. What is the advantage of the nonblocking synchronization in Java?

  8. What are the methods of the Java AtomicInteger class and what is the
    purpose of this class?

  9. How are explicit locks supported in Java?

  10. What kinds of methods can run in a C# thread?

  11. Can C# threads be actor threads, server threads, or either?

  12. What are the two ways a C# thread can be called synchronously?

  13. How can a C# thread be called asynchronously?

  14. How is the returned value from an asynchronously called thread
    retrieved in C#?

  15. What is different about C#’s Sleep method, relative to Java’s sleep?

  16. What exactly does C#’s Abort method do?

  17. What is the purpose of C#’s Interlocked class?

  18. What does the C# lock statement do?

  19. On what language is Multilisp based?

  20. What is the semantics of Multilisp’s pcall construct?

  21. How is a thread created in CML?

  22. What is the type of an F# heap-allocated mutatable variable?

  23. Why don’t F# immutable variables require synchronized access in a mul-
    tithreaded program?

  24. What is the objective of the specification statements of High-
    Performance Fortran?

  25. What is the purpose of the FORALL statement of High-Performance
    Fortran and Fortran?


PROBLEM SET



  1. Explain clearly why competition synchronization is not a problem
    in a programming environment that supports coroutines but not
    concurrency.

  2. What is the best action a system can take when deadlock is detected?

Free download pdf