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.
You might also like to view...
Using the find utility, perform the following tasks:
a. List all files in the working directory and all subdirectories that have been modified within the last day. b. List all files you have read access to on the system that are larger than 1 megabyte. c. Remove all files named core from the directory structure rooted at your home directory. d. List the inode numbers of all files in the working directory whose filenames end in .c. e. List all files you have read access to on the root filesystem that have been modified in the last 30 days.
Your e-mail client software transmits the message files from your Outbox to the mail server.
Answer the following statement true (T) or false (F)