void* result_intimation_5_svc(LongArr* longArr,struct
svc_req *junk)
On the client side
This function is called
by thr ARC Function Executer to send the intimation that the result is
ready.
On the server side
The function is invoked
on the coordinator present in the same node as the ARC Function Executer
For executing the received RIB, the coordinator
spawns a ARC function server that executes the RIB . After the execution
is complete, the function informs the server about the availability of
result by invoking this RPC function locally on the coordinator. The argument
passed to this function is an array that contains the information such
as the RIB id, type of message, program number, etc. A message is constructed
using this information and it is send to the message queue so that it can
be picked up the user library. The user library can later obtain the results
from the ARC Executer Function.
void* register_program_5_svc( int* pid, struct svc_req* junk)
On the client side
The function is invoked
by the user library to register the user program's process id with the
coordinator.
On the server side
The call is received
by the local coordinator.
The user interface layer has to
register user programs with the local coordinator before performing any
user's distributed computation. This is the function exposed to the user
interface layer to register user programs with the coordinator. The function
takes as argument the process id(pid) of the user program. This step is
important because using this pid, the coordinator communicates with the
layer to inform them about the fate of the user's RIB execution.
There is an array contained the pid's of all
the user programs registered with the coordinator. This function adds the
supplied pid to this array.
void* unregister_program_5_svc( int* pid, struct svc_req*
junk)
On the client side
The function is invoked
by the user library for unregistering the user programs with the coordinator.
On the server side
The call is made on
the local coordinator.
This function is for unregistering
the process id's of the user programs. The argument is the process id.
The function scans the list of process ids and deletes the one that matched
the supplied id. This functions dis-associates the user program from the
coordinator.
void* unlock_5_svc( LocalLockArr* lockList, struct svc_req
*junk2)
On the client side
User library calls this
function to free the list of locks that it had acquired for exection user
program.
On the server side
The call is made on
the coordinator present in the same node as the user library.
When the execution of user programs is to be
done on remote machine, locks on those remote machines have to be acquired.
These locks must be returned to the machines after the execution is over
so that the locks can be reassigned to other users.
This function takes as an argument,lockList, the list of
locks that are to be freed. Some of the locks may present in the list lockList,
may be local locks and some may be remote.
For each of the locks present in the list ,
there is a node-id field that tells the owner node for that lock.
For each lock in the lockList,
1) If the lock is local, mark the status of
lock as free in the global lock array. No RPC calls are required for doing
this.
2) For the remote locks, create a connection
with the remote machine and invoke RPC function set_lock_free()
on those remote machine.
3) Before the remote lock was acquired, its
entry was made in the requestedList. Hence after the remote lock is returned,
its entry is deleted from the list.