The loadTable.c file details
Data Structures :
StrArr *strArr : The string array that
keeps all the information about coordinator
read from the node_inf_file.
char myIPaddr[100] : The variable
stores the ip-address of the machine.
char machineName[100] : Stores
the name of the machine.
char ipAddr[100] : The value
of the ip-address read from the node_inf_file.
char archName[100] : The machine
architecture.
char fileSystem [100] : The
file system type.
char capacity [100] : The
machine capacity.
char cpuId1[100] : The beginning
of the range.
char cpuId2[100] : Then end
of the range.
Following are the tasks done in this file loadTable.c:
-
Open the file that is specified by the join process from which the
information about the hostname can be obtained. If no file-name is specified
then the default file "kernel/src/coordinator/node_inf_file"
is opened.
-
This file has an entry for each of the machine that could possibly
participate in the ARC system.
-
All these entries are scanned one by one to find some entry that matches
the details of the host-machine.
-
If the entry is found it means that the host-machine is permitted to
take part in the ARC computing else not.
-
Now having found the entry, all the other details containted in that
entry are copied in a string array.
Below is the format of the information stored in the "/kernel/src/coordinator/node_inf_file".
An example of the entry in the file could be following :
janjira 192.168.211.33 JANJIRA
janjira 9000 1073778689
1073782784
I has seven columns.
-
Column 1: The name of the machine.
-
Column 2: IP address of the machine.
-
Column 3: Machine architecture.
-
Column 4: File system present in the machine.
-
Column 5: Computational capacity of the machine, measured relative
to the standard machine whose computing capacity has been assumed to be
10000.
-
Column 6: Beginning range of the program number.
-
Column 7: End range of the program number.