A server process maintains a shared information object such as the BLOB object. Give arguments for and against allowing the client requests to be executed concurrently by the server. In the case that they are executed concurrently, give an example of possible ‘interference’ that can occur between the operations of different clients. Suggest how such interference may be prevented.

What will be an ideal response?

For concurrent executions - more throughput in the server (particularly if the server has to access a disk or another service)
Against - problems of interference between concurrent operations
Example:
Client A’s thread reads value of variable X Client B’s thread reads value of variable X
Client A’s thread adds 1 to its value and stores the result in X
Client B’s thread subtracts 1 from its value and stores the result in X

Result: X := X-1; imagine that X is the balance of a bank account, and clients A and B are implementing credit and debit transactions, and you can see immediately that the result is incorrect.
To overcome interference use some form of concurrency control. For example, for a Java server use synchronized operations such as credit and debit.

Computer Science & Information Technology

You might also like to view...

A default chart sheet is named ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

When adding a new class file to a Visual C# project, be sure that the filename ends with the ____________ extension.

a. .cls b. .resx c. .src d. .cs

Computer Science & Information Technology