Research Article

Fragmented Task Scheduling for Load-Balanced Fog Computing Based on Q-Learning

Algorithm 1

Q-Learning Based Load Balanced Task Scheduling.
Input:
Output: Delay violations, security violations, optimal Q-table values and policy
1 while All IoT tasks are scheduled do
2 Obtain by slicing the IoT task based on security requirement and task size ;
3 Use policy Equation (16) to select action ;
4 Get response time of selected fog node using (10).
5 Get of selected fog node .;
6 Calculate reward using (14)
7 Use (17) to update the Q-table;
8 Update the available resource state , system states , time step
9 end while