
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















user-level RPC
kernel
MT client
MT server
data transfer
needs to be efficient ā performance of systems dependsupon fast IPC mechanism
-^
typical ālocalā IPC mechanismsā shared synchronization variablesā shared memory
-^
typical ālocalā or āremoteā IPC mechanismsā message passing
our discussion will concentrate on ālocalā communication
In RPC, communication between address spaces isstructured similarly to procedure calls
-^
An RPC runtime hides from higher layers addresscrossing, type checking, procedure parameter andresult transfers, etcā¦)
-^
From the callerās perspective, RPC aresynchronous calls ā can have different failuresemantics
-^
details in following lecture
standard RPC is kernel-basedā this is overkill for multi-threaded applications: argument
similar as for user-level threads: cost of trapping in thekernel, switching memory management contextā¦
URPC is specialization of RPC for a SMM
-^
Characteristics summary:ā shared memory is used for passing arguments and results,
without kernel invocation
frequent by lazy address-switch
multithreaded programs
sharedmailbox
serverāsaddressspace
authentication implied staticallyā mapping done once by kernel pairwise between client
and server
correctness checked dynamicallyā on each call-return between client and server by URPC
runtime (runtime responsible for putting data inmemory buffers, inspecting type, range, etcā¦)
upshot?ā cross address space calls can be implemented without
involvement of the kernel ā both send and receive canbe done within the user-level libraryā¦
solution:ā give P1 to some other ready in client (thread
management at user level)
the server thread to handle the call i.e. keep the OS out!
-^
always possible to do this?ā if an address space is under-powered then processor
reallocation may be necessary
the same address space, until it really has togive processor to another address space
Client has an editor with two thread T1 and T
-^
T1 invokes a procedure in a window manager,then upon return invokes a procedure in a filecache manager
-^
T2 invokes a procedure in a file cache manager
-^
Initially, the editor and window manager arerunning on two processors, the file cache manageris not scheduled on a processor.
-^
What is the sequence of events?
processor reallocation without any schedulingdecision ā amortize cost of kernel involvementover multiple cross-address space calls
-^
data transfer via shared memoryā no kernel copying, no dynamic protection checkingā message channels protected by polling style t&s locks
-^
user level threadsā 100 times cheaper than kernel threads for context
switches