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

Calculate the time taken by the client to generate and return from two requests: (i) if it is single-threaded, and
(ii) if it has two threads that can make requests concurrently on a single processor.

You can ignore context-switching times. Is there a need for asynchronous RPC if client and server processes are threaded?


i) time per call = calc. args + marshal args + OS send time + message transmission +
OS receive time + unmarshall args + execute server procedure
+ marshall results + OS send time + message transmission +
OS receive time + unmarshal args
= 5 + 4*marshal/unmarshal + 4*OS send/receive + 2*message transmission + execute server procedure
= 5+ 4*0.5 + 4*0.5 + +2*3 + 10 ms = 5+2+2+6+10 =25ms.
Time for two calls = 50 ms.
ii) threaded calls:
client does calc. args + marshal args + OS send time (call 1) = 5+.5=.5 = 6
then calc args + marshal args + OS send time (call 2) = 6
= 12 ms then waits for reply from first call
server gets first call after
message transmission + OS receive time + unmarshal args = 6+ 3+.5+.5
= 10 ms, takes 10+1 to execute, marshal, send at 21 ms
server receives 2nd call before this, but works on it after 21 ms taking
10+1, sends it at 32 ms from start
client receives it 3+1 = 4 ms later i.e. at 36 ms
(message transmission + OS receive time + unmarshal args) later
Time for 2 calls = 36 ms.

Computer Science & Information Technology

You might also like to view...

If a certain object’s data members need to be frequently modified by const functions, it is best to:

a. Declare the member values non-const. b. Declare the member values mutable. c. Use const_cast to make the member values modifiable. d. Use static_cast to make the member values modifiable.

Computer Science & Information Technology

Which of the following are used in VBA to leave notes or instructions regarding the macro?

A) Indicators B) Keywords C) Index notes D) Comments

Computer Science & Information Technology

Outlook displays a message box if you do not enter a ________ for an e-mail message before clicking Send.

a. Outlook does not display a message box before clicking send. b. Bcc address c. Subject d. Cc address

Computer Science & Information Technology

Windows Live Messenger has been replaced with _____.

A. ?ICQ B. ?AIM C. ?Skype D. ?Yahoo! Messenger

Computer Science & Information Technology