Which of the following statements is false?

a. If an operation requires the executing thread to hold a lock while the operation is performed, a thread must relase the lock before proceeding with the operation. Other threads attempting to perform an operation that requires the same lock will be blocked until the first thread releases the lock, at which point the blocked threads may attempt to acquire the lock and proceed with the operation.
b. To specify that a thread must hold a monitor lock to execute a block of code, the code should be placed in a synchronized statement.
c. Code in a synchronized statement is said to be guarded by the monitor lock; a thread must acquire the lock to execute the guarded statements.
d. The monitor allows only one thread at a time to execute statements within synchronized statements that lock on the same object, as only one thread at a time can hold the monitor lock. The synchronized statements are declared using the synchronized keyword.

a. If an operation requires the executing thread to hold a lock while the operation is performed, a thread must release the lock before proceeding with the operation. Other threads attempting to perform an operation that requires the same lock will be blocked until the first thread releases the lock, at which point the blocked threads may attempt to acquire the lock and proceed with the operation. Actually, if an operation requires the executing thread to hold a lock while the operation is performed, a thread must acquire the lock before proceeding with the operation. Other threads attempting to perform an operation that requires the same lock will be blocked until the first thread releases the lock, at which point the blocked threads may attempt to acquire the lock and proceed with the operation.

Computer Science & Information Technology

You might also like to view...

What property can be configured to cause a Control to remain at a fixed distance from the side of a container when the user resizes it?

A. Dock B. Padding C. Anchor D. Filling

Computer Science & Information Technology

The two modes for an FTP transfer are ASCII and:

a. binary b. octal c. decimal d. hexadecimal

Computer Science & Information Technology