## 3 Materials and Methods
### Proposed Approach
#### 3.1.4 Working Model of the Proposed Approach  
The main purpose of the proposed approach is to take a task set as an input and provide, as output, the number of VMs and the tasks to be assigned to each of the VMs. Apart from this, the proposed fuzzy approach also determines the order in which the tasks on each VM will be executed. Once the proposed approach has determined the number of VMs to be used and the tasks assigned to them, the public cloud user hires the required number of VMs and submits their respective tasks to them in the order of execution stipulated by the proposed approach. A schematic diagram of the proposed approach with respect to the public cloud provider and the cloud user is presented in Figure 1. As shown in the schematic, the cloud user operates the proposed approach and provides the task set as input. The task scheduling manager takes the task-set input and uses the fuzzy controller to obtain the number of VMs and the task subsets that will be assigned to each VM. Then, it first uses the task queue updater to sort the tasks by deadline (earliest first), then by priority (highest priority first). The final step is to obtain the required number of VMs from the public cloud provider and assign them the tasks according to the final task ordering. The high-level operation of the proposed approach is described in Figure 2 in the form of a flowchart. The proposed approach receives the set of tasks to be processed using public cloud. The first procedure to perform is to obtain the number of VMs that will be needed to execute the tasks, as well as the tasks that each of those VMs will receive. This part is accomplished with the help of the proposed fuzzy controller. The fuzzy controller initializes a VM list and starts checking the compatibility of each task for the VMs in the VM list. A task is assigned to the first VM that satisfies its requirements. After all the tasks have been assigned to their respective VMs, the fuzzy controller forwards the VM-task mapping to the next stage of the proposed approach. This stage sorts the tasks on each VM first according to the order of their deadlines, with earliest deadlines coming first. Then it further sorts the tasks such that high-priority tasks are brought to the head of the task list. Finally, the sorted and mapped task list is sent to be processed on the public cloud. Algorithm 1 describes the operation of the proposed FPD task scheduling approach. In lines 1-3, the task characteristics that are part of each task's tuple are arranged into separate sets for length, deadline, and priority of tasks. In line 4, the algorithm creates an empty sorted task list that will contain the task scheduling information for the processing of the task set on the public cloud. Then, in line 5, a call is made to the fuzzy controller, with task length and priority inputs passed as arguments. This call returns a mapping from tasks to the number of VMs that will be required. Following this, in lines 6 to 10, the algorithm iterates over the total number of VMs and sorts the tasks assigned to each VM, first by the deadline (earliest first), then by priority (highest priority first). This causes the task queue on each VM to have higher-priority tasks before lower priority-tasks, with a further ordering by deadline (earliest first). The sorted list resulting from each iteration of this loop is added to the final sorted task list (\(T_{f}\)). Finally, in line 11, \(T_{f}\) is submitted to the public cloud for processing. Figure 1: Schematic diagram of the proposed FPD approach.