In this section, we use the four strategies which is presented in [14] to analyze whether a new request can be accepted or not based on the QoS requirements and resource capability and an algorithm has been introduced that utilizes these strategies based on its knowledge to allocate resources. In this algorithm, the admission control part uses different strategies for each request to decide which user requests would be accepted. The knowledge process component forecasts which sequence of these strategies should be run for each request and it is contributed to the admission control component to run the best sequence, and finally the scheduling component is responsible for allocating resources and scheduling based on the admission control result.
Strategies
The strategies that admission control uses to decide which of the users’ requests can be accepted are introduced as follows: 1) Initiate new VM 2) Wait Strategy 3) Insert Before strategy and 4) Penalty Delay Strategy. Inputs of all strategies are QoS parameters of the new request and resource providers’ related information. Outputs of all strategies are admission control and scheduling related information, for example, which VM and in which resource provider the request can be scheduled. In our algorithm, first strategy is represented as “canInitiateNewVM ()” and second strategy is represented as “canWait ()” and third strategy is represented as “canInsertBefor ()” and finally, fourth strategy is represented as “canPenaltyDelay ()”.
Different Sequences of Strategies
In this section, we will present three different sequences of strategies which are used by admission control for user requests. Three different sequences of strategies in each resource provider is depicted in Fig. 4.
As seen in Fig. 4, in sequence1, in each resource provider, four strategies are checked to find the best strategy to processing the new request, in other words, in the first resource provider, first it checks if the new request can wait all accepted requests to complete in any initiated VM in this resource provider, If the request cannot wait, then it checks if the new request can be inserted before any accepted request in any already initiated VM, otherwise the algorithm checks if the new request can be accepted by initiating a new VM provided by any resource provider or by delaying the new request with penalty compensation; if a strategy is found, checking is stopped and the result will pass to scheduling part, but if no strategy is found, the same scenario runs in the next resource provider to find a suitable strategy. If a SaaS provider does not make sufficient profit by any strategy, the new request will be rejected. Otherwise, the request is accepted and scheduled based on the entry in “PotentialScheduleList” which gives the maximum return.
In sequence 2, in each resource provider for each VM type, the first three strategies (canWait (), canInsertBefor () and canInitiateNewVM ()) are checked to find the best strategy for processing the new request. If a strategy is found, checking is stopped and the result will pass to scheduling part, but if it ends up in not finding any strategies, it will check the last strategy (canPenaltyDelay ()) in each resource provider and so on.
In sequence3, in each resource provider, the first strategy (canWait ()) is checked, if it is suitable for processing the new request in any resource providers, the second strategy is checked in each resource provider and so on.
Proposed Algorithm
A service provider can maximize the profit by reducing the infrastructure cost, which depends on the number and type of initiated VMs in IaaS providers’ datacenter. Therefore, our algorithms are designed in a way that minimize the number of VMs by maximizing the utilization of already initiated VMs. In this section, based on the above strategies, we propose an algorithm, which is a knowledge-based Profit Maximization (KBPM). Algorithm 1 in Fig. 5, describes the knowledge-Based Profit Maximization algorithm, which involves three main phases: 1) admission control, 2) knowledge process, and 3) scheduling.
In the admission control phase, the new user request will be checked if it can be processed by any strategies. Hence, firstly, it sends the new request’s characteristics to knowledge process for getting the sequence’ number of running strategies. When the value is returned from the knowledge process, based on the returned result, it runs strategies. For example if the returned value is equal to ‘1’, firstly the algorithm checks if the new request can wait all accepted requests to complete in any initiated VM – invoking Wait Strategy. If the request cannot wait, then it checks if the new request can be inserted before any accepted request in any already initiated VM – using InsertBefor Strategy. Otherwise the algorithm checks if the new request can be accepted by initiating a new VM provided using Initiate New VM Strategy or by delaying the new request with penalty compensation – using Penalty Delay Strategy.
If a SaaS provider does not make sufficient profit by any strategy, the algorithm rejects the new request.
Otherwise, the request is accepted and scheduled based on the entry in PotentialScheduleList which gives the maximum return.
The scheduling phase is the actual resource allocation and scheduling based on the admission control result; if the algorithm accepts the new request, the algorithm first finds out in which IaaS provider (rpj) and which VM (vmi) a SaaS provider can gain the maximum investment return by extracting information from PotentialScheduleList . If the maximum investment return is gained by initiating a new VM, then the algorithm initiates a new VM in the referred resource provider (rpj), and schedule the request to it. Finally, the algorithm schedules the new request on the referred VM (vmi).
It should be noted that in this algorithm supposed, the available IaaS providers are ordered by distance. In other words, the IaaS Provider with a minimum distance is consider the first provider.
Decision Tree Algorithm
The Microsoft Decision Tree algorithm is a classification and regression algorithm provided by Microsoft SQL Server Analysis Services to be used in the predictive modeling of both discrete and continuous attributes. For discrete attributes, the algorithm makes predictions based on the relationships between input columns in a dataset. It uses the values, known as states, of those columns to predict the states of a column that is designated as predictable. Specifically, the algorithm identifies the input columns that are correlated with the predictable column. For example, in a scenario to predict which sequence of strategies should be run for the new request, if eight out of ten relax requests run with sequence 1 and two out of ten tight requests run with sequence 3, so the algorithm infers that deadline of requests is a good predictor of selecting sequence of strategies.
Working of Decision Tree
The Microsoft Decision Trees algorithm builds a data mining model by creating a series of splits in the tree. These splits are represented as nodes. The algorithm adds a node to the model every time that an input column is found to be significantly correlated with the predictable column. The way that the algorithm determines a split is different depending on whether it is predicting a continuous column or a discrete column. The predictable column in our system is the sequence’s number of strategies and input columns are request’s characteristics such as Deadline, Budget, FileSize, and Length. Fig. 6 shows the used decision tree, it is based on the knowledge database.