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...

The stream manipulators that format justification are ________, ________ and ________.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Which of the following is NOT an available option for a snip in the Snipping Tool?

A) Free-form Snip B) Rectangle Snip C) Window Snip D) Desktop Snip

Computer Science & Information Technology

A constructor can specify the return type:

a. int. b. string. c. void. d. A constructor cannot specify a return type.

Computer Science & Information Technology

What is the difference between scaling paths and offseting paths?

What will be an ideal response?

Computer Science & Information Technology