A client makes RMIs to a server. The client takes 5 ms to compute the arguments for each request, and the server takes 10ms to process each request. The local OS processing time for each send or receive operation is 0.5 ms, and the network time to transmit each request or reply message is 3 ms. Marshalling or unmarshalling takes 0.5 ms per message.

Estimate the time taken by the client to generate and return from 2 requests (i) if it is single-threaded, and (ii) if it has two threads which can make requests concurrently on a single processor. Is there a need for asynchronous RMI if processes are multi-threaded?

(i) Single-threaded time: 2(5 (prepare) + 4(0.5 (marsh/unmarsh) + 0.5 (local OS)) + 2*3 (net)) + 10 (serv)) = 50 ms.

(ii) Two-threaded time: (see figure 6.14) because of the overlap, the total is that of the time for the first operation’s request message to reach the server, for the server to perform all processing of both request and reply messages without interruption, and for the second operation’s reply message to reach the client.
This is: 5 + (0.5+0.5+3) + (0.5+0.5+10+0.5+0.5) + (0.5+0.5+10+0.5+0.5) + (3 + 0.5+0.5)
= 37ms.

Computer Science & Information Technology

You might also like to view...

Data validation is a ________

A) set of rules or constraints B) set of drop down options C) set of formatting codes D) set of masking characters

Computer Science & Information Technology

Which of the following is not true about a list level in PowerPoint?

A) Normally the text is different with each level. B) The default alignment is centered. C) It is represented by a bullet symbol. D) The text is indented.

Computer Science & Information Technology