## 3 Materials and Method
### Load Balance  
As mentioned in [11], each SM collects every PE that enters or leaves the grid system and then communicates it to its parent LGM. The above means an input layer only needs communication when it joins or leaves its site. The device burden between computing components can be matched by utilizing the gathered information to effectively use all device resources to reduce response time for user jobs. This strategy would boost connectivity and device efficiency by minimizing overhead contact requiring capturing system details before making a task scheduling decision. The process measures for the GCS model to formalize load balancing policy are defined as:  
1. Job: all jobs in the system will be represented by a job ID, job size in bytes, and a number of job instructions. 2. Processing element capacity (\(PEC_{ij}\)): defined as the number of jobs that can be processed by the \(j\)th PE at full workload in the \(i\)th site per second. The \(PEC\) can be measured assuming an average number of job instructions using the PE's CPU speed. 3. Site processing capacity (\(SPC_{i}\)): defined as the number of jobs that can be processed by the \(i\)th site per second. Hence, the \(SPC_{i}\) can be measured by summing all the PECs for all the PEs managed the \(i\)th site. 4. Local grid manager processing capacity (\(LPC\)): defined as the number of jobs that can be processed by the LGM per second. The \(LPC\) can be measured by summing all the \(SPCs\) for all the sites managed by that LGM. 5. Load Balance Estimation As described in [11], the load balancing strategy is multi-level and can be clarified, as follows, at each grid design level:  
1. Load balance 0 (central grid manager): as stated earlier, in terms of processing capability SPCs, the LGM retains information regarding all its responsible SMs. \(LPC\) is the total LGM processing capacity measured as the sum of all SPCs for all LGM sites. Based on each site's overall computing power, the LGM scheduler balances the workload of all site community members (SMs). Where \(N_{j}\) specifies the number of jobs at an LGM in a steady state, \(i\)th site workload (\(S_{i}WL\)) is its number of jobs to be delegated to the site manager and is measured as follows: \[S_{i}WL=N_{j}\times\frac{SPC_{i}}{LPC}\] (6)Load balancing at level 1 (site manager): each SM has PEC information on all input nodes in its pool. The overall site processing capability SPC is measured by the sum of all PECs of all processing elements in the site. Where \(M_{j}\) is specified as the number of jobs in a steady state at an SM, the SM scheduler uses the same strategy used by the LGM scheduler to distribute the load. Based on their processing power, the strategy of sharing site workload among the PE community would optimize the productivity of each PE and also boost their resource usage. On the other hand, the amount of jobs for the \(i\)th PE is specified as the \(i\)th PE workflow (\(PE_{i}WL\)), calculated as follows:  
\[PE_{i}WL=M_{j}\times\frac{PEC_{i}}{SPC} \tag{7}\]  
Self-Stabilizing Controller  
To calculate the mean job response time, one LGM scenario has been assumed to streamline the grid model. This scenario focuses on the time spent in processing elements by a job. Algorithm 3 is used to measure the traffic volume and the estimated mean response time. ```
1:Obtain \(\lambda\), \(\mu\) where, \(\lambda\) is the external job arrival rate from grid clients to the LGM, \(\mu\) is the LGM processing capacity. 2:Calculate \(\rho=\lambda/\mu\) as the system traffic intensity. For the system to be stable, \(\rho\) must be less than 1. 3:For\(i=1\) to \(m\)
4:Calculate \(\lambda_{i}\), \(\mu_{i}\) where \(\lambda_{i}\) is the job flow rate from the LGM to the \(i\)th SM, which is managed by that LGM, \(\mu_{i}\) is processing capacity of the \(i\)th SM. 5:Calculate \(\rho_{i}=\lambda/\mu_{i}\) that is the traffic intensity of the \(i\)th SM.