A Dynamic Resource Allocation Method for Parallel DataProcessing in Cloud Computing

: Problem statement: One of the Cloud Services, Infrastructure as a Service (IaaS) provides a Compute resourses for demand in various applications like Parallel Data processing. The computer resources offered in the cloud are extremely dynamic and probably heterogeneous. Nephele is the first data processing framework to explicitly exploit the dynamic resource allocation offered by today’s IaaS clouds for both, task scheduling and execution. Particular tasks of processing a job can be assigned to different types of virtual machines which are automatically instantiated and terminated during the job execution. However, the current algorithms does not consider the resource overload or underutilization during the job execution. In this study, we have focussed on increasing the efficacy of the scheduling algorithm for the real time Cloud Computing services. Approach: Our Algorithm utilizes the Turnaround time Utility effieciently by differentiating it into a gain function and a loss function for a single task. The algorithm also assigns high priority for task of early completion and less priority for abortions/deadlines issues of real time tasks. Results: The algorithm has been implemented on both preemptive and Non-premptive methods. The experimental results shows that it outperfoms the existing utility based scheduling algorithms and also compare its performance with both preemptive and Non-preemptive scheduling methods. Conculsion: Hence, a novel Turnaround time utility scheduling approach which focuses on both high priority and the low priority tasks that arrives for scheduling is proposed.


Cloud computing
has the potential to dramatically change the landscape of the current IT industry (Armbrust et al., 2009;Goldberg, 1989) For companies that only have to process large amounts of data occasionally running their own data center is obviously not an option. Instead, Cloud computing has emerged as a promising approach to rent a large IT infrastructure on a short-term pay-per-usage basis. Operators of so-called IaaS clouds, like Amazon EC2, (AWSLLC, 2011a), let their customers allocate, access and control a set of Virtual Machines (VMs) which run inside their data centers and only charge them for the period of time the machines are allocated. The VMs are typically offered in different types, each type with its own characteristics (number of CPU cores, amount of main memory) and cost.
Since the VM abstraction of IaaS clouds fits the architectural paradigm assumed by the data processing frameworks described above, projects like Hadoop The Apache Software Foundation, 2011 (White, 2010), a popular open source implementation of Google's MapReduce framework, already have begun to promote using their frameworks in the cloud (White, 2010) Only recently, Amazon has integrated Hadoop as one of its core infrastructure services (AWSLLC, 2011b). However, instead of embracing its dynamic resource allocation, current data processing frameworks rather expect the cloud to imitate the static nature of the cluster environments (Dornemann et al., 2009) they were originally designed for, e.g., at the moment the types and number of VMs allocated at the beginning of a compute job cannot be changed in the course of processing, although the tasks the job consists of completely different demands on the environment. As a result, rented resources may be inadequate for big parts of the processing job, which may lower the overall processing performance and increase the cost.
One of an IaaS cloud's key feature is the provisioning of compute resources on demand. The computer resources available in the cloud are highly dynamic and possibly heterogeneous. Nephele is the first data processing framework to explicitly exploit the dynamic resource allocation offered by today's IaaS clouds for both task scheduling and execution. Particular tasks of a processing a job can be assigned to different types of virtual machines which are automatically instantiated and terminated during the job execution.
Nephele is the first data processing framework to explicitly exploit the dynamic resource allocation offered by today's IaaS clouds for both, task scheduling and execution. Particular tasks of a processing job can be assigned to different types of virtual machines which are automatically instantiated and terminated during the job execution.
While there exist different interpretations and views on cloud computing (Armbrust et al., 2009) it is less disputable that being able to effectively exploit the computing resources in the clouds to provide computing service at different quality levels is essential to the success of cloud computing. For real-time applications and services, the timeliness is a major criterion in judging the quality of service. Due to the nature of real-time applications over the Internet, the timeliness here refers to more than the deadline guarantee as that for hard real-time systems. In this regard, an important performance metric for cloud computing can thus be the sum of certain value or utility that is accrued by processing all real-time service requests.
To improve the performance of cloud computing, one approach is to employ the traditional Utility Accrual (UA) approach first proposed to associate each task with a Time Utility Function (TUF), which indicates the task's importance. Specifically, the TUF describes the value or utility accrued by a system at the time when a task is completed (Li et al., 2006). Based on this model, there have been extensive research results published on the topic of UA scheduling. While Jensen's definition of TUF allows the semantics of soft time constraints to be more precisely specified, all these variations of UA-aware scheduling algorithms imply that utility is accrued only when a task is successfully completed and the aborted tasks neither increase nor decrease the accrued value or utility of the system. We believe that, to improve the performance of cloud computing, it is important to not only measure the profit when completing a job in time, but also account for the penalty when a job is aborted or discarded. Note that, before a task is aborted or discarded, it consumes system sources including network bandwidth, storage space and processing power and thus can directly or indirectly affect the system performance. This is especially true for cloud computing in considering the large possibility of migration of a task within the clouds for reasons such as the economy considerations (Casati and Shan, 2001). If a job is deemed to miss its deadline with no positive semantic gain, a better choice should be one that can detect it and discard it as soon as possible.
Recently, (Yu et al., 2010) proposed a task model that considers both the profit and penalty that a system may incur when executing a task. According to this model, a task is associated with two different TUFs, a profit TUF and a penalty TUF. The system takes a profit (determined by its profit TUF) if the task completes by its deadline and suffers a penalty (determined by its penalty TUF), if it misses its deadline or is dropped before its deadline. It is tempting to use negative values for the penalties and thus combine both TUFs into one single TUF. However, a task can be completed or aborted and hence can produce either a profit value or a penalty value. Mathematically, if there exists such a single function, it would imply that a single value in its domain was mapped to two values in its range, violating that it is a function. Therefore, one utility function cannot accurately represent both the profit and penalty information when executing a task. There are also some other penalty related models proposed in the literature. For example, studied the on-line scheduling problem when penalties have to be paid for rejected jobs. This model, however, does not account for the penalty to drop the task before its deadline.
However Nephele does not consider resource overload or underutilization during the job execution automatically. In this study, a novel Turnaround time utility algorithm is proposed for scheduling the realtime cloud computing services. The most unique characteristics of this approach is that, different from traditional utility accrual approach that works under one single Time Utility Function (TUF), which have two different functions called a Gain and a loss Functionsassociated with each task at the same time, to model the real-time applications for cloud computing. To compare the performance of cloud computing, the traditional Utility approach is deployed in both Non-Preemptive and Preemptive scheduling.
This study includes further details on scheduling strategies and extended experimental results. The study is structured as follows: First it starts with describing the basic concept of cloud and present the architecture of the Nephele and outline how jobs can be described and executed in the cloud. Followed by our scheduling approach in explained in detail. Then we present the experiment setup used for the evaluation and discuss the results. Finally, we conclude the study.

MARERIALS AND METHODS
Cloud computing: The cloud is a metaphor for the Internet and is an abstraction for the complex infrastructure it conceals. Cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction. It define in three models Software as a Service (SaaS), Platform as a Service (PaaS), Infrastructure as a Service (IaaS). Figure  1 shows the architecture of the cloud computing. Cloud computing system scales applications by maximizing concurrency and using computing resources more efficiently One must optimize locking duration, statelessness, sharing pooled resources such as task threads network connections bus, cache reference data and partition large databases for scaling services to a large number of users. IT companies with innovative ideas for new application services are no longer required to make large capital outlays in the hardware and software infrastructures. By using clouds as the application hosting platform, IT companies are freed from the trivial task of setting up basic hardware and software infrastructures. Thus they can focus more on innovation and creation of business values for their application services. Some of the traditional and emerging Cloud-based application services include social networking, web hosting, content delivery and real time instrumented data processing. Cloud computing also describes applications that are extended to be accessible through the Internet. These cloud applications use large data centers and powerful servers that host Web applications and Web services. Anyone with a suitable Internet connection and a standard browser can access a cloud application.

Task scheduling and load-balancing technique:
A task is a (sequential) activity that uses a set of inputs to produce a set of outputs. Processes in fixed set are statically assigned to processors, either at compile-time or at start-up (i.e., partitioning) avoids overhead of load balancing using these load-balancing algorithms. The Grid computing algorithms can be broadly categorized as centralized or decentralized, dynamic or static or the hybrid policies in latest trend. A centralized load balancing approach can support larger system. Hadoop system takes the centralized scheduler architecture. In static load balancing, all information is known in advance and tasks are allocated according to the prior knowledge and will not be affected by the state of the system. Dynamic load-balancing mechanism has to allocate tasks to the processors dynamically as they arrive. Redistribution of tasks has to take place when some processors become overloaded (Zaharia et al., 2009).
In cloud computing, each applications of users will run on a virtual operating systems, the cloud systems distributed resources among these virtual systems. Every application is completely different and is independent and has no link between each other whatsoever, For example, some require more CPU time to compute complex task and some others may need more memory to store data. Resources are sacrificed on activities performed on each individual unit of service. In order to measure direct costs of applications, every individual use of resources (like CPU cost, memory cost, I/O cost) must be measured. When the direct data of each individual resources cost has been measured, more accurate cost and profit analysis.
Overview of Nephele architecture: Nephele is a new data processing framework (Warneke and Kao, 2009;Ravindran et al., 2005) for cloud environment that takes up many ideas of previous processing frameworks but refines them to better match the dynamic and opaque nature of a cloud.
Nephele's architecture follows a classic masterworker pattern as illustrated in Fig. 2 .
Before submitting a Nephele compute job, a user must start a VM in the cloud which runs the so called Job Manager (JM). The Job Manager which receives the client's jobs, is responsible for scheduling them and coordinates their execution. It is capable of communicating with the interface the cloud operator provides to control the instantiation of VMs. We call this interface the Cloud Controller. By means of the Cloud Controller the Job Manager can allocate or deallocate VMs according to the current job execution phase. We will comply with common Cloud computing terminology and refer to these VMs as instances for the remainder of this study. The term instance type will be used to differentiate between VMs with different hardware characteristics. For example, the instance type "m1.small" could denote VMs with one CPU core, one GB of RAM and a 128 GB disk while the instance type "c1.xlarge" could refer to machines with 8 CPU cores, 18 GB RAM and a 512 GB disk.
The actual execution of tasks which a Nephele job consists of is carried out by a set of instances. Each instance runs a so-called Task Manager (TM). A Task Manager receives one or more tasks from the Job Manager at a time, executes them and after that informs the Job Manager about their completion or possible errors. Unless a job is submitted to the Job Manager, we expect the set of instances (and hence the set of Task Managers) to be empty. Upon job reception the Job Manager then decides, depending on the job's particular tasks, how many and what type of instances the job should be executed on and when the respective instances must be allocated/deallocated to ensure a continuous but cost-efficient processing. The newly allocated instances boot up with a previously compiled VM image. The image is configured to automatically start a Task Manager and register it with the Job Manager. Once all the necessary Task Managers have successfully contacted the Job Manager, it triggers the execution of the scheduled job.
Initially, the VM images used to boot up the Task Managers are blank and do not contain any of the data the Nephele job is supposed to operate on. As a result, we expect the cloud to offer persistent storage (like, e.g., Amazon S3 (Amazon Web Services)). This persistent storage is supposed to store the job's input data and eventually receive its output data. It must be accessible for both the Job Manager as well as for the set of Task Managers, even if they are connected by a private or virtual network.
On-line non-preemptive utility: Efficciency Scheduling: The on-line non-preemptive scheduling method which is used to maximize the efficiency gain. Since the execution of a task may gain positive profit or suffer penalty and thus degrade the overall computing performance, judicious decisions must be made with regard to executing a task, dropping or aborting a task and when to drop or abort a task. The rationale of our approach is very intuitive, i.e. a task can be accepted and executed only when it is statistically promising to bring positive gain and discarded or aborted otherwise. Before we introduce the details of our scheduling approach, we first introduce two useful concepts, the expected gain utility and the critical point.
The expected gain utility and the critical point: Since the task execution time is not known deterministically, we do not know if executing the task will lead to positive gain or loss. To solve this problem, we can employ a metric, i.e., the expected gain utility, to help us make the decision.
Given a task T with arrival time of a ti , let its predicted starting time be t i . Then the potential Gain P i (t i ) to execute T can be represented as the integration of the summation of gain over time t i and the difference of the starting time of the process and the arrival time of the process. A task can be accepted or chosen for execution when η(T)>0, which means that the probability of to obtain positive gain is no smaller than that to incur a loss. We can further limit the task acceptance by imposing a threshold (δ) to the expected accrued utility, i.e. a task is accepted or can be chosen for execution if: i P (T) ≥ µ We call µ as the Efficiency threshold: Furthermore, since the task execution time is not known a prior, we need to decide whether to continue or abort the execution of a task. The longer we execut the task, the closer we are to the completion point of the task. At the same time, however, the longer the task executes the higher penalty the system has to endure if the task cannot meet its deadline. To determine the appropriate time to abort a task, we employ another metric, i.e., the critical point.
Let task T i starts its execution at t 1 , then the potential profit T i >t (i.e., η(T)) can be represented as the integration of the maximum gain ad the the difference of the completion of the task. The Potential loss of a sunction can be calculated by theintegration of its completion time to the max time. Hence, the expected efficiency η is the difference believes the gain of a task and the loss of a task.
If we substitute η to be tequal to 0, we can see that the gains & loss are found to be equal in executing a task. As time increases, the η decrease and after a critical point at deadline more loss incurs then gain.
Algorithm 1: For non-preemptive scheduling: Consider K accepted Task in Ready Queue and the Current Time t. Parameters 1: Accepted Task in the Queue Level. Let { t1 , t2 , ..., tk}Ar be the Arrival Time A T [T= 1 to K] 2: Let Currently Running Task may be at T=0. Show the task with T and the Thershold Value T h A T = A 0. 3: Conditions The Current Job is in Critical, Then Abort the execution of T0 4:Otherwise New Task enrolled in the end process. 5: Calculation of efficiency of task and reschedule the task based on the Utility value and load into the ready Queue. 6: Start the Execution from T1. The utility value is less then the Thershold value then remove the process from ready queue else the current process and start its execution The scheduling algorithm: Our scheduling algorithm works at scheduling points that include: the arrival of a new task, the completion of the current task and the critical point of the current task. The detailed algorithm is described in algorithm 1.
In algorithm 1, when the time reaches the critical point of the current task, the current active task is immediately discarded and the task with the highest expected efficiency is selected to be executed. Upon the finish of the current task, the task with the highest expected efficiency is selected for execution. After the selection of the new task in both of the two cases, the expected efficiency for the rest of the tasks are recalculated. The tasks with the expected efficiency smaller than the threshold value are discarded.
Algorithm 2: Sort the ready queue based on the recalculated expected gain 1: Input: Let Tr={ t1 , t2 , ..., tk} be the accepted tasks in the ready queue, let tr i , i = 1, ..., k represent their specific arrival times. Let current time be t and T 0 be the task currently being executed. 2: Output: The list of tasks in the ready queue T'r={ T'1 , T'2 , ..., T'k} sorted based on their expected gain. 3: Tstart = expected finishing time of T 0 -t; 4: for i=0 to k do 5: T'i = Tj where Tj ∈ Tr is the task with the largest expected gain assuming it starts at Tstart ; 6: Remove Tj from Tr; 7: Tstart = Tstart + expected execution time of T'j; 8: Calculate the following task's expected utility at time Tstart; 9: end for When a new job comes, it is first inserted at the head of the ready queue, assuming its expected starting time would be the expected finishing time of the current active task. Based on this starting time, we then can compare its expected utility with the rest of the tasks in the queue. If its expected utility is less than that of the one following it, we re-insert this job to the queue according to its new expected utility. We calculate the new expected utility according to Algorithm 2, by estimating its new expected starting time as the sum of the expected executing time of the leading tasks' in the ready queue. This procedure continues until the entire ready queue becomes a list ordered according to their expected utilities. We remove the ones with expected utility lower than the threshold.

On-line preemptive scheduling:
The Preemptive scheduling algorithm belongs to a new family of realtime service oriented scheduling problems. As the complementarily of our previous non-preemptive algorithm (Liu et al., 2010), real time tasks are scheduled preemptively with the objective of maximizing the total utility time.
The preemptive scheduling heuristics is to judiciously accept, schedule and cancel real-time services when necessary to maximize the efficiency. The new scheduling algorithm has much better performance than an earlier scheduling approach based on a similar model does.
Algorithm 3: On-line preemptive efficiency scheduling method: 1: Input: Let {T1, T2,..., Tk } be the accepted tasks in the ready queue and let e i be the expected execution time of Ti . Let current time be t and let T0 be the task currently being executed. Let the expected utility density threshold be µ.

28: end if
The details of our scheduling are described in algorithm 3. There are five main parts in the scheduling. They are the preemption checking, feasibility checking, task selecting, scheduling point checking and critical point checking. When new tasks are added in to ready queue, no matter whether there is preemption or not, the feasibility checking will work to check if the new ready queue is feasible or not. If any task cannot meet the requirement, it will be removed from the ready queue. Scheduling point checking makes sure all the left tasks in the expected accrued utility density task to run when the server is idle. The critical point checking will always monitor the current running task's state to prevent the server wasting time on the non-profitable running task. The preemption checking works when there is a prosperous task wants to preempt the current task. The combination of these parts guarantees to judiciously schedule the tasks for achieving high accumulated total utilities. It is worthy to talk more about the preemption checking part in details, because improper aggressive preemption will worsen the scheduling performance. From Algorithm.4 we can see that if a task can be finished successfully before its deadline even in its worst case, the scheduling will protect the current running task from being preempted by any other tasks. Otherwise, if a prosperous task has an expected accrued utility density which is larger than the current running task's conditional expected utility density by at least a value equals to the pre-set preemption threshold, the preemption is permitted.
Algorithm 4: Verification of Preemptive method 1: Input: Let T 0 be the task currently being executed and T p be the task wants to preempt T 0 , current time be t, U(T 0 , t) be the conditional expected utility density of T 0 at time t, e o is the remaining expected time of T 0 . Up(t) be the expected utility density of T p ; 2: if the expected density is greater, then 3: Check what is T 0 's worst case finish time; 4: if T 0 can be finished before its deadline even in the worst case then 5: Preemption is not allowed; 6: end if 7: if T 0 's worst case will miss as its deadline then 8: Preemption allowed; 9: end if 10: end if The feasibility check is one more part deserves detail description. In this part, scheduling simulates the real execution sequence for the left tasks in ready queue and check following this sequence, if all of them can satisfy the requirement or not. The thing needs to be discussed is how to determine the sequence of the left tasks. From equation (1), (2) and (3), we can clearly see that the expected utility of running a task depends heavily on variable T, i.e., the time when the task can start. If we know the execution order and thus the expected starting time for tasks in the ready queue, we will be able to quantify the expected utility density of each task more accurately. In algorithm.5, we show our utility metric based on a speculated execution order of the tasks in the ready queue.
The general idea to generate the speculated execution order is as follows. We first calculate the expected utility density for each task in the ready queue based on the expected finishing time to the current running task. Then the task with the largest one is assumed to be the first task that will be executed after the current task is finished. Based on this assumption, we then calculate the expected utilities for the rest of the tasks in the ready queue and select the next task. This process continues until all tasks in the ready queue are put in order. When completed, we essentially generate a speculated execution order for the tasks in the ready queue and, at the same time, calculate the corresponding expected utility density for each task.
Algorithm 5: Verification of Preemptive method 1: Input: Let T = { t1, t2 , ..., tk} be the accepted tasks in the ready queue, let r i , e i represent the arrival time and expected execution time of ti. Let the current time be t. 2: Output: The new list T' = {t'1, t'2,..., t'k} with the speculate execution order and their corresponding expected utility density Û (T ' j) for τ'j, 1≤ j ≤ k. 3: if a task T 0 is being executed then 4: T = r 0 + e 0; 5: else 6: T=t; 7: end if 8: While T is not empty list do 9: for Each task e in T do the list 10: Calculate gain based on Eq. 1-3; 11: end for 12: Select tj with the highest priority; 13: Add tj to the end T' the list; 14: Excecution time = Excecution time(t)+excecuting time for task. 15: Remove tj from list; 16: end The investigations and the comparison of the performance of the algorithms have been studied and simulated under a variety of conditions.

RESULTS
To evaluate the performance of the algorithms, certain investigations were done using different experimental setup.

Experiment set up:
The test cases in our experiments were randomly generated. Specifically, B, W and D were randomly generated such that they are uniformly distributed within interval of [1, 10], [30,50] and [40,50], respectively. The execution time of a task is assumed to be evenly distributed between interval of . G, L were assumed to be linear functions, i.e., G (t) = -a g (t -D) in the range of [0, D] and L(t) = a l t. The gradient for G (t) and L (t), i.e., a g and a l were randomly picked from the interval of [4, 10] and [1, 5], respectively. Task release times' intervals follow the exponential distribution with µ = 2. The utility threshold µ is set to 0. We conducted three different groups of experiments to study and compare the performance of different approaches under different conditions. The results are reported as follows.

DISCUSSION
We first constructed 1000 task sets, each of which consists of 20 tasks. Figure 1-3 plot the accrued utility, accrued profit, as well as the accrued penalty for three different approaches: Non Pre-emptive, Preemptive and Nephele. For ease of presentation, we only show 50 sets of results in the figures. The horizontal axis is the index of the experiment sets.
The graph in Fig. 3 shows that the variation between the total utility and the experiment sets. From that we can know, how the values of total utility will increased to the corresponding values of experiment sets. And this graph shows that, preemptive results are having higher total utility than the Non preemptive and execution graph of the Nephele.
The graph in Fig. 4 shows that the variation between the total profit and the experiment sets. From that we can know, how the values of total profit will increased to the corresponding values of experiment sets. And this graph shows that, preemptive results are having higher profit than the Non preemptive and execution graph of the Nephele.
This graph in Fig. 5 shows that the variation between the total penalty and the experiment sets. From that we can know, how the values of total penalty will increased to the corresponding values of experiment sets. And this graph shows that, Non preemptive results are having higher profit than the preemptive and execution graph of the Nephele.

CONCLUSION
The popularity of the Internet has grown enormously, which has presented a great opportunity for providing real-time services over the Internet. We have discussed the challenges and opportunities for efficient parallel data processing (Chaiken et al., 2008) in cloud environments and presented Nephele, the first data processing framework to exploit the dynamic resource provisioning offered by today's IaaS clouds. We have described Nephele's basic architecture and presented a performance comparison to the wellestablished data processing framework Hadoop. The performance evaluation gives a first impression on how the ability to assign specific virtual machine types to specific tasks of a processing job, as well as the possibility to automatically allocate/deallocate virtual machines in the course of a job execution, can help to improve the overall resource utilization and, consequently, reduce the processing cost. The on-line real-time service system should be compatible with preemption in respect that it is necessary and befitting for nowadays' service requests. Our experimental results clearly show that our proposed preemptive scheduling algorithm is effective in this regard.
In this study, we present a novel Turnaround time utility scheduling approach which focuses on both the high priority and the low priority takes that arrive for scheduling. This study can be viewed as the extended version of Nephele (Warneke and Kao, 2011). It is also a significant improvement compared to non-preemptive scheduling (Liu et al., 2010) in which, the preemptive approaches better than the non-preemptive counterpart. Our extensive experimental results clearly show that our proposed preemptive method can outperform the nonpreemptive approach.