Unit3 1
Unit3 1
Unit3 1
2. Which concurrency mechanism allows for the orderly access to shared resources by
multiple processes or threads?
a) Monitors b) Message Passing
c) Java Threads d) Exception Handling
3. Which programming language provides support for concurrent programming
through the concept of Java Threads?
a) C++ b) Ada c) Java d) C#
4. What is the primary benefit of using monitors in concurrent programming?
a) Simplified exception handling b) Efficient message passing
c) Avoidance of race conditions d) Increased program execution speed
5. What does statement-level concurrency refer to?
a) Handling exceptions at the statement level
b) Executing multiple statements concurrently
c) Coordinating events in a program
d) Passing messages between threads
6. Exception handling in programming languages like Ada, C++, and Java allows
programs to:
a) Completely ignore errors during execution
b) Gracefully recover from errors and continue execution
c) Terminate execution immediately upon encountering an error
d) Increase the likelihood of encountering errors
7. Event handling in programming languages like Java and C# is primarily used for: a)
Managing exceptions during program execution b) Coordinating concurrent
processes c) Responding to user interactions and system events d) Controlling access
to shared resources
8. Subprogram-level concurrency primarily deals with:
a) Handling exceptions within subprograms
b) Coordinating multiple subprograms to execute concurrently
c) Passing messages between subprograms
d) Implementing monitors within subprograms