PATEL, Ahmed, et al. Taxonomy and proposed .... Yeboah, Thomas; Odabi I. Odabi, and Kamal Kant Hiran, "An Integration of Round. Robin with Shortest Job ...
Computer Science Department Faculty of Computers and Information Sciences Mansoura University MANSOURA – EGYPT 2015
Improving Tasks Scheduling In Cloud Computing Thesis Submitted in Partial Fulfillment of the Requirements for the Degree of Master of computer sceice
To Department Computer Science Faculty of Computers and Information Mansoura University
By
Manar Jondy Hazar Lecturer in Ministry of Higher Education and Scientific Research, Al-Qadisiya University, Iraq
Supervised by Assist. Prof. Samir Eldesoky Elmougy
Dr. Shahenda Salah El-Din Sarhan
Department Computer Science /
Department Computer Science /
Faculty of Computers and Information
Faculty of Computers and Information
Mansoura University
Mansoura University
2015
ية قرآ
( 32سورة البقرة)
Acknowledgements
Acknowledgements Writing of thesis is a journey through gravel road, but you can make it with the help of the people and resources you get in touch through out your journey. I am thankful to all of them for their hands to frame this thesis. First of all, I would like to express my unfeigned thanks to Assist. Prof. Samir Eldesoky Elmougy, The head of Computer Science Department, Faculty of Computers and Information, Mansoura University, for his observations and guidance during my thesis work constantly encouraged me to build the direction to the research and to move forward with in depth analysis. Being a source of knowledge, his words make my road become straight and easier to go.
I would like to give my cordial thanks and respect to Dr. Shahenda Salah El-Din Sarhan, Computer Science Department, Faculty of Computers and Information, Mansoura University, for her cooperation and guidance, which can never be penned with words. I am also grateful to all the professors of our department for their advice and support. As I like to express my grateful thanks to the Ministryof Higher Education and Scientific Research in Iraq for their role and support me in accomplishing this thesis. Despite being mentioned after everyone else, I would like to lovingly dedicate this hesis to my family for their love, patience, and understanding and to being my source of inspiration.
Manar Jondy Hazar 2015
I
Abstrsct
Abstract: Cloud computing is emerging as a replacement for traditional physical hardware computing in the area of parallel and distributed computing. Clouds consist of a collection of virtualized resources that can be provisioned on demand, depending on the users’ needs. Cloud computing faces the grand quantity of the user groups, as well as the quantity of tasks and massive data, so the processing is also very significant. Scheduling tasks efficiently has become an important problem to be solved in the field of cloud computing. All over the years, task scheduling was a major research area in different architectures and environments starting from single processor, passing by multiprocessor and ending with cloud computing. Cloud computing is a model for enabling ubiquitous network access to a shared pool of configurable computing resources where available resources must be checked and scheduled using an efficient task scheduler to be assigned to clients. Most of the existing task schedulers did not achieve the required standards and requirements. In this thesis, we propose a novel hybrid task scheduling algorithm named (SRDQ) based on both of shortest-job-first and round robin schedulers using a dynamic variable task quantum considering splitting the ready queue into two sub-queues, Q1, and Q2. Assigning tasks to resources from Q1 or Q2 are done mutually two tasks from Q1 and one task from Q1. The proposed algorithm was implemented in two different environments C# and CloudSim where the experimentations results and tests proved that the proposed algorithm had improved the average waiting and response times and also partially reduced the starvation over the state of art algorithms.
Contents
Contents Chapter One: Introduction 1.1.Introduction…………………………………………………………………..
1
1.2.Thesis ganization………………………………………….………………….
2
Chapter Two: Cloud Computing and scheduling in Cloud Computing 2.1 Cloud Computing……………………………….……………………..
4
2.1.2 Cloud Computing definition……………………………………………
4
2.1.3 Cloud computing rchitecture…………………………………………...
5
2.1.4 Characteristics of Cloudcomputing………...………..………………...
6
2.1.5 Deployment Models…………………………………...………………...
8
2.1.6 Service models of cloud computing…………………………………….
8
1. Software as a Service (SaaS) ………………………...…………..............................
8
2. Platform as a Service (PaaS) ……………….…………………………………………………
9
3. Infrastructure as a Service (Iaas)
9
……………………………………………………………
2.1.7 Problems in cloud computing…………………………………………..
10
1. Security and privacy problems…………………………………………………………….. 10 2. Data storage problems……………………………………………………….. 10 3. Interoperability and standardization………...………….……………….............
2.2. Scheduling In Cloud Computing…………………………………….
10
12
2.2.1 The Features Of Task Scheduling In The Cloud Computing Environment...........................................................................................
14
2.2.2 The Target Of Task Scheduling In Cloud Environment…….……………………………………………………...
15
2.2.3 guidelines of scheduling……………………………………………….
16
2.2.4 Scheduling Process…………………………………………………….
18
2.2.5 scheduling criteria……………….……………………………………
18
2.2.6 Task Scheduling algorithms in cloud computing……………………
20
2.2.7 existing scheduling algorithm…………….…………………………..
21
2.3 Related Work…………………………..………………………..
24
Chapetr Three: Proposed Model 3.1 Statement of problem……………………………………………......
34
3.2 Modified RR………………….………………………………................
34
3.3 SJF and RR with Dynamic Quantum Hybrid Algorithm (SRDQ)……….
35
I
Contents 3.4 Case study. ………………………………………………………………... 3.1.1 Case study-1- ……………………………………………………………………………………
42 42
3.1.2 Case study -2-……………………………………………………………………………………. 44
3.5 Simulation Settings………………..……………………………………
49
3.5.1 Simulation Environment………………….……………………………………………………. 49 1.Visual Studio Simulation Environment…………….………………………….
49
2. CloudSim Simulation Environment……...……………………………….......
49
3.5.2 Performance metrics……………………………………………………………………………
54
Chapter Four: Expirmantal and Result Discusion 4.1 Comparetive Study……………………………………………………..
56
4.2 proposed model……………………………………………………….....
59
4.2.1 Modified RR………………………..………………………………………………………………… 59 -First test……………………………….……………………………………………………….........
59
-Second test………………………………………………………………………………………...... 60 -Third test………………………..……………………………………………………..…….......... 62 4.2.2 proposed model in C#………………………………………………………………………..… 63 a.Proposed model imlementation………………………………………………………
64
b.QOS measurement……………………………………………………………………………
67
c.Proposed model discusion………………………………………………………………… 68 4.2.3 proposed model in CloudSim………………………………………. 71 a.Proposed model imlementation ……………………………………………………. 72 b.QOS measurement……………………………….………………………………............
77
c.Proposed model discusion ………………………..…………………………………….
78
4.3 Impact of the Proposed Algorithm On Reducing The Starvation Problem… ……………………………………...
81
Chapter Five: Conclusions
5.1 Conclusions………………………………………… …………………….
86
5.2 Future works……………………………………… …………………….
86
II
Contents List of Tables Page
no. 3.1
Submitted tasks burst and arrival…………………………………………………..
41
3.2
Result case study -1- ……………………………………………………………………….
43
3.3
Submitted tasks burst and arrival …………………………………………………
43
3.4
Task quantum calculations in first round …………………………………………
44
3.5
Task quantum calculations in the second round ………………………………
45
3.6
Task quantum calculations in the third round …………………………………
46
3.7
The response, waiting and turnaround times of the SRSQ compared to SJF and RR. ……………………………………………….…………………………………………
47
3.8
Cloud Sim simulation parameters …………………………………………………..……….
51
4.1
Data sets ……………………………………………….……………………………………………………
53
4.2
Datasets for first experiment ………………………………………………..………………….
47
4.3
Datasets in second experiment ………………………….……………………………………
58
4.4
Tasks specification for third experiment …………………………..………….…………
59
4.5
Results of the first experimentation using first data set ………………..………
61
4.6
62
5.7
Results of the second experimentation using second data set …………………. Results of the third experimentation using third data set ………………………
4.8
First Experimentation Results using Dataset1, on (1, 2, 3) VMs……….
68
4.9
Second Experimentation Results using Dataset2, on (1, 2, 3) VMs ………
70
4.10
Third Experimentation Results using Dataset3, on (1, 2, 3) VMs ……………. Cloudlet specification ………..…………………………………………………….…………………
72
4.11
III
63
77
Contents List of Figures no 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 3.1 3.2 3.3 3.4 3.5 3.6 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14 4.15 4.16 4.17 4.18 4.19 4.20 4.21 4.22 4.23 4.24 4.25
page Cloud Layered Architecture Characteristics of cloud computing ................. Characteristics and deployment model of Cloud Computing ....................... Service models of cloud computing .............................................................. Round Robin Algorithm…………………………………………………………………………………………. SJF algorithm ……………………………………………………………………………………………………… SJF algorithm ……………………………………………………………………………………………………… Min-Min algorithm……………………………………………………………………………………………… Max-Min algorithm………………………………………………………………………………………………
Hybrid SJF and RR Algorithm with dynamic quantum time. ....................... Flowchart of the proposed algorithm............................................................. SimJava layer ................................................................................................. GridSim layer ................................................................................................ CloudSim Layer ............................................................................................. User Code layer ............................................................................................. Average Turnaround Time using three different datasets ............................. Average Waiting Time Comparison using three different datasets ............... Average Response Time Comparison using three different datasets ............ Throughput Comparison using three different datasets ................................. First experiment ............................................................................................ second experiment ......................................................................................... Third experiment ........................................................................................... Experimental results of comparison of algorithms using first data set.......... Experimental results of comparison of algorithms using second data set ..... Experimental results of comparison of algorithms using third dataset ......... Summery of the Throughput for different three experiments........................ First Experimentation Results Using Dataset1 .............................................. Second Experimentation Results Using Dataset2 ......................................... Third Experimentation Results Using Dataset3 ............................................. Turnaround and Waiting Times Averages Using Dataset1, 2 and ................ First Experimentation Results using Dataset1, on (1, 2, 3) VMs .................. Result using second dataset and 1,2,3 virtual machines ................................ Result using third dataset and 1, 2, 3 virtual machines ................................. Summery of the Throughput for different three experiments........................ First Experimentation Results using Dataset1, on (1, 2, 3) VMs .................. Second Experimentation Results using Dataset2, on (1, 2, 3) VMs .............. Third Experimentation Results using Dataset3, on (1, 2, 3) VMs ................. Cloudlets waiting time on one VM................................................................ Cloudlets waiting time on two VMs .............................................................. Cloudlets waiting time on three VMs………………………………… ................................
IV
6 7 9 21 22 22 23 24 40 41 51 51 52 53 58 59 60 62 63 65 66 67 68 69 69 70 71 74 75 77 78 79 80 81 83 83 83 84 84
1
Chapter -1INTRODUCTION
I
Chapter 1
INTODUCTION
1.1. Introduction The appearance of cloud computing systems represent a revolution in
1
modern information technology (IT) that needs to have an efficient and
2
powerful architecture to be applied in different systems that require complex
3
computing and big-scale. Cloud is a platform that can support elastic
4
applications in order to manage limited virtual machines and computing
5
servers to application services at a given instance of time.
6
The cloud is a suitable environment of multi-tenant computing which
7
allows the users to share resources. In cloud, available resources must be
8
checked and scheduled using an efficient task scheduler to be assigned to
9
clients based on their requests [1, 2, 3].
10
Having an efficient task scheduler became an urgent need with the
11
rapid growth of modern computer systems aiming to reach and achieve the
12
optimal performance. Task scheduling algorithms are responsible for
13
mapping jobs submitted to cloud environment onto available resources in
14
such a way that the total response time and latency are minimized and the
15
throughput and utilization of resources are maximized [3,4].
16
Conventional task scheduling algorithms as Shortest-Job-First (SJF)
17
[5], Round Robin (RR)[6], and First-Come-First-Serve (FCFS) [7],
18
Multilevel queue scheduling (MQ) [8] , Max-Min [9] and Min-Min [10]
19
achieved breathtaking results over years in different computer systems types
20
but always suffer from big dilemmas as higher waiting time in RR and FCFS
21
and starvation in SJF and Max-Min.
22
Starvation problem is one of the major challenges that face task
23
scheduling in cloud where, a task may waits for one or more of its requested
24
resources for a very long time. Starvation is frequently brought on by lapses
25
in a scheduling calculation, by resource spills, and can be deliberately created
26
by means of a refusal of-administration assault. For example, if an
27
1
Chapter 1
INTODUCTION
ineffectively planned multi-tasking framework dependably switches
28
between the initial two tasks while a third never gets the chance to run, then
29
the third task is starving [11].
30
Many hybrids were introduced to solve the starvation problem as
31
FCFS&RR and SRTF&RR [12] (note that RR is always a common
32
denominator in these hybrids) but, no one till now solve or nearly approach
33
to solve it. A hybrid of SJF and RR is one of the most used and powerful
34
hybrids for solving starvation where we can benefit from SJF performance
35
in reducing the turnaround time and from RR in reducing task waiting time.
36
But the task quantum value was always the obstacle in having the optimum
37
hybrid. Different researches were proceeded to find the best methodology to
38
calculate the task quantum value as having small quantum leads to reducing
39
throughput and increasing response time while having long quantum caused
40
a high increase in turnaround time.
41
From this point and confessing the importance of starvation problem in
42
task scheduling, we introduce in this paper a novel hybrid scheduling
43
technique of SJF and RR with dynamic quantum applied through having two
44
Queues to schedule processes for execution. The proposed algorithm is
45
designed to be a unit based algorithm based on effectively queuing data
46
structure and optimizing the execution time as possible. In this proposed
47
technique, a time quantum value is statically and dynamically determined
48
towards detecting the impact of quantum dynamicity over starvation and
49
response time reduction which will be described in details in Chapter 3.
50 51 52 53
2
Chapter 1
INTODUCTION
1.2. Thesis Organization The rest of the thesis is organized as follows: Chapter-2: cloud computing Background. Overview and the defnition and Architecture of Cloud Environment, Characteristics of cloud computing and its Deployment and Service models of cloud computing finaly end this chapter by challanges that faced cloud computing. Then will provide a overview of the Task Scheduling in Cloud and Features, Tagret of Task Scheduling In this hetroginouse Environment then we state the guidelines and scheduling process in cloud and criteria of scheduling then we explain Task Scheduling algorithms in cloud computing and listed some existing algorithms then related work and research done till now on scheduling in cloud environment. This will lighten you up with a little deep knowledge about cloud scheduling. Chapter-3: will take you through our proposed technique on the cloud scheduling algorithm enhanced with examples. The results are tested using cloudSim simulator and c# engine. Chapter-4: this chapter present experiments and evaluation result will discussed and disply all resnoable descusion supported by tables and figures In Chapter-5: the overall work with strength and drawbacks is expressed in the section Conclusion and the possible future work is described in the Future Scope section.
3
Chapter -2CLOUD COMPUTING AND SCHEDULING IN CLOUD COMPUTING
4
Chapter 2
CLOUD COMPUTING
This chapter starts with a brief description about cloud computing. The chapter will then give a detailed description Characteristics of cloud computing with Types of cloud computing and continue onto Service models of cloud computing.
2.1 Cloud Computing Cloud computing is a computing method based on the Internet, by this way, the sharing of hardware resources and information can be provided according to requirements to computers and other equipment, mainly is the increase in Internet related services, use and delivery model based on, usually via the Internet provides dynamically scalable and often virtualized resources [13]. Virtualization can provide good technical support for cloud computing, cloud computing can be regarded as the application virtualization technology. In the past few years, there have been many cloud computing research and development group, such as Google, IBM, Microsoft, Amazon, Alisoft, Huawei, Baidu, Alibaba, nearly all the domestic and international well-known IT companies launched a cloud computing solution. At the same time, the academic circles at home and abroad have on cloud computing and its key technology related theory is studied deeply [14]. Cloud computing refers to the IT infrastructure delivery and usage patterns, through the network to on-demand, easy extension ways to obtain needed resources; generalized cloud computing service delivery and usage patterns, through the network to on demand, scalable way to obtain the desired service. This service can be IT and software, Internet, but also other services. It means that the calculation can also be used as a kind of commodity circulation through the internet [15].
5
Chapter 2
CLOUD COMPUTING
2.1.1Cloud Computing Definition There are different definitions for cloud computing in the literature, many of which do not cover all of the features of the cloud. In one attempt, Vaquero et al. attempted to extract a comprehensive definition using 22 different compliments [16]. Efforts have been made to standardize the definition of the cloud, in which we accept the cloud definition provided by the National Institute of Standards and Technology (NIST).The NIST cloud computing definition: ‘‘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. This cloud model is composed of five essential characteristics, three service models, and four deployment models’’ [17]. The cloud cannot be considered to be a new concept or technology that arose in recent years; instead, its root can be found in what John McCarthy described as the ability to provide computational resources as a ‘‘utility’’ . Based on standard material presented by NIST, cloud computing is composed of five main characteristics, and two other characteristics are added based on the literature, with three spanning service models and four models of deployment, which will be described in some detail in the following sections [18].
2.1.2
Cloud computing Architecture
Cloud Architecture the layered architecture of cloud defined. It is divided into four layers user level layer, user level middleware layer, core middleware layer and system layer. Each layer is independent of each other and only dependent upon the inputs from the upper layer and gives the output to the lower layer. The User Level consists of the cloud application GUI. It 6
Chapter 2
CLOUD COMPUTING
will run on the client side where the inputs will be taken and then for awarded to the next level. The Core Middleware consists of the system of some System Software like Net Beans, Eclipse or some sort of compiler. This layer helps the client to write down their own software using the system software and then deploy them on the cloud provider side. When this software deployed on the provider, side the overall performance improvement does not happens. To have a control over the performance the System Level control is required. In this layer, the user has the control over the overall resources of the provider. Because of this, the users can make as many changes as they want. Because they are, have the low-level control over the resources of the provider. Due to this low level, control the overall improvement can be doing very easily [19].
Figure (2.1): Cloud Layered Architecture Characteristics of cloud computing
7
Chapter 2
CLOUD COMPUTING
2.1.3Characteristics of Cloud Computing The main characteristics of Cloud computing includes [20]:-
1- On demand self-service Consumers can obtain computing capabilities, including resources (i.e., storage, processing, memory, and network bandwidth) and applications, over the Internet as needed automatically without the service provider intervening. 2- Broad network access Computing capabilities are available over the Internet and can be access through a standard mechanism that facilitates use by various platforms (e.g., mobile phones, tablets, laptop computers, and workstations). 3- Resource pooling Computing resources of service providers accumulated to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned based on consumer needs. Consumers are generally unaware of the exact location of the provided resources.
4- Rapid elasticity Computing capabilities can elastically provide automatically to satisfy consumer requirements. Available capabilities appear unlimited to consumers and can used in any quantity and at any time. 5- Measured service Cloud computing is operated as utility computing under a pay-per-use basis. While transparent to both providers and users, computing resources can monitored, controlled, and reported.
8
Chapter 2
CLOUD COMPUTING
Figure (2.2): Characteristics and deployment model of Cloud Computing
9
Chapter 2
CLOUD COMPUTING
2.1.4Deployment Models NIST has identified four standard models, or types, of cloud computing that can implemented to satisfy varying needs of users or providers. Those models: public, private, community, and hybrid vary in where the hardware is located, what entity is responsible for maintaining the system, and who can use system resources. Clouds deployed in different modes, depending on the usage scopes. There are four primary cloud deployment models [21], Figure (2.2). 1. Private cloud: - It is the cloud, which is the possession of a single organization or person. The cloud operability allowed to the owner or a third party. 2. Public cloud: - A cloud that can be used by the public and require investment because they are owned by the large cooperation’s. 3. Community cloud: - A cloud that shared by several organizations and has the properties that are satisfying all needs. 4. Hybrid cloud: - It is the collaboration of the three clouds given above. The clouds can managed individually but the data and application passes through the hybrid cloud. Also bursting can take place in a hybrid cloud Which may allow a private cloud to become public.
2.1.5Service models of cloud computing Cloud computing provides services, basically by three models that is software, platform and infrastructure [21] Figure (2.3).
1. Software as a Service (SaaS) Software as a Service (SaaS) is a software distribution model in which applications retrieved by a simple boundary such as a web browser over the Internet. The users are not concerned with the underlying cloud infrastructure and even not concern about network, operating systems, 10
Chapter 2
CLOUD COMPUTING
servers, stage and storage. This model also eliminates the needs to install and run the application on the local computers. SaaS term popularized by Salesforce.com that distributes commercial software on a subscription basis and not on an old-style on-premise basis. This is best-known result for its Customer Relationship Management (CRM). SaaS has now become a common delivery model for most commercial applications, including accounting, teamwork and management. Applications like communal media, office software, and online games, which augment the family of SaaS-based services, for sample like web Mail, Google Docs, Microsoft online, NetSuite, MMOG Games, Facebook and many more.
2.Platform as a Service (PaaS) Platform as a Service (PaaS) offers a high-level combined environment to build, test, deploy and host customer-created or learnt applications. Generally, designers may accept some restrictions on the type of software that can write in exchange for built-in application scalability. Customers of PaaS does not achieve the underlying organization as SaaS users do but control over the deployed applications and their hosting environment configurations. PaaS offerings mainly goal at facilitating application development and related management topics. Some are destined to provide a generalized growth environment and some lone provide hosting-level services such as safety and on-demand scalability. Some examples of PaaS are Google App Engine, Engine Yard, Force.com, Windows Azure, Heroku, and MTurk.
3. Infrastructure as a Service (Iaas) Infrastructure as a Service (IaaS) provides processing, networks, storage and other fundamental computing resources to users. IaaS users can deploy arbitrary applications, software, operating systems on the organization, 11
Chapter 2
CLOUD COMPUTING
which is capable of scaling up and down dynamically. IaaS user sends programs and related data, while the vendor's computer does the computational dispensation and returns the consequence. The organization is virtualized, scalable, flexible and manageable to meet user requirements. Examples of IaaS include VPC, Amazon EC2, IBM Blue Cloud, Eucalyptus, Joyent, Flexi Scale and Rackspace Cloud [5].
Figure (2.3): Service models of cloud computing
2.1.6Problems in cloud computing 1. Security and privacy problems The most serious drawbacks of cloud are the security issues of the identity of users and the security of data. By the very nature of cloud computing, the data belonging to the organization using a cloud service will held in a shared environment. A shared setting is implicitly less secure than a non-shared one. Furthermore, delegating the storage and dispensation of data does not dismiss the organization of its legal and regulatory obliga- tions around this data. Serious points are among others gullible vendor’s security model, 12
Chapter 2
CLOUD COMPUTING
customer inability to respond to audit findings, indirect administrator accountability, and proprietary implementations cannot be examined and loss of physical control. Strongly related to these issues concerning legislation and data distribution is the concern of data protection and other potential security holes arising from the fact that the resources are shared between multiple tenants and the location of the resources being potentially unknown. In particular, sensitive data or protected applications are critical for outsourcing issues. Whilst the data should
protected in a form that
addresses legislative issues with respect to data location, it should be at the same still be manageable by the system. Because of the many applications of cloud, systems and the variety of cloud types imply dissimilar security models and requirements by the user. As such, classical authentication models may be inadequate. In particular in cases of aggregation and resale of cloud systems, the mix of security devices may not only lead to glitches of compatibility, but may also lead to the user distrusting the model due to lack of insight. 2. Data storage problems Point of the main problems in the field of data storage are the isolation management/multi-tenancy, the storage controller, single failure, exposure of data to third parties. 3. Interoperability and standardization Interoperability and standardization have huge impact on the cloud adoption and usage. Standardization will increase and accelerate the adoption of cloud computing, as users will have a broader range of choices in cloud without vendor lock-in, portability and ability to use the cloud services providing by multiple vendors. This will also include the ability to use an organization’s own existing data center resources flawlessly. Every new cloud service provider have their own way on how a user or cloud application interacts 13
Chapter 2
CLOUD COMPUTING
with their cloud leading to cloud API propagation. There is a need for complex developed business applications on the clouds to be interoperable. Cloud adoption will hampered if there is not a good way of integrating data and applications across clouds. According to certain experts, interoperability is a bigger problem than security. ‘‘The greatest challenge facing longer term adoption of cloud computing services is not security, but rather cloud interoperability and data portability’’ say cloud computing experts from IEEE [11] ‘‘The lack of integration between these networks makes it difficult for organizations to combine their IT systems in the cloud and realize productivity gains and Cost savings. To overcome this challenge, industry standards must developed to help cloud service breadwinners design interoperable platforms and enable data portability [22].
14
Chapter 2
Scheduling In Cloud Computing
2.2 Scheduling In Cloud Computing Scheduling is the central task characteristic to any working framework with its action directed by the CPU; because of the way that resources are not held specially appointed yet rather in a strict convenient way to guarantee maximal skills. Since cloud services require great amount of control and manage resources, a good Scheduling is important to manage jobs and tasks. Scheduling plays a key role in the management system [23]. The scheduling problem involved known to be NP-complete in general. After submitting task by a client, a broker or scheduler used to run the scheduling algorithm so that the system can start to make decision. In cloud-based infrastructure, the physical machines virtualized into unified resources called virtual machines (VMs). The scheduler decides which resources (VMs) will be used, as well as which tasks will be executed on each of these resources. It allocates tasks to suitable virtual machine so that the process of computation can executed to satisfy QoS constraints specified by users such as deadline and cost. This QoS-based optimization aims to minimizing execution cost or make execution time as short as possible and a specified budget [24]. The allocation of system resources to various tasks known as scheduling. Scheduling used in cloud computing to achieve high performance and the best system throughput. Speed, efficiency, utilization of resources in an optimized way depends largely on the type of scheduling selected for the cloud-computing environment. Various criteria for scheduling are max CPU utilization, Max throughput [25]. The cloud-computing environment is famous for its business model. A variety of tasks that users demand, a unified solution, task scheduling 15
Chapter 2
Scheduling In Cloud Computing
remains key issues. There are analogies between the allocating resources in cloud computing system and distribution of social income wealth: The resources provided by foundation facilities manufacturers are equivalent to overall social wealth. The demands of different users said of different task forms, which can abstractly as social individual. The resources volume paid by user can be seen as reward that social individual gets by labor. Based on labor differences, they distribute different wealth [26]. In cloud computing, we know New Berger model of justice distribution and efficiency (time and cost game) which is mainly based on following several points [27, 28]: 1. Cloud computing offers available computing and resources storage for a variety of users and enterprises. Therefore, the cloud computing requires the general resource-allocation policy to meet the needs of different users for the allocation of resources, and achieves higher quality of service. In cloud computing environments, by introducing New Berger fair and justice distribution theory of the actual demand, resource allocation can assigned as social distribution with the nature of automatic regulation. 2. Traditional task scheduling algorithm focuses on efficiency or cost. It has pertinence for tasks of Specific style and targets for specific types of tasks such as to target the least finishing time, the optimum availability, and the least cost. These scheduling policies have better efficiency or better cost advantages, but can cause uneven loading, unilateral advantages of efficiency and cost. The expectations of enterprises integrated QoS are not balanced, that means service requirement quality of task scheduling in cloud environment cannot meet the expectations of users. Therefore, it's more important that the efficiency and cost of task scheduling model are balanced. Task scheduling in cloud computing environment should not only meet the
16
Chapter 2
Scheduling In Cloud Computing
balance between efficiency and cost, but also meet the equitable resources distribution. 3. Divide user‟s tasks according to the QoS, users have a clear direction of resources service. The game between efficiency and cost based on meeting users' benefits or fee requirement and then seeking optimal value or equilibrium point. Finally achieve double-win in user efficiency and cost. We call this process efficiency optimization 4. Cloud computing uses virtualized technology to pack resources and then supply for users. These new traits require us to establish a link between users and virtual resources. In addition, we need to develop new applicable task scheduling and resource mapping mechanism. 5. The level of QoS: To enhance the overall QoS is same as improve customer satisfaction; the main method is using the strategy, which is fair and satisfactory. Therefore, benefit comes first, and we consider the fairness and costs at the same time.
2.2.1The Features of Task Scheduling In the Cloud Computing Environment In the cloud-computing environment, task scheduling and resource assignment had been unifying managed by providers through virtualized technology. They had been use to hide and complete users‟ tasks transparently. Task scheduling becomes more complex because of the transparent and dynamic flexibility of cloud computing system, and the different needs for recourses of different applications. Task scheduling strategies only focus on equity or efficiency will increase the cost of time, space, and throughput and improve the quality of service of the entire cloud computing at the same time. The characteristics of the task scheduling in the cloud-computing environment are as follows [28]: 17
Chapter 2
Scheduling In Cloud Computing
1- Task scheduling caters to a unified resources platform.
As cloud computing using the virtualized technology, we abstracting the underlying physical resources (all types of hosts, workstations or even PC, etc.) as a unified resource pool, and shielding heterogeneous, supply the upper use. It mainly distributes in a large number of distributed computers, and supplies the use of resources in the form of a data center. 2- Task scheduling is global centralized.
As cloud, computing is a computing model which supply the centralized resource by the mirror service to multiple distributed applications, and this mirroring deployment can make heterogeneous procedures‟ executing of interoperate become easier, which used to be difficult to deal with. Therefore, virtualized technology and mirroring services make the task scheduling of cloud computing achieve a global centralized scheduling. 3- Each node in the cloud is independent.
In cloud computing, the internal scheduling of every cloud node is autonomous, and the schedulers in the cloud will not interfere with the scheduling policy of these nodes. 4- The scalability of task scheduling.
The scale of resources supply from cloud provider may be limited in early stages. With the addition of a variety of computing resources, the size of the abstract virtual resources may become large, and the application demand continues increasing. In the cloud, task scheduling must meet the scalability features, so that the throughput of the task scheduling in the cloud may not be too low. 5- Task scheduling can be dynamically self-adaptive.
Expanding and shrinking applications in the cloud may be necessary depend on the requirement. The virtual computing resources in cloud system may 18
Chapter 2
Scheduling In Cloud Computing
also expand or shrink at the same time. The resources are constantly changing, some resources may fails, and new resources may join in the clouds or restart. 6- The set of task scheduling.
Task scheduling is divided into two parts: one is used as a unified resource pool scheduling, and primarily responsible for the scheduling of applications and cloud API; the other is for the unified port resource scheduling in the cloud, for example, Map Reduce task scheduling. However, each scheduling consists of two two-way processes: scheduler leases resource from cloud, scheduler callbacks the requested resources after use. The former process is scheduling strategy and the latter one is callback strategy. The combination of the scheduling and callback resource strategy is the set of task scheduling.
2.2.2 The Target of Task Scheduling In Cloud Environment The task scheduling goals of Cloud computing is provide optimal tasks scheduling for users, and provide the entire cloud system throughput and QoS at the same time. Specific goals are load balance, quality of service (QoS), economic principle, and the optimal operation time and system throughput [27, 28]. 1- Load balance
Load balancing and task scheduling has close contacts with each other in the cloud environment, task scheduling mechanism responsible for the optimal matching of tasks and resources. Because of the pertinence of task scheduling algorithm, load balancing become another important measure in the cloud. Since load balancing state, level two loads in task scheduling under cloud computing environment: the first stage is the virtual machine load; the second one is the resource layer load [27]. 2- Quality of Service 19
Chapter 2
Scheduling In Cloud Computing
The cloud is mainly to provide users with computing and cloud storage services, resource demand for users and resources supplied by provider are performing in the form of quality of service. When task scheduling management comes to task allocation, it is necessary to guarantee the resources QoS. 3- Economic Principles
Cloud computing resources are widely distributed throughout the world. These resources may belong to different organizations. They have their own management policies. As a business model, cloud computing, according to the different requirements, provides relevant services. Therefore, the demand charges are reasonable. Market economy drives task scheduling and resource management, we must make sure their benefit both (consumer and provider) so that the cloud computing can move more and more further [28]. 4- The best running time
Primarily for applications, tasks can divided into different categories according to the needs of users, and then set the best running time and basis of different goals for each task. It will improve the QoS of task scheduling indirectly in a cloud environment. 5- The throughput of the system
Mainly for cloud computing systems, throughput is a measure of system task scheduling optimizing performance, and it is a target, which has to consider in business model development. Increase throughput for users and cloud providers would be benefit for them both.
2.2.3Guidelines of Scheduling Job Scheduling
used to assign sure jobs to specific resources in specific
time. In cloud computing, job- scheduling problematic is a major and stimulating issue. Hence, the job scheduler should be lively. Job scheduling 20
Chapter 2
Scheduling In Cloud Computing
in cloud computing is mostly emphases to improve the well-organized utilization of reserve that is bandwidth, memory and discount in completion time. An efficient job scheduling strategy must goal to harvest less response time so that the execution of submitted jobs takes place with in imaginable least time and there will be an occurrence of in time where incomes budged. Since of this, less refusal of jobs receipts place and more sum of jobs can submitted to the cloud by the clients, which ultimately show cumulative consequences in hurrying the commercial recital of the cloud. There are dissimilar kinds of scheduling based on different standards, such as static vs. Dynamic, centralized vs. Distributed, offline vs. Online etc. defined below [29]: 1. Static Scheduling: Pre-Schedule jobs, all info recognized about obtainable resources and tasks and a task assigned once to a reserve, so it is calmer to adapt based on scheduler’s outlook. 2. Dynamic Scheduling: Jobs dynamically exist for scheduling over time via the scheduler. It is more elastic than static scheduling, to be able of decisive run time in fee. It is more serious to include load equilibrium as a foremost factor to acquire stable, accurate and effective scheduler algorithm. 3. Centralized Scheduling: As stated in dynamic scheduling, it is an accountability of centralized / distributed scheduler to make worldwide choice. The main welfares of centralized scheduling are comfort of employment; efficacy and more control and nursing on resources. On the other hand, such scheduler lacks scalability, liability tolerance and effectual performance. Since of this disadvantage, it is not indorse for large-scale grids. 4. Distributed / Decentralized Scheduling: More of realistic for actual cloud notwithstanding of its weak competence likened to unify scheduling. There is no vital control entity, so local schedulers‟ requests to achieve and uphold state of jobs‟ queue. 5. Preemptive Scheduling: This type allows all job to interject during implementation and a job can travelled to another resource sendoff its originally owed resource, available for other jobs. If restraints such as priority are careful, this type is more helpful. 21
Chapter 2
Scheduling In Cloud Computing
6. Non Preemptive Scheduling: Scheduling process, in which capitals are not being allowed to be re-allocated until the consecutively and scheduled job ended its execution. 7. Co-operative scheduling: Here, system have already several schedulers, both one is responsible for execution certain action in scheduling process to common system wide range based on the cooperation of events, given rubrics and present scheme users . 8. Immediate / Online Mode: Here, scheduler schedules any freshly arriving job as soon as it reaches with no waiting for next time intermission on available resources at that instant . 9. Batch / Offline Mode: The scheduler supplies inward jobs as collection of problems to solve over consecutive time intervals, so that it is well to map a job for fit resources depending on its features.
2.2.4Scheduling Process Scheduling process in cloud can widespread into three phases namely [30]. Resource determining and sifting – Datacenter Broker determines the resources present in the network scheme and collects status info linked to them. Resource selection – Board resource selected based on sure parameters of task and resource. This is decisive stage. Task submission -Task is succumbed to supply designated.
2.2.5Scheduling Criteria The various CPU scheduling algorithms have different properties as mentioned above. The choice of a particular algorithm may favor one class of processes over another. For selection of an algorithm for a particular situation, we must consider properties of various algorithms [12]. Many criteria had been suggests for comparing CPU scheduling algorithms. Whose characteristics used for the comparison and which
22
Chapter 2
Scheduling In Cloud Computing
can make a substantial difference in algorithm to judge which one will be the best. The criteria include the following details: Context Switch: This is process of storing and restoring context (state) of a preempted process, so that execution can resume from same point later [2]. It is usually computationally intensive, lead to wastage of time and memory, which in turn increases the overhead of scheduler, so the design of operating system is to optimize only these switches, the goal is to minimize it. Throughput: This is defining as number of processes completed per unit time. Context switching and throughput are inversely proportional to each other. CPU Utilization: This is a measure of how much busy the CPU is. Usually, the goal is to maximize the CPU utilization. Turnaround Time: This refers to the total time, which is spend to complete the process and is how long it takes the CPU to execute that process. The time interval from the time of submission of a process to the time of completion is the turnaround time. Waiting Time: The total time a process has been waiting in ready queue. The CPU scheduling algorithm does not affect the amount of time during which a process executes or does input-output; it affects only the amount of time that a process spends waiting in ready queue. 23
Chapter 2
Scheduling In Cloud Computing
Response Time: It is the time from the submission of a request until the first response produced. Therefore, the response time should be low for best scheduling. Therefore, we can conclude that a good scheduling algorithm for real time and time-sharing system must possess following characteristics: 1. Minimum context switches. 2. Maximum CPU utilization. 3. Maximum throughput. 4. Minimum turnaround time. 5. Minimum waiting time. Due to a number of disadvantages these scheduling algorithms have, they severely used except Round Robin scheduling in timesharing and real time operating system; and considered most widely used CPU scheduling algorithm.
2.2.6Task Scheduling algorithms in cloud computing There have been different types of job scheduling algorithm applied in the cloud environment with suitable modification. The main aim of any jobscheduling algorithm is to maintain fairness among the jobs for their execution and reduce waiting time and to improve performance, quality of service like throughput end-to-end delay [31]. To provide services for so many users at the same time in cloud computing, you need to consider each user's response time, and you cannot make users wait too long[32].
24
Chapter 2
Scheduling In Cloud Computing
Various issues exist in scheduling algorithms based on different optimization criteria. Turnaround time and throughput are the two required criteria in batch systems, response time and fairness are the two criteria required in interactive system, whereas in real-time system meeting deadlines is an important aspect. Therefore, a scheduling algorithm must be select in such a way that it satisfies the required criteria and provide efficient service and proper allocation of resources [33]. Numerous types of scheduling algorithm am in distributed computing scheme. Most of them can applied in the cloud setting with suitable confirmations. The main advantage of job scheduling algorithm is to attain a high performance calculating and the best scheme amount. Old-style job scheduling algorithms are not able to deliver scheduling in the cloud settings. Rendering to a simple cataloguing, job scheduling algorithms in cloud computing can be branded into two foremost groups; Batch mode heuristic scheduling algorithms (BMHA) and online mode heuristic algorithms. In BMHA, Jobs are queued and calm into a set after they arrive in the scheme. The scheduling algorithm will start after a secure dated. The focal examples of BMHA based algorithms are; First Come First Served scheduling algorithm (FCFS), Round Robin scheduling algorithm (RR), Min–Min algorithm and Max–Min algorithm. By On-line mode experiential scheduling algorithm, Jobs scheduled after they arrive in the scheme. Later the cloud environment is a varied system and the haste of each processor differs rapidly, the on-line mode experiential scheduling algorithms are more appropriate for a cloud setting. Most fit task scheduling algorithm (MFTF) is suitable example of On-line mode experiential scheduling algorithm [34].
25
Chapter 2
Scheduling In Cloud Computing
2.2.7 Existing Scheduling Algorithm Scheduling algorithm could be either a preemptive or a non-preemptive type. In non-preemptive scheduling algorithm, no force can stop the execution of a task. On the other hand, a task execution could stooped in the preemptive scheduling algorithm because of many factors [35]. There are many Scheduling algorithms are currently prevalent in clouds, the researchers concentrated on a set of task scheduling
algorithms that will be discussed in this section. 1.
First Come First Serve Algorithm: Job in the queue, comes first, is aid. This algorithm is simple and fast [36].
2.
Round Robin (RR) RR is one of the preventive straightforward scheduling algorithms rummage sale for tasks in an employed framework in which the implementation of a task still after a specific period called time important. RR scheduling is both rudimentary and simple to execute, and does not suffer from starvation while suffering from a long waiting and response times [37].
Figure (2.24): Round Robin Algorithm
26
Chapter 2
Scheduling In Cloud Computing
The main characteristics of RR are: 1. Using too short time quantum causes too many context switches and decreases the CPU efficiency. 2. Using too long time quantum cause, in some cases, poor response time and approximates FCFS performance. 3. Because of high waiting times, deadlocks rarely met in a pure RR system. As shown in Figure (2.4) [38], the main steps of applying RR are: 1. Keep the ready queue as a FIFO queue of processes. 2. A new process added to the tail of the ready queue. 3. The CPU scheduler picks the first process from the ready queue, sets a timer to one time slot to cause interrupt, and dispatches the process. 4. If the process may have a CPU burst of less than one time quantum - The process itself will release the CPU voluntarily, and - The scheduler will then proceed to the next process in the ready queue. Otherwise, “if the CPU burst of the currently running process is longer than one time quantum”, - The timer will go off and will cause an interrupt to the OS, - A context switch will be executed, and the process will be put at the tail of the ready queue, and - The CPU scheduler will then select the next process in the ready queue.
27
Chapter 2
Scheduling In Cloud Computing
Many researchers had proposed different variations of RR algorithm as Lin et.al. in (2011) proposed an algorithm called Dynamic Round-Robin (DRR) for energy-aware virtual machine scheduling and consolidation. DRR compared with the GREEDY, ROUNDROBIN and POWERSAVE scheduling and showed superiority in reducing the amount of consumed power [39]. (Yassein et. al., 2013) proposed an enhancement to the traditional RR, namely Randomized Round Robin RRR. The enhanced version of RR algorithms based on random selection for processes that come from different users to achieve near optimal selection of jobs to served. A simulation carried out using Cloud Sim simulator V 3.0 to test the performance of the proposed scheme in terms of different evaluation metrics such as average throughput and average turnaround time [40]. 3. Shortest-Job-First
(SJF)
SJF scheduling distributes the tasks according to the lowest burst time. It could be either preemptive or non-preemptive types, whereas a nonpreemptive SJF algorithm will allow the currently running process to finish its CPU burst. Pre-emptive SJF scheduling sometimes called shortestremaining-time-first (SRTF). Although it gives optimal average waiting time, it is more suitable in a batch framework but suffers from starvation [41]. This algorithm designed for maximum the throughput in most scenarios. This idea illustrated as shown in the Figure (2.5) [38].
28
Chapter 2
Scheduling In Cloud Computing
Figure (2.2.5): SJF algorithm
The main algorithm of SJF is for i = 0 to i < main queue-size If task i+1.length < task i.length then add task i+1 in front of task i in the queue end if If main queue-size == 0 then task i last in the main queue end if end for Figure (2.26): SJF algorithm
The main characteristics of SJF are: 1. The real difficulty with the SJF algorithm is how to predicate the length of the next CPU request. 2. SJF minimizes the average waiting time because it services small processes before it services large ones. While it minimizes average wait time, it may processes with high service time requests. If the ready list is saturated, then processes with large service times tend to left in the ready list while small processes receive service. In extreme cases, when the system has little idle time, the processes with large service time will never serve. 29
Chapter 2
Scheduling In Cloud Computing
Many researchers had proposed different variations of SJF as Jia and Keung in 2013 proposed a scheduling algorithm integrated with task grouping, priority-aware and SJF (shortest-job-first) to reduce the waiting time and make span, as well as to maximize resource utilization. This proposed scheduling algorithm aims at reducing processing time, waiting time and overhead. In the experiment, tasks are generated using Gaussian distribution and resources are created using Random distribution as well as Cloud Sim framework is used to simulate the proposed algorithm under various conditions [42]. Yeboah in 2015 introduced an enhancement to the traditional RR with the SJF called (RRSJF) that selects processes based on shortest job first in a round robin fashion to give optimal selection of job. A simulation had carried out using CloudSim simulator V 3.0 to test the performance of the proposed scheme in terms of different evaluation metrics such as average turnaround, average waiting time and context switches [43]. 4.
MAX-MIN and MIN-MIN Algorithms
Both of MAX-MIN and MIN-MIN algorithms estimate the execution and completion times of each of the tasks on each of the grid resources. Estimating the execution time of each task on different resources, the Minmin algorithm selects the task with minimum completion time and assigns it to the resource on which the minimum execution time achieved. Figure (2.7) shows Min-Min scheduling algorithm [44].
30
Chapter 2
Scheduling In Cloud Computing
1. for all tasks Ti in meta-task Mv 2.
for all resources Rj
3.
Cij=Eij+rj
4. do until all tasks in Mv are mapped 5.
for each task in Mv find the earliest completion time and the
resource that obtains it 6.
find the task Tk with the minimum earliest completion time
7.
assigne task Tk to the resource Rl that gives the earliest completion
time 8.
delete task Tk from Mv
9.
update rl
10
. update Cil for all i
11.end do Figure (2.27): Min-Min algorithm
The Max-Min is very similar to Min-Min, except that Max-Min assigns task with maximum expected completion time to the corresponding resource [30]. Figure (2.8) illustrates Max-Min algorithm [45] 1. for all submitted tasks in meta-task; Ti 2.
for all resources; Rj
3.
Cij = Eij + rj
4. While meta-task is not empty 5.
Find task Tkconsumes maximum completion time.
6.
Assign Tk to the resource Rj which gives minimum execution
time. 7.
Remove Tk from meta-tasks set
8. Update rj for selected Rj 9. Update Figure (2.28): Max-Min algorithm
31
Chapter 2
Related Work
2.3 Related Work Cloud Computing is still a new area of research so not much has been done in this field until now. But still we have reviewed some of the research papers and books to gain some background and improve the already developed scheduling algorithms till now. This field is growing very fastly in the recent past so the amount of research going on is intensive. In paper [(S. Sadhasivam, N. Nagaveni, R. Jayarani, and R. V. Ram,, 2009)] the authors introduced a new type of scheduling algorithm Which is known as meta scheduling algorithm. they divided the jobs into four different categories i.e. short narrow, short wide, long narrow and long wide. With this division they set the priority more to the shorter jobs in such a way that they do not have to compromise with the longest end time of the larger job. If we see in a deferent way this works on the principle of slag time. They will slag the longest job to the maximum extent and then they will delay its processing accordingly. It is very important that starvation does not and that is the main goal of the algorithm therefore they do not delay the job more than there slag time [46]. This research work [(Salot, 2013)] the researchers surveyed the already developed and used scheduling algorithms. As we know that cloud computing uses the already defined and used protocols and algorithms but in an entirely deferent way which indeed a different architecture therefore many of these scheduling algorithms which are used here are already being used in operation system [30]. Ishwari Singh Rajput and Deepa Gupta [47] built up another methodology for round robin CPU scheduling algorithm which enhances the execution of CPU continuously working framework. The proposed Priority 32
Chapter 2
Related Work
based Round-Robin CPU Scheduling algorithm is based on a coordinate's round robin and need scheduling algorithm. It holds. The upside of round robin in diminishing starvation furthermore coordinates the benefit of need scheduling. The proposed algorithm additionally executes the idea of maturing by relegating new needs to the processes. Existing round robin CPU scheduling algorithm can't be actualized continuously working framework because of their high setting switch rates, extensive holding up time, huge reaction time, and substantial turnaround time and less throughput. Execution of time imparting frameworks can be enhanced to the proposed algorithm and can likewise be altered to improve the execution of ongoing framework. The proposed algorithm enhances all the downsides of round robin CPU scheduling algorithm. Ravel Jabbour and Imad H. Elhajj [48] proposed a Starvation Avoidance for Priority Scheduling (SAF-PS) plan which uses holding up times of packages to counter starvation and reduce the drop rate. The plan assists for non-straight timing which could advantage the general productivity and need support of them algorithm. In addition, drop rate can be enhanced first by locking single support things by method for following pointers to being used space; and second by timing updated packages also so as to toss them in the time a stream of packets is to be dropped because of absence of space on the particular queue. A superior predictable arrangement may be to re-update the parcel in the trust of having less activity on the upper. Dongyue Xue, and Eylem Ekici [49] proposed a novel v(t)-controlled CSMA algorithm which can be actualized in an appropriated way utilizing the RTS/CTS instrument. Connection scheduling is performed such that connections with longer queues are supported to reduce normal delay. The v(t)-controlled CSMA algorithm likewise guarantees a more continuous switch between timetables such that the impact of worldly starvation is 33
Chapter 2
Related Work
reduced. They demonstrate that the proposed algorithm is throughput ideal, and show through numerical assessments that the algorithm in fact moderates the starvation issue and accomplishes obviously better defer execution than other throughput-ideal CSMA algorithms. Hausmans and et.al [50] presented a temporal analysis flow for SDF graphs which is appropriate for frameworks with non-lacking starvation schedulers, for example, static need preemptive schedulers. The examination stream utilizes an allowing rate description to compute response times. This allowing rate expose is resolved utilizing multi-dimensional recurrent calendars and permits a more precise displaying of investing examples than is conceivable with a picture that is in view of periods and empowering butterflies. This methodology is relevant for discretionary (cyclic) diagram topologies and can consider support limit imperatives among examination. Likewise cyclic asset conditions can be dissected. The exhibited examination stream is the first approach that considers flexible SDF chart topologies in mix with cyclic asset conditions that are created by non-lacking starvation schedulers. The proposed examination stream is calculated utilizing a radio processing application. The examination results are acquired utilizing an instrument as a part of which the investigation stream is actualized. This contextual analysis represents that the utilized allowing rendering achieves to up to 87% preferable reaction times. In [51] present a temporal analysis technique for Homogeneous Synchronous Dataflow (HSDF) graphs that is also applicable for systems with nonstarvation-free schedulers. Unlike existing dataflow analysis techniques, the proposed analysis technique makes an enabling-jitter characterization and iterative fixed-point computation. The presented approach is applicable for arbitrary (cyclic) graph topologies. Buffer capacity constraints are taken into account during the analysis and sufficient buffer capacities can be 34
Chapter 2
Related Work
determined afterwards. The approach presented was the first approach that considers non-starvation-free schedulers in combination with arbitrary HSDF graphs.The proposed dataflow analysis technique is implemented in a tool. This tool is used to evaluate the analysis technique using examples that illustrate some important differences with other temporal analysis methods. The case-study discusses how the method presented can be used to solve a problem with the inaccuracy of the temporal analysis results of a realtime stream processing system. This stream processing system consists of an FM receiver together with a DAB receiver application which both share a Digital Signal Processor (DSP). Approach from [52] combines systems with First-Come First-Served (FCFS) schedulers with HSDF models. This methodology considers a subclass of the frameworks we consider. FCFS schedulers have a place with the class of non-lacking starvation which is supported by them strategy. Besides that, just non-cyclic charts are considered while they additionally augment cyclic diagrams and, moreover, pipelined timetables are not considered in which implies that the source must be activated when the past result is created. Kurdia and et.al [53] proposed an enhancement to Haizea scheduler to tackle the starvation problem, in which BE hires may encounter a long holding up time and may never be executed. The proposed algorithm, Antistarvation, keeps AR hires from appropriating BE rents if the leases were acquired a specific number of times, taking into account a predefined limit. For this situation, the cloud customer is given the decision of changing over his AR rent that have no presently accessible assets, other than those held by the BE rents, to a BE rent. Test results demonstrate that the Antistarvation algorithm keeps up zero rejected rents in all situations, which 35
Chapter 2
Related Work
therefore reflects decidedly in the CPU use, coming to roughly 10% more than Haizea. Aggarwal, and Nagpal [54], developed a new approach for SJF scheduling algorithm which help to decrease the issue of starvation in a robustly stacked PC framework. The ASJF algorithm diminishes the starvation issue of the basic SJF structural planning. This ASJF algorithm is in view of SJF and multilevel criticism queue scheduling (MFQS) method. Near examination of SJF and ASJF is additionally given to represent the execution contrasts in them. ASJF algorithm obviously demonstrates most extreme CPU usage and effective treatment of assets. As MFQS algorithm is joined with SJF, the procedure of separating the processes to different queues and exchanging of processes among them will further lessen the issue of starvation. Xian and Peide proposed scheduling system architecture for the cloud storage environment [55]. This architecture considers multiple criteria and shows a multi faced nature of a scheduler in cloud. The main aim of paper is to support the mass storage of stream media in cloud storage and provide the continuous access of the desired data to its end users while virtual machines are migrating. An adaptive resource allocation scheduling algorithm is proposed in [56] for the cloud system having pre-empt able tasks. Main purpose of the proposed algorithm is to update the task execution based on adaptive resource allocation. The task scheduling uses two algorithms basically (i) adaptive min min scheduling algorithm and (ii) adaptive list scheduling algorithm. The proposed algorithm schedules the tasks statically. This is also called offline scheduling. A frequency is set for the evaluation of the resources. A continuous approach is used for re-evaluation of the resource allocation that is static. The procedure that is used here for the re-evaluation 36
Chapter 2
Related Work
is an adaptive procedure that works online. After every process of reevaluation scheduler of each process calculate again the new finish time of the tasks related to that process. In the paper [57] a non-pre-emptive scheduling algorithm is used. Initially tasks are entered into the ready queue and then each task is scheduled non-pre-emptively. If a task is executing than it cannot be removed until it completes its execution. If a new task arrives with the higher priority than it cannot be execute until the currently executing task completes. This reduces the overall system performance. R Santosh proposed an architecture that migrates the task on the other virtual machine when they are about to miss their deadline [58]. The proposed algorithm in their paper uses a pre-emption based scheduling. The tasks are put into the ready queue and when a new higher priority task arrives the task that is executing currently is placed again in the ready queue and waits for the completion of the higher priority task. If a task is about to miss its deadline than it is migrated to the other virtual machine. The procedure is good enough but it increases the execution time of the pre-empted tasks. In [59] proposed a priority based job scheduling algorithm which can be applied in cloud environments they have named it “PJSC”. Priority of jobs is an important issue in scheduling because some jobs should be serviced earlier than other those jobs can‟t stay for a long time in a system. A suitable job scheduling algorithm must consider priority of jobs. It is a multi-criteria decision-making (MCDM) and multi-attribute decision-making (MCDM) model. Basically architecture of AHP is consisted of three levels which are objective level, attributes level and alternatives level respectively. Result indicates that the proposed algorithm has reasonable level of complexity.
37
Chapter 2
Related Work
In [60] aouthers proposed a novel scheduling heuristic by considering QoS factor in scheduling and some modifications using existing Sufferage heuristic and Min-min heuristic. Additionally, all of these scheduling approaches consider neither both the different levels of user tasks Qos requests nor the resource properties of dynamic and heterogeneity in cloud computing environment. A QoS guided Sufferage-Min heuristic model, mainly inheriting from the Sufferage algorithm and Min-min algorithm, is presented in this paper after comparing and analyzing different heuristic algorithms. This model is composed of a Sufferage-Min heuristic algorithm and some Qos guided scheduling strategies considering the QoS requirements, low execution complexity, and the dynamic and heterogeneity resource properties in cloud computing environment. We have compared our proposed scheme to other scheme based on heuristic algorithm with a particular example and proved that the proposed scheduling heuristic had a significant performance gain in terms of reduced makespan. QoS is an extensive concept and varies from different research application. Venkatesa Kumar. V and S. Palaniswami [61] have proposed the overall resource utilization and, consequently, reduce the dispensation cost. Untried results clearly show that our proposed preventive scheduling algorithm is effective in this regard. In study, they present a novel Reversal time utility scheduling approach, which focuses on together the high priority and the low priority takes that arrive for scheduling. Vijindra and Sudhir shenai [62] in their paper have obtainable an algorithm for a cloud computing setting that could automatically allocate resources based on energy optimization methods. Then, we prove the efficiency of our algorithm. In the trials and results analysis, we find that in a practical Cloud Computing Environment, using one whole Cloud node to calculate a single task or job will left-over a lot of energy, even when the 38
Chapter 2
Related Work
structure of cloud framework obviously support paralleled process. We need to deploy an automatic process to find the fitting CPU frequency, main memory‟s mode or disks style or speed. We have also deployed scalable dispersed monitoring software for the cloud clusters. Liang Luo et al. [63] have deliberated about, a new VM Load Balancing Algorithm is proposed and then applied in Cloud Computing environment using CloudSim toolkit, in java language. In this algorithm, the VM assigns a variable (different) quantity of the available processing power to the individual application services. These VMs of dissimilar processing powers, the tasks/requests (application services) are assigned or owed to the most powerful VM and then to the lowest and so on. we have optimized the given performance limits such as response time and data processing time, charitable an efficient VM Load Balancing algorithm i.e. Weighted Active Load Balancing Algorithm in the Cloud Computing environment.
Xin Lu, Zilong GU [64], in their paper have discussed that, by monitoring recital parameters of virtual machines in real time, the overloaded easily detected once these parameters exceeded the threshold. Quickly finding the adjacent idle node by the ant colony algorithm from the resources and starting the virtual machine can tolerates part of the load and meets these presentation and resource requirements of the load. This realizes the cargo adaptive dynamic resource scheduling in the cloud services platform and achieves the goal of load balancing. In [65] did the research of using GA to deal with scheduling problem in the cloud, we propose PGA to achieve the optimization or suboptimization for cloud scheduling problems. Mathematically, we consider the scheduling problem as an Unbalanced Assignment Problematic. Future 39
Chapter 2
Related Work
work will include a whole characterization of the constraints for scheduling in a cloud-computing setting, developments for the convergence with more complex problems. Lu Huang, Hai-shan Chen [66] also presented scheme architecture for users to make resource needs in a cost-effective manner, and discussed a scheduling scheme that provides good performance and fairness simultaneously in a heterogeneous cluster, by adopting development share as a share metric. By seeing various configurations possible in a heterogeneous setting, we could cut the cost of maintaining such a cluster by 28%. In addition, we proposed a scheduling algorithm that provides decent performance and justice simultaneously in a varied cluster. By adopting progress share as a share metric, we were able to improve the performance of a job that can utilize GPUs by 30% while ensuring fairness among multiple jobs. A novel grid scheduling experiential that adaptively and dynamically schedules task without requiring any prior information on the workload of inward tasks psented in [67]. This models the grid scheme in the form of a state – transition diagram with job replication to optimally schedule jobs. This algorithm uses prediction information on computer utilization. In this algorithm, they uses idea of job replication that is, a job can replicated to other resource if that resource completes implementation of current job than the resource it is currently allocated. This algorithm uses two kinds of queue namely, Waiting Queue and Execution Queue. This method based on exploiting information on processing capability of separate grid resources and applying repetition on tasks assigned to the slowest processors. The approach facilitates replication of tasks, and assigned to execute on slower machines, on machines with higher processing capacity. In this approach, 40
Chapter 2
Related Work
the communication costs ignored. Untried results show the better performance of this approach compared to traditional round robin algorithm. In [68] proposed one caring of biased fair scheduling algorithm. It is based on severe rob importance class which enhances an absolute importance queue based on based class biased fair scheduling algorithm (CBWFQ). This algorithm covers the difficulty of traditional weighted fair scheduling algorithm. Weighted Fair Scheduling algorithm distinguishes the services of all active queues based on weight of each commercial flow. When a new job arrives, the classifier classifies the jobs into categories. Then bumper is checked for each category and if buffer is not overloaded then job is stored in the buffer otherwise job is dropped. Each job arrives a different computergenerated queue. Weight, Message, Discard and Rob are four chief rules of this algorithm. The main advantage of this algorithm is that it has presented the rob rule together with dropping rule. Experiments done on NS-2 software to simulate SRPQCBWFQ algorithm. This new algorithm combined buffer management and queue scheduling and only assurances low delay of real time applications. It also considered fairness and better use of buffers. This algorithm has two great compensations of bandwidth distribution and delay without amount reducibility. Shamsollah Ghanbari, Mohamed Othman [69] presented a novel method of job scheduling in cloud computing by exact statistics. This algorithm reflects the priority of jobs for scheduling and named as priority based job-scheduling algorithm. It based on multiple criteria decisionmaking perfect. A pair wise contrast based on multiple criteria.. Experimental results indicate that the algorithm has reasonable complexity. In addition, there are several issues related to this algorithm such as complexity, consistency and finish time. 41
Chapter 2
Related Work
Agent based Priority Heuristic for Job Scheduling on Computational Grids [70] this algorithm presents an agent-based job scheduling for effective and efficient execution of user jobs. This considers QoS parameters like waiting time, turnaround time, and response time, total completion time, etc. Priorities assigned to the jobs under different classifications. Agent based Heuristic Scheduling (AHS) uses task agent for job distribution to achieve optimum solution. Task agent receives jobs from users and distributes them among different prioritize global queues based on user levels. AHS uses agent based job distribution strategy at global level for optimal job distribution based on user levels and job priorities at native levels for efficient and effective execution of jobs. For different global queues, priorities defined as threshold levels for assigning jobs to worldwide queues. If jobs have same priorities then jobs having minimum run time executes first otherwise First Come First Serve (FCFS) algorithm is used. AHS has optimal performance with respect to QoS parameters. Design, Development and performance analysis of Deadline based Priority Heuristic for Job scheduling in a Grid [71]: A modified prioritized deadline based scheduling algorithm (MPDSA) is proposed using project management algorithm for efficient job execution with deadline constraint of user‟s jobs. MPDSA executes jobs with closest deadline time delay in cyclic manner using dynamic time quantum. It assumes each job to describe by its process_id, burst_time, arrival_time and deadline. Time quantum assigned by computing LCM of all burst times. Then the jobs having minimum time delay selected for execution. If jobs have same time delay then first Come First Serve (FCFS) algorithm used for scheduling. Jobs are pre-empted based on time quantum and if a job completes its execution before time quantum, that job deleted from queue. This algorithm satisfies system requirements and supports scalability under heavy workloads. 42
Chapter 2
Related Work
A two-stage-priority-rule-based algorithm for robust resourceconstrained project scheduling [72]: The algorithm solves the resourceconstrained project-scheduling problem (RCPSP). This algorithm presents a two-stage algorithm for robust resource-constrained project scheduling. First stage solves the RCPSP for minimizing make span by using a priority-rulebased heuristic. Second stage is intended to find most robust schedule with a make span not larger than threshold value found in first stage.
43
Chapter -3PROPOSED MODEL
44
Chapter 3: Proposed Model 3.1 Statement of The Problem One of the most possible problems at the scheduling schemas is starvation problem. In which, the execution of the task can’t be finished at all. Starvation is often caused by errors in a scheduling algorithm, rather may be caused by resource leaks, and can be intentionally caused via a denial-ofservice attack such as a fork bomb. Starvation is a problem usually faced in multitasking where a process is continuously denied necessary resources. The proposed method focus on dealing on this problem based on hybrid two most common scheduling algorithms to avoid disadvantages of each other so that the evaluation of the performance metric increases especially waiting time, response time, throughput rather than decrease and reducing probability of starvation occurrence to be zero at possible as.
3.2 Modified RR Round Robin becomes one of the most widely used scheduling disciplines despite of its severe problem which rose due to the concept of a fixed pre-determined time quantum. Before build our hybrid model we made a modification on conventional RR algorithm to include it as a basic component in proposed model. As know time quantum in conventional RR assigned fixed value (usually 10-100 milliseconds) that does not change at all which was the main problem in RR scheduling algorithm. The performance of RR algorithm depends heavily on the size of the time quantum. For smaller time quantum, the context switching is more and for larger time quantum, response time is more. Overall performance of RR may decrease for weak time quantum selection. Therefore, choice of an appropriate time quantum is necessary. Many researchers have tried to fill this gap, but still much less than needs. In this thesis, we propose a new algorithm to solve the constant time quantum problem. Proposed Modified 45
Chapter 3
Proposed Model
RR algorithm based on dynamic time quantum approach where the system adjusts the time quantum according to the burst time of processes founded in the ready queue. Initial time quantum could calculated by the median of burst times for the set of processes in ready queue then it is change dynamically to each task over each round based on adaptive Equation 1.
qij = q~ +
q~ (Bij +qi(j−1) )2
(3-1)
Where qij is the quantum at iteration j, i:1, 2, . . ., n and, Bij is burst time of task i at iteration j, qi(j-1). In order to validate our algorithm (Modified RR) over the existing Round Robin we have built our simulator using C# engine and result will be introduce in Chapter four.
3.3 SJF And RR With Dynamic Quantum Hybrid Algorithm (SRDQ) As mentioned before, we are trying in this work to overcome the starvation problem by proposing a new hybrid scheduling technique based on SJF and RR scheduling techniques named SRDQ. SRDQ avoids the disadvantages of both of SJF and RR so that the evaluation of the performance metrics increases rather than decreases the probability of starvation occurrence as far as possible. In the RR stage of SRDQ, the time slice works on avoiding the traditional cons that lead to high waiting times and rare deadlines met. RR time slice or quantum setting is a very challenging process, as if the quantum is too short, too many context switches will lower the CPU efficiency while setting the quantum too long may cause poor response time and approximates First-Come-First-Serve (FCFS) algorithm. So in this paper, the researchers concentrated on calculating the optimal quantum interval at each round of RR algorithm. 46
Chapter 3
Proposed Model
SRDQ is designed to be a unit-based algorithm based on queuing data structure effectively and optimizing the execution time as possible. SRDQ involves 6 main steps as following: 1. Arrange all submitted tasks, Ti, i =1, 2, . . . , number of submitted
tasks, according to their burst time. 2. Compute the median, q~, of the burst times of all tasks. 3. If a burst time of a task T, B(T), is less than or equal to the median,
insert T into a Q1 otherwise insert T into Q2. 4. The quantum of (qij ) is calculated based on the current executed
task source queue (whether it is from Q1 or Q2), and the round to be executed in, as following: 𝑞𝑖𝑗 = 𝑞 ~ +
𝑞~ (𝐵𝑖𝑗 +(−1)1−∝ .𝑞𝑖(𝑗−1) )2
(3-2)
where qij is the quantum at iteration j, i:1, 2, . . ., n and, Bij is burst time of task i at iteration j, qi(j-1) , and α is a binary selector α ={0,1}. In the first round, j=1, qi(j-1) is set to zero as there is no previous rounds. On the other hand, based on the source queue, α will be set to either zero or one as in: a. If the resource is taken from Q1 , α will be set to one and thus Equation (1) will be modified as follows: qij = q~ +
q~ (Bij +qi(j−1) )2
(3-1)
b. If the resource is taken from Q2 , α will be set to zero and thus Equation (1) will be modified as follows: qij = q~ +
q~ (Bij −qi(j−1) )2
(3-3)
5. The first two tasks of Q1 are assigned to the resources followed by
the first task of Q2. 6. Step 4 is continuously repeated till the Q1and Q2 are empty. 47
Chapter 3
Proposed Model
7. In case of the of a new task arrival or a task is finished q~ will be
updated dynamically as following: a. In case of a new task arrival, it will be inserted in Q1 or Q2 based on its burst time and q~. In this case, q~ will be updated as follow: 𝑞~ 𝑞 =𝑞 + 𝐵𝑛𝑒𝑤 ~
~
(3 − 4)
Where Bnew is the new task burst time. b. In case of a task is finished, q~ will be updated as: ~
~
𝑞 =𝑞 −
𝑞~
(3 − 5)
𝐵terminated
Where Bterminated is the finished task burst time. Figure (3.1) describes the main steps used in the proposed algorithm in details.
SJF & RR with Dynamic Quantum Hybrid Algorithm (SRDQ) Function and variables Ti: Task i Bi: Burst time of task i
RQ : Ready Queue Q1 , Q2 : Q1 ᵁ Q2 = Ready Queue, Q1 ∩ Q2 =
ᵠ
select: counter to indicate whether the selected task is from Q 1 or Q2 count_iteration: an initialize value for iteration j and quantum(qij ) q~: median of burst time of tasks. qij : quantum time assigned to task, Ti , in the iteration j Select(): a function to select a task, Ti, ,from Q1 or Q2 Execute(): a function execute a task, Ti Input : Tasks, Ti
48
Chapter 3
Proposed Model
Output : Rescheduling all tasks , Ti BEGIN Arrange submitted tasks in RQ based on SJF Remark: //Split RQ into Q1 and Q2 q~= the median of burst time of all tasks For each task T in RQ BEGIN IF B(T ) > q~ THEN Insert T into Q1 ELSE Insert T into Q2 END select = 0 count_iteration = 0 WHILE (Q1 & Q2) are not empty BEGIN //Remark: Apply RR algorithm to select the first two tasks from Q 1 // and the first task from Q2 IF select > 2 THEN BEGIN Ti = Select(T [Head (Q1)]) Execute(Ti) //Determine the new quantum time IF count_iteration = 0 THEN j =1 and qi(j-1) =0 qij = q~ +
q~ (Bij −qi(j−1) )2
select++ count_iteration ++ END ELSE
49
Chapter 3
Proposed Model BEGIN Ti = Select(T [Head (Q2)]) Execute(Ti) qij = q~ +
q~ (Bij + qi(j−1) )2
select = 0 END // Rem Bterminated is the finished task burst time IF B(T) = 0 THEN q~ = q~ −
q~ Bterminated
IF new task (Tnew) is arrived THEN BEGIN IF B(Tnew ) > q~ THEN Insert Tnew into Q1 ELSE Insert Tnew into Q2 q~ = q~ +
q~ Bnew
END j++ END WHILE END
Figure (3.1) : Hybrid SJF and RR Algorithm with dynamic quantum time.
Figure (3.2) shows the flow chart of the proposed algorithm. The new proposed hybrid algorithm of using SJF and RR in mixed mode is designed to reduce the starvation problem and improve the waiting time, response time, and throughput.
50
Chapter 3
Proposed Model
Figure (3.2): Flowchart of the proposed algorithm 51
Chapter 3
Proposed Model
3.4 Case Study For more explanation, the following illustrative example discusses SRDQ.
3.4.1Case study-1We test propose technique manually first by fixed time quantum, we apply our proposed by select one task from (Q1 and Q2) alternatively as shown below:Table (3.1): Submitted tasks burst and arrival
T
Burst time
Arrival time
T1
35
0
T2
12
0
T3
8
0
T4
10
0
T5
23
1
T6
10
1
T7
18
2
T8
30
3
Ready Queue
T3
T4
T6
T2
T7
T5
T8
Q2
Q1
T3
T4
T1
T6 T2 Split based on median = T7
T5 T8
T1
16.5
Time quantum = 5 Gant chart Terminat e T3 0
T7 5
10
T4 15
T5 20
T6 25
T8 30
T2 35
T1
T3
40
52
43
Terminat e T7 48
T4 53
Terminate
T5 62
T6 67
T8 73
T2 78
T1 83
Chapter 3
Proposed Model
Terminat e T7
T5 88
T8 92
Terminat e T1
T2 97
T7
104
99
Terminat e T5
107
T8
112
T1
117
T5
122
Terminat e T8
125
T1
130
T8
135
T1
140
T1
145
150
In SJF
Gant chart T3 0
T4
T6
8
T2
18
T7
28
T5
40
T8
58
T1
71
101
136
In RR (time quantum =5)
Gant chart
T1 0
T2 5
10
T3 15
T4 20
T5 25
T6
T7
30
T8
35
40
T1
T2
45
Terminat e T1 105
T5 110
T3
50
53
T4 58
T5
T6
63
68
113
We can detect from Table
T8
T1
118
(3.2)
123
T7 73
T8
Terminat e
T1
78
T2
83
85
Terminat e
Terminat e T7
Terminat e
Terminat e
Terminat e
T5 126
T8 131
T1 136
T5 90
T8 141
T1 146
modest response, waiting and turnaround time aligned with traditional RR, but fortunately we also observe that propose technique have large value for waiting and turnaround time comparing to SJF, however it has better response time. We will fix these problems in chapter 5 by applying more
53
95
Terminat e
the propose technique has aggressive or
than one experiment to achieve our thesis objective.
T7
T8 100
Chapter 3
Proposed Model Table (3.2): result case study -1-
Response time
Waiting time
Turnaround time
T
propose
SJF
RR
propose
SJF
RR
propose
SJF
RR
T1
35
101
0
115
101
111
150
136
146
T2
30
28
5
87
28
73
99
40
85
T3
0
0
10
37
0
45
43
8
53
T4
10
8
15
43
8
48
53
18
58
T5
15
58
20
101
58
102
124
70
125
T6
20
18
25
56
18
57
66
27
67
T7
5
40
30
77
40
93
105
56
111
T8
25
71
35
107
71
118
137
98
138
Average
17.5
40.5
17.5
77.875
40.5
80.875
97.125
52.87
97.875
time
3.4.2Case study -2In this manual test time quantum is determined by propose equation EQ (3.2), we apply proposed technique by select two tasks from Q1 then one task
from Q2 alternatively as demonstrate below:Table (3.3) : Submitted tasks burst and arrival
Task
Burst time
Arrival time
T1
12
0
T2
8
0
T3
23
1
T4
10
2
T5
30
3
54
Chapter 3
Proposed Model T6
T2
15
T4
T1
4
T6
T3
T5
Split based on median q~=13.5
T2
T4
T6
T1
T3
T5
Round (1) q~=13.5 Table (3.4): Task quantum calculations in first round T
𝑩𝒊𝒋 = 𝑩𝒊(𝒋−𝟏) − 𝒒𝒊(𝒋−𝟏)
(𝑩𝒊𝒋 + 𝒒𝒊(𝒋−𝟏) )𝟐
(𝑩𝒊𝒋 − 𝒒𝒊(𝒋−𝟏) )𝟐
∝= 𝟏
∝= 𝟎
Q1
Q2
qij = 𝐪~ +
𝐪~ (𝐁𝐢𝐣 + (−𝟏)𝟏−∝ . 𝐪𝐢(𝐣−𝟏) )𝟐
T2
8-0= 8
(8+0)2= 64
--------
q21 = 13.71
T4
10-0= 10
(10+0)2= 100
--------
q41 =13.63
T6
15-0= 15
--------
(15-0)2= 225
q61 =13.56
T1
12-0= 12
(12+0)2= 144
--------
q11 =13.59
T3
23-0= 23
--------
(23-0)2= 529
q31 =13.52
T5
30-0= 30
--------
(30-0)2= 900
q51 =13.51
∑ 𝑩𝒊𝟏 =98
∑ 𝒒𝒊𝟏 =81.52
T2 T4 0
8
T6 18
T1 31.56
T3 43.56
T5 57.08
Gant chart based on table (3.4) 55
70.59
Chapter 3
Proposed Model
Round (2) T2, T4 and T1 are all finished in the first round so q~ will be updated as following: ~
~
q =q −
q~ Bterminated
- After finishing T2 , Bterminated = 8 , q~ = 13.5 –(13.5/8) = 11.81 - After finishing T4, Bterminated = 10 , q~ = 11.81 –(11.81/10) = 10.62 - After finishing T1, Bterminated = 12 , q~ = 10.62 –(10.62/12) = 9.73 As three tasks finished in the same round, q~ will be updated three times and we obtain q~ = 9.73 in round 2. Table (3.5): Task quantum calculations in the second round T
𝑩𝒊𝒋 = 𝑩𝒊(𝒋−𝟏) − 𝒒𝒊(𝒋−𝟏)
(𝑩𝒊𝒋 + 𝒒𝒊(𝒋−𝟏) )𝟐
(𝑩𝒊𝒋 − 𝒒𝒊(𝒋−𝟏) )𝟐
∝= 𝟏
∝= 𝟎
Q1
Q2
qij = 𝐪~ +
𝐪~ (𝐁𝐢𝐣 + (−𝟏)𝟏−∝ . 𝐪𝐢(𝐣−𝟏) )𝟐
T2
--------
--------
--------
--------
T4
--------
--------
--------
--------
T6
15-13.56=1.44
--------
(1.44-13.56)2=146.8
q62 =9.79
T1
--------
--------
--------
--------
T3
23-13.52= 9.48
--------
(9.48-13.52)2= 16.32
q32 =10.32
T5
30-13.51= 16.49
--------
(16.49-13.51)2= 8.88
q52 =10.82
∑ 𝑩𝒊𝟐 =27.41
--------
T6 70.59
∑ 𝒒𝒊𝟐 =30.93
T3
T5
80.38
90.7
Gant chart based on Table (3.5) 56
101.52
Chapter 3
Proposed Model
Round (3) T6 and T3 are finished in the second round so q ~ will be updated as following: ~
~
q =q −
q~ Bterminated
- After finishing T6 , Bterminated = 15 , q~ = 9.73 –(9.73/15) = 9.08 - After finishing T3, Bterminated = 23 , q~ = 9.08 –(9.08/23) = 8.47
Thus q~ = 8.47 in this round. Table (3.6) : Task quantum calculations in the third round T
𝑩𝒊𝒋 = 𝑩𝒊(𝒋−𝟏) − 𝒒𝒊(𝒋−𝟏)
(𝑩𝒊𝒋 + 𝒒𝒊(𝒋−𝟏) )𝟐
(𝑩𝒊𝒋 − 𝒒𝒊(𝒋−𝟏) )𝟐
∝= 𝟏
∝= 𝟎
Q1
Q2
qij = 𝐪~ +
𝐪~ 𝟏−∝ . 𝐪 𝟐 (−𝟏) (𝐁𝐢𝐣 + 𝐢(𝐣−𝟏) )
T2
--------
--------
--------
--------
T4
--------
--------
--------
--------
T6
--------
--------
--------
--------
T1
--------
--------
--------
--------
T3
--------
--------
--------
--------
T5
16.49-9.73= 6.76
--------
(6.76-9.76)2= 9
9.41
∑ 𝑩𝒊𝒋 =6.76
--------
∑ 𝒒𝒊𝒋 =9.41
T5 108.28
101.52
Gant chart based on Table (3.6) 57
Chapter 3
Proposed Model
Table (3.7): The response, waiting and turnaround times of the SRSQ compared to SJF and RR. T
Response time
Waiting time
Turnaround time
SRDQ
SJF
RR
SRDQ
SJF
RR
SRDQ
SJF
RR
T1
31.56
18
0
31.56
18
48
43.56
30
60
T2
0
0
5
0
0
30
8
8
38
T3
43.56
45
10
67.7
44
65
90.7
67
88
T4
8
8
15
8
6
38
18
16
48
T5
57.8
68
20
78.28
65
68
108.28
95
98
T6
18
30
25
65.30
26
60
80
41
75
Average
26.486
28.166
12.5
41.806
26.5
51.5
58.09
42.83
67.833
time
Table
(3.7)
demonstrates the response, waiting and turnaround times of the
SRSQ compared to SJF and RR. We can see that SRDQ achieved less response time compared to SJF but with higher turnaround and waiting time. Although, that RR really achieved good response time but with comparable waiting time to SRDQ. We can finally say that SRDQ is the balancing point between SJF and RR, in which we tried to overcome or at least reduce RR and SJF problems especially the starvation dilemma.
3.5 Simulation Settings 3.5.1
Simulation Environment
The proposed hybrid algorithm was implemented and tested in two different environments C# engine and CloudSim environment.
58
Chapter 3
Proposed Model
1. Visual Studio Simulation Environment The C# engine was programed by C # 2013 Express Editions as an integrated development tool. The system is a user friendly interface using XML and Windows Foundation Presentation (WPF). The simulation is running on Windows 7 Home Edition x64 bit with Intel Core i5 second generation, 3 MB cache and 4 GB of RAM. 2. CloudSim Simulation Environment a. CloudSim Overview CloudSim is a tool kit for modeling and simulation of cloud computing environments. Its package library advanced on the upper of SimJava which can implemented in Windows and Linux operating system, which inherits from GridSim model thus it maintenance research and improvement of cloud computing environment [73]. Novel features of CloudSim are: 1) Providing simulation for cloud computing environments like datacenters, virtual machines, etc. 2) Providing platform allocation policies, on resources. 3) Providing simulation for network connections. Besides that CloudSim embraces some exclusive characteristic. Initially, it affords virtualization engine which aimed to assistance users to generate and control various data centers also shared virtualization services; furthermore, its elasticity to alteration among time-share and space-share. CloudSim environment assistances speed up the improvement of cloud computing algorithms and methods. b. CloudSim Architecture
In construction, CloudSim simulator uses a rated organization, which involves four stages. Starting by lowest to up: - SimJava, GridSim, CloudSim, and user code [74]. The lowest is a separate event simulation 59
Chapter 3
Proposed Model
engine SimJava, SimJava in charge for the execution of the central roles of top-level simulation model, like: query besides processing events, body system elements (services, clients, data centers, agents and virtual machines).
Figure (3.3): SimJava layer
GridSim is on upper of SimJava, it provisions to high-level software elements and models a majority of grid groundwork counting networks and network stream of movement documents, for example resource-based grid element, data sets, load challenging and information services.
Figure (3.4): GridSim layer
CloudSim level performs next, which extends the essential functionality delivered using GridSim. Virtual data center controlling interfaces had provided by CloudSim layer which counting virtual machine, RAM, disk
60
Chapter 3
Proposed Model
storage and bandwidth. It manages core component (VM, customers, data centers, applications) in the simulation development.
Figure (3.5) : CloudSim Layer
Requests in cloud environment were performed in virtualization layer. Virtual machines are administration in a client VM and other mutual resources. CloudSim supports VM provisioning at two levels: first, at the host level and second, at the VM level. At the host level, it is possible to specify how much of the overall processing power of each core will be assigned to each VM. At the VM level, the VM assigns a fixed amount of the available processing power to the individual application services (task units) that are hosted within its execution engine. Cloudlet class characterizes cloud-based request services like content delivery, social networks and data center distributions. Every application entity has a pre-assigned instruction length (inherited from GridSim’s Gridlet component) and amount of data transfer (both pre and post fetches) that needs to be undertaken for successfully hosting the application. Cloud 61
Chapter 3
Proposed Model
resource layer: Cloud linked essential infrastructure services are demonstrated through data center, that is used to deal with service needs, and
requested to complete these services in a VM. VM Provisioned: implemented by a Host component that models the strategies (space-shared, time-shared) required for allocating processor cores to VMs. The functionalities of this class can easily be overridden to provide accommodations application-specific processor sharing policies [75]. CPU Allocation: the process of assigning processing cores is consummate on a customer provider for every customer component. A number of process cores and distributed computation capability to every VM will have emotional impact in this strategy. Furthermore, Memory Distribution, Storage
Distribution,
and
Bandwidth
Provision
have
the
same
functionalities. Users’ code level is the uppermost layer presented in Figure (4.6). Depend on the revision of the environment, users can generate their individual classes, methods, and member variables to achieve specific experimentations. Figure (3.6): User Code layer
While, the CloudSim environment was implemented in CloudSim toolkit 3.0.3 which provides a generalized and extensible simulation framework that enables modeling, simulation, and experimentation of emerging Cloud computing infrastructures and application services, allowing its users to focus on specific system design issues that they want to investigate, without
62
Chapter 3
Proposed Model
getting concerned about the low level details related to Cloud-based infrastructures and services [76]. To evaluate proposed model a simulated Cloud computing environment consists of a single data center, a broker and a user, constructed by cloud-based interface provided by CloudSim, series of experiments are performed. The allocation of VMs (Virtual Machine) to hosts uses the default FCFS algorithm, while for allocating the cloudlets (tasks) to the virtual machines space-shared policy is used so that the tasks are executed sequentially in each VM. By using this policy each task unit had its own dedicated core therefore number of incoming tasks or queue size did not affect execution time of individual task units as the proposed algorithm is a non-primitive technique. In CloudSim environment, evaluation experiments were performed in three cases using one VM, two VMs and three VMs. These three datasets were also reused for testing. While the assumptions behind the proposed algorithm involve: All cloudlets which have to be processed are available, At runtime no more cloudlets are added, The environment is also static i.e. no more resources are added at
runtime. Finally the inner code of CloudSim was modified to test our proposed algorithm and also to compare it to the traditional RR and SJF. Then our own classes for the scheduling algorithm were defined to extend the basic CloudSim classes. Through this testing phase, we will stick with the same steps applied in the C# engine testing phase, where the same datasets will be reused but in three different cases one VM, Two VMs and three VMs. Each dataset was used in each case as shown in the figures. To ensure result appropriateness in cloud 63
Chapter 3
Proposed Model
environment hence we applied it in cloudsim simulator. We flow same step sequence to prove capably of results. The simulation settings and parameters employed in the CloudSim experiments are summarized in Table (3.8). Table (3.8): CloudSim simulation parameters Number of cloud hosts
1
Number of cloud users
1
Million Instructions Per Second (MIPS)
1000
Number of CPUs per Host
10
Host memory (MB)
2048
Host storage
1000000
Host Bandwidth
10000
Number of CPUs per VM
1,2,3
Virtual Machine Size (MB)
10000
Virtual Machine Memory (MB)
512
Virtual Machine Bandwidth
1000
System architecture
"x86"
Operating system
"Windows 7"
time zone this resource located
10.0
the cost of using processing
3.0
the cost of using memory
0.05
the cost of using storage
0.001
the cost of using bandwidth
0.0
64
Chapter 3
Proposed Model
3.5.2Performance metrics The following metrics considered through the evaluation process []:
Wait time: Average time a process spends in the run queue.
Response Time: Average time elapsed from when a process submitted until useful output obtained.
Turnaround Time: Average time elapsed from when a process submitted to when it has completed.
Throughput: Number of processes completed / time unit.
65
Chapter -4EXPERIMENTAL RESULTS AND EVALUATION
66
Chapter 4: Experimental Results & Evaluation In this chapter we will present two part of Experimental Results and Evaluation, first part we made a survey on deferent scheduling algorithms to investigate which one is suitable to help use in building our model, second part we evaluate discuss our model
4.1
Comparative Study
As mention, we present in first section a survey study on scheduling algorithms For evaluation purposes, three different datasets were used through testing the six evaluated algorithms [RR (Quantum=8), SJF, RRS and FCFS, RRS and SRTF, MAX-MIN and MIN-MIN]. Each dataset consists of 100% randomly generated and dynamically shuffled to complete irregular randomization seeking a perfect benchmark for the evaluation purpose , five tasks denoted as T1, T2, . . .T5 and each task is characterized by its arrival time and burst time, as shown in Table (4.1) . Table (4.1) : Data sets Dataset1
Dataset2
Dataset3
Task
Burst Time
Arrival Time
Burst Time
Arrival Time
Burst Time
Arrival Time
T1
50
0
250
0
30
0
T2
100
1
200
1
300
1
T3
150
2
150
2
200
2
T4
200
3
100
3
20
3
T5
250
4
50
4
10
4
Figure (4.1) represents the evaluation results of the six implemented algorithms showing that the RR and RRS and SRTF scored the highest turnaround time while SJF, Max-Min and Min-Min achieved the least turnaround time confirming the superiority of the Min-Min algorithm in Datasets 1 and 2 and Max-Min in Dataset 3.
67
Experimental Results & Evaluation turnaround Time (Sec)
Chapter 4 600 500
RRS&FCRS
400
RRS&SRTF
300
SJF
200
RR (quantum =8)
100
Max-Min
0 data set data set data set 1 2 3
Min-Min
Figure (4.1): Average Turnaround Time using three different datasets
In Figure
(4.2),
it is noticed that also SJF, Max-Min and Min-Min achieved
the minimum waiting time while standard RR with quantum=8 achieved the worst waiting time. Confirming, also in this figure that the Min-Min algorithm had proved superiority over all in Datasets 1 and 2 while the MaxMin proved its superiority in Dataset 3. Finally, we can conclude from the experimental evaluation that the Min-Min performed effectively and won the competitive against the six implemented standard algorithms and hybrids in reducing the turnaround and waiting times.
500 RRS&FCRS
waiting Time (Sec)
400
RRS&SRTF
300
SJF
200
RR (quantum =8) Max-Min
100
Min-Min 0 data set 1
data set 2
data set 3
Figure (4.2): Average Waiting Time Comparison using three different datasets
From this evaluation study we see that RR is suitable to build our hybrid model to solve starvation problem in SJF algorithm, because as simulation result shows in earlier carves max-min, min-min are have good waiting and 68
Chapter 4
Experimental Results & Evaluation
turnaround time, but just like SJF suffer from starvation problem, FCFS, SRTF not present a good hybrid with RR because they have high waiting and turnaround time Response time in cloud environment represents a quick reply to users of services in which it is considered one of the most important metrics in this heterogeneous environment. Figure
(4.3) represents
the evaluation results of
the six implemented algorithms showing that the SJF score the highest Response time while RR achieved the least Response time, Max-Min and Min-Min have an acceptable Response time, RRS&FCFS and RRS&SRTF have a close ranks confirming the advantage of the Min-Min and Max-Min algorithm over all datasets. RR stander algorithm as known one of the main advantage besides its fairness is the good Response time. In Figure
(4.4)
as one of QoS requirements, we measured the throughput to
six competitive algorithms. Throughput is measured as total number of tasks finished per deep average of complete time. Reviewing Figure (4.4), it is noticed that Max-Min and Min-Min achieved the equal maximum throughput in Datasets 1 while standard RR with quantum=8 and SJF achieved the worst throughput. Confirming, also in this figure that the MinMin algorithm had proved superiority over all Dataset 2 and 3 flowed by Max-Min. Finally, we can conclude from the experimental evaluation that the Min-Min performed effectively and won the competitive against the six implemented standard algorithms and the two hybrids algorithms in reducing the turnaround time, waiting time and throughput, while RR kept its superiority concerning with response time.
69
Chapter 4
Experimental Results & Evaluation
Response Time (Sec)
300 250 RRS&FCRS 200
RRS&SRTF SJF
150
RR (quantum =8)
100
max-min min-min
50 0 Dataset 1
Dataset 2
Dataset 3
Figure (4.3): Average Response Time Comparison using three different datasets
7
No. of finished tasks
6 RRS&FCRS
5
RRS&SRTF 4
SJF RR (quantum =8)
3
max-min
2
min-min 1
0 Dataset 1
Dataset 2
Dataset 3
Figure (4.4): Throughput Comparison using three different datasets
4.2
Proposed Model 4.2.1Modified RR
We modified conventional RR algorithm to solve problem of static quantum in RR before include it in our proposed model. Modified RR algorithm is based on dynamic time quantum approach where the system adjusts the time 70
Chapter 4
Experimental Results & Evaluation
quantum according to the burst time of processes founded in the ready queue, we compare modified RR with stander RR and more than literature algorithm which has already all of them was build on made some modification on stander RR to overcome on time quantum fixed value problem in RR. We test Modified RR in C# engine, and compare it with algorithm in [77], [78] and [79] results of three experiments listed in figures below. - First test Four different datasets were used through testing the four evaluated algorithms [RR (Quantum=20), SARR, NA and Modified RR]. Benchmark take from [77] for the evaluation purpose , four tasks denoted as T1, T2, . . .T4 and each task is characterized by its arrival time and burst time, as shown in Table (4.2). Metric used to evaluation purpose are turnaround and waiting time. Table (4.2): datasets for first test Case 1
Case 2
Case 3
Task
Burst Time
Arrival Time
Burst Time
Burst Time
Arrival Time
T1
20
10
40
0 0
18
T2
0 0
T3
60
T4
80
14
0
70
0
From Figure
120
(4.5),
70
0
74
0
80
Case 4
Arrival Time 0
Arrival Time 10
Arrival Time 0
4
14
6
8
70
13
16
120
21
it is clear that Modified RR shows good performance
concerning to waiting and turnaround time in first three cases, in case 4 it still better than stander RR in turnaround time but SARR give best level flowed by AN, good waiting time was presented from AN flowed by Modified RR.
71
Chapter 4
Experimental Results & Evaluation
120 100 80 60 RR Quantum=20ms SARR
40
AN
20
Modified RR
Case 1
Case 2
Case 3
Waiting time
Turnaround time
Waiting time
Turnaround time
Waiting time
Turnaround time
Waiting time
Turnaround time
0
Case 4
Figure (4.5) : First test
- Second test This experiment consists of several input and output parameters. The input parameters consist of burst time, arrival time, and the number of tasks. The output parameters consist of average waiting time, average turnaround. Result Obtained from proposed Modified algorithm can work effectively with large number of data. In each case we have compared our proposed algorithm’s results with [78] and Round Robin scheduling algorithm’s result. For RR Scheduling Algorithm we have taken 25 as the static time quantum. This experiment divided into two cases, first case Arrival time is considered to be zero for the given tasks, and second case Arrival time was deferent for tasks, we consider five processes T1, T2, T3, T4 and T5 taken as benchmark from [78] for comparison peruse, Table (4.3) show this benchmark in details.
72
Chapter 4
Experimental Results & Evaluation Table (4.3): Datasets in second test
Case 1: With Zero Arrival Time Increasing Decreasing Random Order Order Order
Task
Case 2: Without Zero Arrival Time Increasing Order Decreasing Random Order Order
Burst Time
Burst Time
Burst Time
Arrival Time
T1
30
77
0
T2
34
54
80 45
T3
62
45
T4
74
19
T5
88
14
Figure
(4.6)
2
62
6
34
8
78
14
Burst Time 14
Arrival Time 0
Burst Time 80
Arrival Time 0
Burst Time 65
34
2
74
1
72
45
3
70
4
50
62
4
18
6
43
77
5
14
7
80
shows Modified RR give good performance concerning to
waiting and turnaround time with zero arrival time, in case zero of without arrival time despite the volatility of the level of performance of Modified RR but it still acceptable performance comparing with IRR and RR 300 250
Time Sec
200 150
100 RR (quantum = 25) 50
IRR Modified RR
Increasing Order
Decreasing Order
Random Order
Case 1: With Zero Arrival Time
Increasing Order
Decreasing Order
Waiting time
Turnaround time
Waiting time
Turnaround time
Waiting time
Turnaround time
Waiting time
Turnaround time
Waiting time
Turnaround time
Waiting time
Turnaround time
0
Random Order
Case 1: Without Zero Arrival Time
Figure (4.6): second test
- Third test Consist of five tasks in ready queue with arrival time, burst time shown in Table (4.4), and the time quantum set to be 20 units in case 1 and 2, case 3 73
Chapter 4
Experimental Results & Evaluation
include six tasks and the time quantum set to be 10 units. These datasets were taken from [79] to perfume comparison process. Table (4.4): tasks spesification for third test Case 1
Case 2
Case 3
Task
Burst Time
Arrival Time
Burst Time
Arrival Time
Burst Time
Arrival Time
T1
12
0
42
0
11
0
T2
11
0
32
0
10
0
T3
22
0
82
0
22
0
T4
31
0
45
0
31
0
T5
21
0
22
0
25
0
T6
-------
-------
-------
-------
13
0
Performance of three problems stated in Figure
(4.7)
has been compared by
considering average waiting time, average turnaround time. The result obtained shows the comparisons. In case 1 Modified RR give little highest level in both waiting and turnaround time comparing with proposed in [] but butter comparing with RR, in case 2 and 3 it shows superior performance over two other algorithms.
74
Chapter 4
Experimental Results & Evaluation
200 180 160 140 120 RR
100
Proposed Algorithm in [2013] 80
Modified RR
60 40 20 0 Turnaround time
Waiting time
Case 1
Turnaround time
Waiting time
Turnaround time
Case 2
Waiting time
Case 3
Figure (4.7): Third test
4.2.1Proposed model in C# The proposed algorithm is compared with the standard RR and SJF. Also, it is compared with [] Using same three different data sets in Table 1. The main performance criteria used to compare the algorithms are: response time, waiting time, turnaround time and throughput. The time unit used for the throughput metric is selected randomly. To reach the optimal case in proposed model we made three experiments by changing number of choosing tasks alternatively between two sub-queues (Q1 and Q2): Case1: Chose one small task from small queue(Q1) then chose one large task from large queue (Q2), (1 small(Q1): 1 large (Q2)). Case2: Chose two small tasks from small queue(Q1) then chose one large task from large queue (Q2), (2 small(Q1): 1 large (Q2)). Case3: Chose one small task from small queue(Q1) then chose two large tasks from large queue (Q2), (1 small(Q1): 2 large (Q2)). 75
Chapter 4
Experimental Results & Evaluation
We also produce modified RR by controlling on time quantum by equation [] that mean it calculated dynamically and also compared by previous three cases of proposed technique. a. Proposed model implementation Figure (4.8) represents the evaluation process of the proposed model using the first data set. Table (4.5) shows the results of the experimentation. Table (4.5): Results of the first experimentation using first data set Response Time
Waiting Time
Turnaround Time
1 small( Q1): 1 large (Q2)
11
107.2
161
2 small (Q1): 1 large (Q2)
16
98.4
248.4
1 small( Q1): 2 large (Q2)
10
122.2
272.2
1 small( Q1): 1 large (Q2)
210
69.2
219.2
2 small (Q1): 1 large (Q2)
200
65.8
215.8
1 small( Q1): 2 large (Q2)
230
75.8
225.8
190
230
230
Technique
SRSQ (quantum =8)
SRDQ
Modified RR
In Figure
(4.8)
there are three groups, each group contain seven bars
that represent the compared algorithms. First batch (from right to left) includes the evaluation based on using turnaround time as measure, second batch based on waiting time and third batch based on response time. Time quantum is assigned to be 8 unit in SRSQ, but time quantum is changed dynamically using the proposed equation in Modify RR SRDQ. These settings were used for the rest of experiment evaluations repeated use of the dataset 2 and dataset 3. As shown in Figure
(4.8),
the proposed algorithm SRSQ has a competitive
response time, while in waiting and turnaround time SRDQ gave better results. 76
Chapter 4
Experimental Results & Evaluation
Data Set 1 300 SRSQ 1 small( Q1): 1 large (Q2) 250
SRSQ 2 small (Q1): 1 large (Q2)
200
SRSQ 1 small( Q1): 2 large (Q2)
150
SRDQ 1 small( Q1): 1 large (Q2)
100
SRDQ 2 small (Q1): 1 large (Q2)
50
SRDQ 1 small( Q1): 2 large (Q2) Modified RR
0 Response Time
Waiting Time
Turnaround Time
Figure (4.8): Experimental results of comparison of algorithms using first data set
Based on using Dataset 2, Table
(4.6) is
constructed based on executing the
different algorithms. Figure 18 is derived from the data listed in Table that increases the proof of Figure
(4.8)
trends because of the same state of
competence Table (4.6): Results of the second experimentation using second data set Response Time
Waiting Time
Turnaround Time
1 small( Q1): 1 large (Q2)
17
131.2
281.2
2 small (Q1): 1 large (Q2)
26.6
119
269
1 small( Q1): 2 large (Q2)
16
127.6
277.6
1 small( Q1): 1 large (Q2)
250
102.4
252.4
2 small (Q1): 1 large (Q2)
260
95.6
245.6
1 small( Q1): 2 large (Q2)
250
115.4
265.4
290
460
610
Technique
SRSQ (quantum =8)
SRDQ
The modified RR
77
(4.6)
Chapter 4
Experimental Results & Evaluation Data Set 2
700 SRSQ 1 small( Q1): 1 large (Q2)
600 SRSQ 2 small (Q1): 1 large (Q2) 500 SRSQ 1 small( Q1): 2 large (Q2) 400 SRDQ 1 small( Q1): 1 large (Q2) 300 SRDQ 2 small (Q1): 1 large (Q2) 200
SRDQ 1 small( Q1): 2 large (Q2)
100
Modified RR
0 Response Time Waiting Time Turnarround Time
Figure (4.9): Experimental results of comparison of algorithms using second data set
In Table (4.7), third dataset is used to perform the last experiment using same configuration for the algorithms. The experiments is written down and documented in Table (4.7) to derive Figure (4.10). Figure (4.10) shows that SRSQ relevant to response time evaluation still have good levels. These words are acceptable in concerning waiting and turnaround time. However, SRDQ achieved successfully the best results regarding to both of turnaround time and waiting time. Table (4.7): Results of the third experimentation using third data set Response Time
Waiting Time
Turnaround Time
1 small( Q1): 1 large (Q2)
17.6
37.8
149.8
2 small (Q1): 1 large (Q2)
22.8
35
147
1 small( Q1): 2 large (Q2)
16
40.4
152.4
1 small( Q1): 1 large (Q2)
80
25.8
137.8
2 small (Q1): 1 large (Q2)
78
25
137
1 small( Q1): 2 large (Q2)
118
38.6
150.6
58
146
258
Technique
SRSQ (quantum =8)
SRDQ
The modified RR
78
Chapter 4
Experimental Results & Evaluation Data Set 3
300 SRSQ 1 small( Q1): 1 large (Q2) 250
SRSQ 2 small (Q1): 1 large (Q2)
200
SRSQ 1 small( Q1): 2 large (Q2)
150
SRDQ 1 small( Q1): 1 large (Q2)
100
SRDQ 2 small (Q1): 1 large (Q2)
50
SRDQ 1 small( Q1): 2 large (Q2) Modified RR
0 Response Time
Waiting Time
Turnarround Time
Figure (4.10): Experimental results of comparison of algorithms using third dataset
Finally, from the experimental evaluation, it can be concluded that the proposed algorithm perform effectively using a predefined constant value as time quantum rather than using the proposed adaptive equation. After all experiments we made on our proposed model we found that SRDQ in case2, select two small tasks from Q1 then one large task from Q2 (2 small (Q1): 1 large (Q2)) is the balancing case between the other cases so will depend on this case in the next experiments in subsection a and b. b. QOS measurement As one of QOS requirements, we measured throughput to proposed technique and compare it with traditional RR and SJF. Throughput is measured as total number of tasks finished per deep average of complete time. Deep average is calculated by computing the total average of turnaround time per data set over the experiments using different algorithms. Then the average of each is summed and divided by their total count in order to obtain the deep average Figure
(4.11)
represents the different throughputs achieved by the different
applied experiments. Reviewing Figure 6 shows that the proposed algorithm
79
Chapter 4
Experimental Results & Evaluation
in both of its version is very efficient to achieve optimal throughput rather others techniques applied during experiments. throughput 5
SRSQ
4
SRDQ
3
RR
2
Modified RR
1
SJF
0 dataset 1
dataset 2
dataset 3
Figure (4.11): Summery of the Throughput for different three experiments
c. Proposed model discussion We compare proposed technique with [] and stander SJF and RR to prove it efficiently and that what confirmed in the flowing experiments. Figure (4.12) clarifies the experimental results using dataset1of the four algorithms with quantum value equals 8 in case of RR and our proposed algorithm but with static quantum (SRSQ). The used quantum time for SRDQ is computed based on the proposed adaptive equation. Dataset1 600 500 SJF 400 RR (quantum=8) 300 TSPBRR 200
SRSQ (quantum=8)
100
SRDQ
0 Turnarround Time
Waiting Time
Response Time
Figure (4.12): First Experimentation Results Using Dataset1
As shown in Figure 22, the SRDQ has a competitive response time with the traditional RR with constant quantum while in turnaround time and waiting 80
Chapter 4
Experimental Results & Evaluation
time, but with a much better performance in waiting and turnaround times. Also, SRDQ achieved much less waiting time than TSPBRR and SJF which has a great impact on reducing task starvation. Finally SRDQ achieved accepted turnaround time compared to its static quantum version but with much higher response time. Dataset2 700 600 500
SJF
400
RR (quantum=8) TSPBRR
300
SRSQ (quantum=8) 200
SRDQ
100 0 Turnarround Time
Waiting Time
Response Time
Figure (4.13): Second Experimentation Results Using Dataset2
Figure (4.13) mainly represents the experimental results of the implemented algorithms as in Figure (4.12) but based on dataset2. From Figure
(4.12),
we
can noticed that SRSQ also achieved better turnaround time than the SRDQ and a comparable waiting time but also with a much higher response time. In spite of that RR achieved less response time but suffered from so much waiting time that nearly equals the triple of SRDQ waiting time. Finally SRSQ (the static quantum version of the proposed algorithm) achieved really good results compared to RR although they both use the same quantum value.
81
Chapter 4
Experimental Results & Evaluation Dataset3
300 250 SJF
200
RR (quantum=8) 150
TSPBRR
100
SRSQ (quantum=8) SRDQ
50 0 Turnarround Time
Waiting Time
Response Time
Figure (4.14): Third Experimentation Results Using Dataset3
In Figure (4.14), dataset3 is used to perform the last experiment using same configuration for the algorithms. This figure shows that RR wins the competence versus the SRDQ because of roughly producing late response time. However, the SRDQ achieved successfully the best results for regarding both of turnaround time and waiting time compared to TSPBRR and SJF. From the experimental evaluation, it can be concluded that the SRSQ performs effectively using a predefined constant value as time quantum in the turnaround time and waiting time rather than SJF, RR and using the proposed adaptive equation which in turn performed really better in response time. Finally Figure (4.15) represents the evaluation results of comparing SRDQ and SRSQ against a hybrid of Round Robin Scheduling & First Come First Serve (RRS&FCFS) [], TSPBRR and Round Robin Scheduling & Shortest Remaining Time First (RRS&SRTF) [] in which the results showed that the SRDQ is more efficient than the others in turnaround times and waiting time averages over all used data sets.
82
Chapter 4
Experimental Results & Evaluation
Turnaround and Waiting Times Averages Using Dataset1, 2 and 3 700 600 500 400 RRS&FCFS
300
RRS&SRTF 200
TSPBRR SRSQ (quantum=8)
100
SRDQ
0
data set 2
Waiting Time
Turnarround Time
Waiting Time
Turnarround Time
Waiting Time
Turnarround Time data set 1
data set 3
Figure (4.15): Turnaround and Waiting Times Averages Using Dataset1, 2 and
4.2.2Proposed model in CloudSim a. Proposed model implementation Figure (4.16), Table (4.8), Represent experiments applying on first dataset using one, two, three virtual machines. Don’t forget that we set time quantum to be 8 units in SRSQ while it change dynamically in SRDQ and Modified RR according to adaptive equation.
83
Chapter 4
Experimental Results & Evaluation
Table (4.8): First Experimentation Results using Dataset1, on (1, 2, 3) VMs Single virtual machine Technique
Response Time
Waiting Time
Response Time
Waiting Time
70.4
70.4
220.4
11.2
11.2
1 small( Q1): 1 large (Q2)
6.8
198.4
342.4
2.8
2 small (Q1): 1 large (Q2)
8.4
129.8
279.8
1 small( Q1): 2 large (Q2)
18.8
193.2
1 small( Q1): 1 large (Q2)
70.4
2 small (Q1): 1 large (Q2) 1 small( Q1): 2 large (Q2)
Modified RR
SRSQ (quantum =8)
SRDQ
Three virtual machines
Two virtual machines
Turnaround Time
Turnaround Time
Response Time
Waiting Time
166.4
11.2
11.2
161.2
96.8
246.8
3.8
82.2
232.2
22.2
68.4
218.8
4.2
51.2
201.2
343.2
10.8
64.2
214.4
11.4
85
80.6
240.2
11.2
11.2
161.2
11.2
11.2
161.2
70.4
70.4
230.2
11.2
11.2
161.2
11.2
11.2
161.2
70.4
80.6
240.2
11.2
11.2
161.2
11.2
11.2
161.2
Discussing Figure (4.16) based on fist dataset shows:response time: on single virtual machine was best in SRSQ while was stable in SRDQ an Modified RR, on two virtual machines SRSQ in case2 had highest bar, on three virtual machine SRSQ in case1 and case2 presented earlier response time, in this experiment response time was good in proposed model so as in Modified RR. Waiting time: on single virtual machine was high in SRSQ but SRDQ and
Modified RR gave convergent waiting time. On two virtual machines SRDQ and Modified RR have better levels from SRSQ. On three virtual machines we obtained approximately same rate that obtained on two virtual machines. Turnaround time: on single virtual machine, SRDQ and Modified RR
produced efficient turnaround time comparing with SRSQ. These levels of turnaround time continue over two and three virtual machines.
84
Turnaround Time
235
Chapter 4
Experimental Results & Evaluation Dataset 1
350 300 250 200 150 100 50 0
Turnaround Time
Waiting Time
two virtual machine
Response Time
Turnaround Time
Waiting Time
Response Time
Turnaround Time
Waiting Time
Response Time
single virtual machine
three virtual machine
SRSQ 1 small( Q1): 1 large (Q2)
SRSQ 2 small (Q1): 1 large (Q2)
SRSQ 1 small( Q1): 2 large (Q2)
SRDQ 1 small( Q1): 1 large (Q2)
SRDQ 2 small (Q1): 1 large (Q2)
SRDQ 1 small( Q1): 2 large (Q2)
Modified RR
Figure (4.16): First Experimentation Results using Dataset1, on (1, 2, 3) VMs
Result in table
(4.9)
and Figure
(4.17)
views the experimentation based on
second dataset:Response time: SRSQ on single virtual machine was the best while SRDQ
and Modified RR were near each to other in high values; on two virtual machines all bars had Convergent levels except SRSQ in case1 which had lowest bar, on three virtual machines SRSQ presented earlier response time. Waiting time: on single virtual machine SRSQ in case2 had acceptable level
but SRDQ and Modified RR gave convergent waiting time. On two virtual machines SRDQ and Modified RR have better levels from SRSQ and this Inequality continue over three virtual machines Turnaround time: on single virtual machine, SRSQ in case2 produced efficient
turnaround time comparing with SRDQ and Modified RR. On two virtual machines SRSQ in case3 presented best one while SRDQ and Modified RR appear in equal levels on three virtual machines. 85
Chapter 4
Experimental Results & Evaluation
Table (4.9): Second Experimentation Results using Dataset2, on (1, 2, 3) VMs Single virtual machine Response Time
Waiting Time
Turnaround Time
Response Time
Waiting Time
Turnaround Time
Response Time
Waiting Time
Turnaround Time
145.4
180.6
330.6
31.4
31.4
191.2
31.6
31.6
191.4
1 small( Q1): 1 large (Q2)
8.8
200
350
6.4
98.8
248.4
16.2
71.4
221.4
2 small (Q1): 1 large (Q2)
10.4
129.4
280.4
27.4
66.4
216.4
6.8
45.8
195.8
1 small( Q1): 2 large (Q2)
13.4
193.6
343.6
26.8
113.2
263.2
6.8
56
206
1 small( Q1): 1 large (Q2)
150.8
170.6
320.8
31.2
31.6
191
31.2
31.2
190.6
2 small (Q1): 1 large (Q2)
150.2
200.2
360.02
31.6
31.6
191
31.2
31.2
190.6
1 small( Q1): 2 large (Q2)
150.8
170.6
320.8
31.2
31.6
191
31.2
31.2
190.6
Turnaround Time
Modified RR
SRSQ (quantum =8)
SRDQ
Three virtual machines
Waiting Time
Technique
Two virtual machines
Dataset 2 400 350 300 250 200 150 100 50 0
two virtual machine
SRSQ 2 small (Q1): 1 large (Q2) SRDQ 2 small (Q1): 1 large (Q2)
Response Time
Turnaround Time
Waiting Time
SRSQ 1 small( Q1): 1 large (Q2) SRDQ 1 small( Q1): 1 large (Q2) Modified RR
Response Time
Turnaround Time
Waiting Time
Response Time
single virtual machine
three virtual machine
SRSQ 1 small( Q1): 2 large (Q2) SRDQ 1 small( Q1): 2 large (Q2)
Figure (5.17): Result using second dataset and 1,2,3 virtual machines
86
Chapter 4
Experimental Results & Evaluation
Table (5.10) and Figure (4.18), represent last experiment using dataset3 and we can observe that:Response time: SRSQ on single virtual machine was the best while SRDQ
and Modified RR were near each to other in high values; on two virtual machines all bars had Convergent levels except SRSQ in case1 which had lowest bar, on three virtual machines SRSQ presented earlier response time. Waiting time: on single virtual machine SRSQ in case2 had acceptable level
but SRDQ and Modified RR gave convergent waiting time. On two virtual machines SRDQ and Modified RR have better levels from SRSQ which give highest level in case3, this sequence continue over three virtual machines Turnaround time: on single virtual machine, SRSQ in case2 produced efficient
turnaround time comparing with SRDQ and Modified RR. On two virtual machines SRSQ in case3 presented best one while SRDQ and Modified RR appear in equal levels. On three virtual machines SRDQ and Modified RR kept their nearly levels, SRSQ show worst performance in case3. Table (4.10): Third Experimentation Results using Dataset3, on (1, 2, 3) VMs Single virtual machine Technique
Modified RR
Three virtual machines
Two virtual machines
Response Time
Waiting Time
Turnaround Time
Response Time
Waiting Time
Turnaround Time
Response Time
Waiting Time
Turnaround Time
126.6
126.6
252.8
7.2
7.2
153
7.2
7.2
120.6
SRSQ
1 small( Q1): 1 large (Q2)
7.6
98
210
4.6
13.4
125.4
5.4
11
123
(quantum =8)
2 small (Q1): 1 large (Q2)
7.2
87.2
199.2
4.2
33.8
145.8
5.8
30
142
1 small( Q1): 2 large (Q2)
20.2
133.2
245.4
19
53.4
165.4
182.6
211.4
323.4
1 small( Q1): 1 large (Q2)
92.4
98.2
212
7.2
7.2
152.8
7.2
7.2
120.6
2 small (Q1): 1 large (Q2)
112.4
112.4
234.6
7.2
7.2
152.8
7.2
7.2
120.6
1 small( Q1): 2 large (Q2)
92.4
98.2
212
7.2
7.2
152.8
7.2
7.2
120.6
SRDQ
87
Chapter 4
Experimental Results & Evaluation Dataset3
350 300 250
200 150 100 50 0
Turnaround Time
SRSQ 2 small (Q1): 1 large (Q2) SRDQ 2 small (Q1): 1 large (Q2)
Waiting Time
two virtual machine
Response Time
Turnaround Time
Waiting Time
Response Time
SRSQ 1 small( Q1): 1 large (Q2) SRDQ 1 small( Q1): 1 large (Q2) Modified RR
Turnaround Time
Waiting Time
Response Time
single virtual machine
three virtual machine
SRSQ 1 small( Q1): 2 large (Q2) SRDQ 1 small( Q1): 2 large (Q2)
Figure (4.18) : Result using third dataset and 1, 2, 3 virtual machines
Finally we denoted from these experiments as number of machine increase we obtained better result but that can be more clarity if number of tasks was bigger as we will show in next part of this chapter. And we will take SRDQ in case2 as middle case between all cases to be a symbol of our model in all next experiments in rest of this chapter. b. QOS measurement In cloudsim environment we also measured throughput as a metric of QOS, we calculate throughput in same manner applied in c# engine and compared it with stander SJF and RR also with our Modified RR. Discussing Figure (4.19) which present throughput metric using three deferments datasets declare in Table 1 applying on 1, 2, 3 virtual machine we can detect that our proposed (SRSQ, SRDQ) gave best throughput based on all three datasets over 1,2,3 VMs, SJF, RR and Modified RR gave equal throughput on single VM over all datasets that get ahead of 2-VMs using Dataset1 and 2, but in Dataset 3 RR and Modified produce lower throughput, on 3-VMs as mention 88
Chapter 4
Experimental Results & Evaluation
our technique in both of its two version gave high level, SJF, RR and Modified based on first dataset appear in low equal levels, based on second dataset SJF and RR low down then they bring back their levels next in third dataset. thruoghput 4 3.5 3 2.5 2 1.5
1 0.5 0 Dataset 1
Dataset 2
Dataset 3
Dataset 1
single virtual machine
Dataset 2
Dataset 3
Dataset 1
two virtual machines SRSQ
SRDQ
Modified RR
Dataset 2
Dataset 3
three virtual machines RR
SJF
Figure (4.19): Summery of the Throughput for different three experiments
c. Proposed model discussion To evaluate proposed technique performance we made the flowing comparisons with [] and stander SJF and RR as shown in the flowing experiments.
Figure
(4.20)
clarifies the experimentation results of the implemented
algorithms using dataset1 on one, two and three VMs. It is noticed that RR has the least response time in all phases but suffer from the highest turnaround time. SRSQ had a comparable response time to RR but also suffers from a high waiting and turnaround times while SRDQ TSPBRR and SJF achieved nearly equal values in each metric of the three.
89
Chapter 4
Experimental Results & Evaluation Dataset1
625
125
25
5
1 Response Time
Waiting Time Turnaround Time
Response Time
three virtual machines SJF
Waiting Time Turnarround Time two virtual machine
RR (quantum=8)
TSPBRR
SRSQ (quantum=8)
Response Time
Waiting Time Turnarround Time
single virtual machine SRDQ
Figure (4.20): First Experimentation Results using Dataset1, on (1, 2, 3) VMs
From Figure (4.21), we can notice that RR and SRSQ really achieved good comparable times in all three phases, while SRDQ and TSPBRR suffered from elevated values compared to SJF, RR and SRDQ. Finally the SJF for the first time can join the winners and achieved more than accepted results.
90
Chapter 4
Experimental Results & Evaluation Dataset2
700 600
500 400
300 200 100 0
SRSQ (quantum=8)
Turnaround Time
TSPBRR
Waiting Time
two virtual machines
Response Time
RR (quantum=8)
Turnaround Time
SJF
Waiting Time
Response Time
Turnaround Time
Waiting Time
Response Time
three virtual machines
single virtual machine
SRDQ
Figure (4.21): Second Experimentation Results using Dataset2, on (1, 2, 3) VMs
Finally in the third and final experiments using dataset3, we can notice in Figure (4.22) that with the increasing number of VMs, SJF performance became better and even exceeded SRSQ especially in response and waiting times, while TSPBRR performance was degrading.
91
Chapter 4
Experimental Results & Evaluation Dataset3
400 350 300 250 200 150 100 50 0 Response Time WaitingTurnarround Time Time
Response Time Waiting Turnaround Time Time
three virtual machines SJF
RR (quantum=8)
Response Time Waiting Turnaround Time Time
two virtual machines TSPBRR
SRSQ (quantum=8)
single virtual machine SRDQ
Figure (4.22): Third Experimentation Results using Dataset3, on (1, 2, 3) VMs
4.3 Impact of the Proposed Algorithm on Reducing the Starvation Problem. A final test was done through the CloudSim environment using a randomized dataset of 10 cloudlets (tasks) with random arrival and long burst time generated by the environment given in Table (4.11) to detect the impact of the proposed algorithm on reducing the starvation problem
92
Chapter 4
Experimental Results & Evaluation Table (4.11): cloudlet specification
It is noticed that the cloudlets (1, 6, 9, 3, and 8) burst time is long which means that theses cloudlets will suffer from starvation if the SJF scheduler was applied and also will suffer if the RR quantum was small. In the proposed algorithms with its two versions, we tried to balance between reducing cloudlets waiting time and increasing quantum value also tried to achieve fairness in selecting cloudlets for execution through having two short cloudlets from Q1 and one long cloudlet from Q2.
93
Chapter 4
Experimental Results & Evaluation
500 450 400
300
SJF RR (quantum =8)
250
TSPBRR 200
SRSQ (quantum =8) SRDQ
150 100
50 0 0
1
2
3
4
5
6
7
8
9
Cloudlet ID
Figure (4.23): Cloudlets waiting time on one VM
200 180 160 140
waitin time (Sec)
waitin time (Sec)
350
120
SJF
100
RR (quantum =8)
TSPBRR
80
SRSQ (quantum =8) 60
SRDQ
40
20 0 0
1
2
3
4
5
6
7
8
Cloudlet ID
Figure (4.24): Cloudlets waiting time on two VMs
94
9
Chapter 4
Experimental Results & Evaluation
180
160 140
waitin time (Sec)
120
SJF
100
RR (quantum =8) 80
TSPBRR SRSQ (quantum =8)
60
SRDQ
40 20 0
0
1
2
3
4
5
6
7
8
9
Cloudlet ID
Figure (4.25): Cloudlets waiting time on three VMs
Figures (4.23,24 and 25) clarifies the waiting time of each cloudlets applied on a 1, 2 and 3 VMs, from which we can see that the proposed algorithm with its two versions had achieved much better reduction in cloudlets waiting time especially cloudlets with long burst time. We can also notice that SRDQ performance exceeds SRSQ or at least comparable to it. SJF achieved the worst waiting time especially with cloudlets with long burst time while TSPBRR achieved better waiting time in most cases that its traditional version. Reducing the waiting time indicates that the average time a cloudlet spends in the run queue is reduced which leads to reducing cloudlet starvation. SRDQ achieved this waiting time reduction and thus starvation through having the two sub-queues Q1 and Q2 where Q1 for nearly short tasks and Q2 for the rest depending on the tasks median. Many tests and trials have been done by the researchers to find the best methodology for selecting tasks from Q1 and Q2 to be assigned to resources and finally found that as clarified 95
Chapter 4
Experimental Results & Evaluation
in the algorithm that having two tasks from Q1 and one task from Q2 really have a good impact on reducing task starvation. From the simulations results, it is obvious that SRSQ and SRDQ had achieved a good performance compared to the traditional RR and SJF and also to the hybrids RRS&FCFS and RRS&SRTM in response time and in waiting time. It is also obvious that SRDQ had superiority on SRSQ in reducing waiting and response times while SRSQ exceeds in reducing turnaround time. We can assure that the proposed algorithm in its both versions (SRSQ and SRDQ) had achieved a good reduction in the waiting time of each task and the overall waiting average, from which we can say that it leads to reducing task starvation, which is one of our first priorities. But one last issue, the experiments results had shown that dynamicity in task quantum had a good impact on reducing task waiting time and response time, while the dynamicity in each task quantum from round to round had a good impact on reducing turnaround time so we can see that SRSQ had exceeds SRDQ in turnaround as it only depends on having a static quantum for all tasks that did not change from round to round SRDQ works as the balancing point with response ,waiting and starvation reduction especially in tasks with long burst times and with a comparable performance in turnaround to SJF, RR, RRS&FCFS, RSS&SRTM and TSPBRR. From all of the above, we can surely conclude that having the task quantum value is nearly impossible.
96
Chapter -5CONCOLUSION S
97
Chapter 5: Conclusions and future works 5.1 Conclusions Task scheduling is one of the major research fields in cloud computing, where different scheduling algorithms were introduced ranging from traditional SJF, RR and MQ techniques to many hybrids as Min-Min, Min-Max and RRS&FCFS. Many trials of developing a scheduler as good as SJF but with less waiting and thus less task starvation have been done. Some researchers had developed a hybrid of SJF & RR to get benefit from RR good performance in enhancing SJF performance but these hybrids always suffer from higher task waiting time compared to other schedulers.
In this thesis, a hybrid of SJF&RR algorithms was proposed but with two sub-queues: one for nearly short task and the other for long tasks where the task assigning methodology balance between the two sub-queues to substantially reduce task starvation especially in tasks with nearly long burst time. The proposed algorithm based on a dynamic task quantum calculation process based on the median of the submitted tasks and the task quantum in the previous round of the RR scheduler. The proposed algorithms were simulated in two different versions SJF&RR with dynamic quantum (SRDQ) and SJF&RR with static quantum (SRSQ) in two different environments a C# programed engine and a CloudSim environment with 1,2 and 3 virtual machines. Both versions of the proposed algorithm showed a good performance in reducing response and waiting times and a comparable performance in turnaround time to state of art.
98
future works
Chapter 5
5.2 Future Works In the future the researchers intend to proceed their experiments in finding a better task quantum calculation methodology that balance between the static and dynamic quantum values to achieved better reduction in waiting and thus reduce task starvation.
99
References
References. 1. Lu, C. W., Hsieh, C. M., Chang, C. H., & Yang, C. T. (2013, July). An improvement to data service in cloud computing with content sensitive transaction analysis and adaptation. In Computer Software and Applications Conference Workshops (COMPSACW), 2013 IEEE 37th Annual (pp. 463-468). IEEE. 2. Azeez, A., Perera, S., Gamage, D., Linton, R., Siriwardana, P., Leelaratne, D., & Fremantle, P. (2010, July). Multi-tenant SOA middleware for cloud computing. In Cloud computing (cloud), 2010 ieee 3rd international conference on (pp. 458465). IEEE. 3. Demchenko, Y., & de Laat, C. (2011, March). Defining generic architecture for Cloud infrastructure as a service model. In The International Symposium on Grids and Clouds and the Open Grid Forum Academia Sinica (pp. 2-10). 4. Calheiros, R. N., Ranjan, R., Beloglazov, A., De Rose, C. A., & Buyya, R. (2011). CloudSim: a toolkit for modeling and simulation of cloud computing environments and evaluation of resource provisioning algorithms. Software: Practice and Experience, 41(1), 23-50 5. Ganapathi, A., Chen, Y., Fox, A., Katz, R., & Patterson, D. (2010, March). Statistics-driven workload modeling for the cloud. In Data Engineering Workshops (ICDEW), 2010 IEEE 26th International Conference on (pp. 87-92). IEEE. 6. Garg, S. K., & Buyya, R. (2011, December). Networkcloudsim: Modelling parallel applications in cloud simulations. In Utility and Cloud Computing (UCC), 2011 Fourth IEEE International Conference on (pp. 105-113). IEEE. 7. Buyya, R., Ranjan, R., & Calheiros, R. N. (2009, June). Modeling and simulation of scalable Cloud computing environments and the CloudSim toolkit: Challenges and opportunities. In High Performance Computing & Simulation, 2009. HPCS'09. International Conference on (pp. 1-11). IEEE. 8. Das, A. K., Adhikary, T., Razzaque, M. A., & Hong, C. S. (2013, January). An intelligent approach for virtual machine and QoS provisioning in cloud computing. In Information Networking (ICOIN), 2013 International Conference on (pp. 462467). IEEE. 9. Bhoi, U., & Ramanuj, P. N. (2013). Enhanced Max-min task scheduling algorithm in cloud computing. International Journal of Application or Innovation in Engineering and Management (IJAIEM), 259-264. 10. Wang, S. C., Yan, K. Q., Liao, W. P., & Wang, S. S. (2010, July). Towards a load balancing in a three-level cloud computing network. In Computer Science and Information Technology (ICCSIT), 2010 3rd IEEE International Conference on (Vol. 1, pp. 108-113). IEEE. 11. Venters, W., & Whitley, E. A. (2012). A critical review of cloud computing: researching desires and realities. Journal of Information Technology, 27(3), 179197. 12. Santra, S., Dey, H., Majumdar, S., & Jha, G. S. (2014, July). New simulation toolkit for comparison of scheduling algorithm on cloud computing. In Control, Instrumentation, Communication and Computational Technologies (ICCICCT), 2014 International Conference on (pp. 466-469). IEEE. 13. Kaur, A., Kaur, J., Kumar, A., & Kumar, A. Cloud Computing Challenges: A Survey. Vol. 6 No.10. (PP.602-607). Oct 2015 14. Xu, Xun. "From cloud computing to cloud manufacturing." Robotics and computer-integrated manufacturing 28.1 (2012): 75-86. 100
References 15. Petcu, D. (2011). Portability and interoperability between clouds: challenges and case study. In Towards a Service-Based Internet (pp. 62-74). Springer Berlin Heidelberg. 16. Jula, A., Sundararajan, E., & Othman, Z. (2014). Cloud computing service composition: A systematic literature review. Expert Systems with Applications, 41(8), 3809-3824. 17. MELL, Peter; GRANCE, Tim. The NIST definition of cloud computing. 2011. National Institute of Standards and Technology Special Publication 800-145 7 pages (September 2011). 18. JULA, Amin; SUNDARARAJAN, Elankovan; OTHMAN, Zalinda. Cloud computing service composition: A systematic literature review. Expert Systems with Applications, 2014, 41.8: 3809-3824. 19. PATEL, Ahmed, et al. Taxonomy and proposed architecture of intrusion detection and prevention systems for cloud computing. In: Cyberspace Safety and Security. Springer Berlin Heidelberg, 2012. PP. 441-458. 20. ZHANG, Qi; CHENG, Lu; BOUTABA, Raouf. Cloud computing: state-of-the-art and research challenges. Journal of internet services and applications, 2010, 1.1: 7-18. 21. HWANG, Kai; DONGARRA, Jack; FOX, Geoffrey C. Distributed and cloud computing: from parallel processing to the internet of things. Morgan Kaufmann, 2013. 22. MEZGÁR, István; RAUSCHECKER, Ursula. The challenge of networked enterprises for cloud computing interoperability. Computers in Industry, 2014, 65.4: 657-674. 23. FOSTER, Ian, et al. Cloud computing and grid computing 360-degree compared. In: Grid Computing Environments Workshop, 2008. GCE'08. Ieee, 2008. PP. 1-10. 24. WANG, Wei-Jen, et al. Adaptive scheduling for parallel tasks with QoS satisfaction for hybrid cloud environments. The Journal of Supercomputing, 2013, 66.2: 783811. 25. DAVE, Yash P., et al. Various job scheduling algorithms in cloud computing: A survey. In: Information Communication and Embedded Systems (ICICES), 2014 International Conference on. IEEE, 2014. p. 1-5. 26. SUN, Hong, et al. Research and simulation of task scheduling algorithm in cloud computing. TELKOMNIKA Indonesian Journal of Electrical Engineering, 2013, 11.11: 6664-6672. 27. TIWARI, Damodar; TIWARI, Devanshu. An Efficient Hybrid SJF and Priority based Scheduling of Jobs in Cloud Computing. International Journal of Modern Engineering & Management Research, Vol 2, Issue 4, PP.26-41, Dec. 2014 28. SUN, Hong, et al. Research and simulation of task scheduling algorithm in cloud computing. TELKOMNIKA Indonesian Journal of Electrical Engineering, 2013, 11.11: 6664-6672. 29. PATEL, Swachil; BHOI, Upendra. Priority Based Job Scheduling Techniques In Cloud Computing: A Systematic Review. International journal of scientific & technology research, 2013, 2: 147-152. 30. SALOT, Pinal. A survey of various scheduling algorithm in cloud computing environment. IJRET: International Journal of Research in Engineering and Technology, ISSN, 2013, 2319-1163. 31. Naik, Pradeep, Surbhi Agrawal, and Srikanta Murthy. "A survey on various task scheduling algorithms toward load balancing in public cloud." American Journal of Applied Mathematics 3.1-2 (2015): 14-17. 101
References 32. Zhang, Liping, Weiqin Tong, and Shengpeng Lu. "Task scheduling of cloud computing based on Improved CHC algorithm." Audio, Language and Image Processing (ICALIP), 2014 International Conference on. IEEE, 2014. 33. Dave, Yash P., et al. "Various job scheduling algorithms in cloud computing: A survey." Information Communication and Embedded Systems (ICICES), 2014 International Conference on. IEEE, 2014. 34. RAJ, Gaurav; SINGH, Dheerendra; BANSAL, Ankur. Load balancing for resource provisioning using Batch Mode Heuristic Priority in Round Robin (P B RR) Scheduling. In: Confluence 2013: The Next Generation Information Technology Summit (4th International Conference). IET, 2013. PP. 308-314. 35. ČERNÝ, Pavol, et al. From Non-preemptive to Preemptive Scheduling using Synchronization Synthesis. arXiv preprint arXiv:1505.04533, 2015. 36. MOSCHAKIS, Ioannis A.; KARATZA, Helen D. Evaluation of gang scheduling performance and cost in a cloud computing system. The Journal of Supercomputing, 2012, 59.2: 975-992. 37. Mohammadi, A. and Akl, S. G. , "Scheduling algorithms for real-time systems", Technical Report No. 2005-499, School of Computing, Queens University, Kingston, Ontario, Canada, 2005. 38. Kaur A.; Kinger S.,”A Survey of Resource Scheduling Algorithms in Green Computing”, (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 5 (4) , pp.4886-4890, 2014. 39. Lin, Ching-Chi; Pangfeng Liu and Jan-Jan Wu., "Energy-aware virtual machine dynamic provision and scheduling for cloud computing", 2011 IEEE International Conference on Cloud Computing (CLOUD), pp. 736-737, Washnighton , USA, 2011. 40. Yassein, M. O. B. and Khamayseh, Y. M., and Hatamleh, A. M., "Intelligent Randomize Round Robin for Cloud Computing", International Journal of Cloud Applications and Computing (IJCAC), Vol. 3(1), pp. 27-33, 2013. 41. Gokilavani, M.; S. Selvi and C. Udhayakumar., "A Survey on Resource Allocation and Task Scheduling Algorithms in Cloud Environment.”, International Journal of Engineering and Innovative Technology (IJEIT), Vol. 3(4), pp. 173-179, October 2013. 42. Ru, J. and Keung, J., "An Empirical investigation on the simulation of priority and shortest-job-first scheduling for cloud-based software systems", 2013 22nd Australian Software Engineering Conference (ASWEC), pp. 78-87, Melbourne, VIC, Australia. 2013. 43. Yeboah, Thomas; Odabi I. Odabi, and Kamal Kant Hiran, "An Integration of Round Robin with Shortest Job First Algorithm for Cloud Computing Environment", International Conference On Management, Communication and Technology (ICMCT), Vol. 3(1), pp. 1-5, 2015. 44. Parsa S.; Entezari-Maleki R., “ RASA: A New Grid Task Scheduling Algorithm”, International Journal of Digital Content Technology and its Applications”, Vol. 3(4), pp. 91-99, December 2009. 45. Elzeki O. M.; Reshad M. Z.; Elsoud M. A.,” Improved Max-Min Algorithm in Cloud Computing”, International Journal of Computer Applications, Vol.50 (12), pp.2227, July 2012. 46. SADHASIVAM, Sudha, et al. Design and implementation of an efficient two-level scheduler for cloud computing environment. In: Advances in Recent Technologies
102
References
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
in Communication and Computing, 2009. ARTCom'09. International Conference on. IEEE, 2009. p. 884-886 Rajput, I. S., & Gupta, D. (2012). A priority based round robin CPU scheduling algorithm for real time systems. International Journal of Innovations in Engineering and Technology, 1(3), 1-11. Jabbour, R., & Elhajj, I. H. (2008, July). SAF-PS: Starvation Avoidance for Priority Scheduling. In Systems, Signals and Devices, 2008. IEEE SSD 2008. 5th International Multi-Conference on (pp. 1-6). IEEE. Xue, D., & Ekici, E. (2012, October). On reducing delay and temporal starvation of queue-length-based CSMA algorithms. In Communication, Control, and Computing (Allerton), 2012 50th Annual Allerton Conference on (pp. 754-761). IEEE. Hausmans, J. P., Geuns, S. J., Wiggers, M. H., & Bekooij, M. J. (2014, June). Temporal analysis flow based on an enabling rate characterization for multi-rate applications executed on MPSoCs with non-starvation-free schedulers. In Proceedings of the 17th International Workshop on Software and Compilers for Embedded Systems (pp. 108-117). ACM. Hausmans, J. P., Wiggers, M. H., Geuns, S. J., & Bekooij, M. J. (2013, June). Dataflow analysis for multiprocessor systems with non-starvation-free schedulers. In Proceedings of the 16th International Workshop on Software and Compilers for Embedded Systems (pp. 13-22). ACM. Frijns, R. M. W., Adyanthaya, S., Stuijk, S., Voeten, J. P., Geilen, M. C., Schiffelers, R. R., & Corporaal, H. (2014, March). Timing analysis of first-come first-served scheduled interval-timed directed acyclic graphs. In Proceedings of the conference on Design, Automation & Test in Europe (p. 288). European Design and Automation Association. Kurdi, H., Aloboud, E., Alhassan, S., & Alotaibi, E. T. (2014). An Algorithm for Handling Starvation and Resource Rejection in Public Clouds. Procedia Computer Science, 34, 242-248. Aggarwal, H., Nagpal, S., ( June 2014). Augmented SJF algorithm with reduced starvation. International Journal of Advanced Research in Computer Science and Software Engineering. Volume 4, Issue 6, PP.718-723. June 2014 Wu, X., & Qian, P. (2013, April). Towards the Scheduling of Access Requests in Cloud Storage. In Computer Science & Education (ICCSE), 2013 8th International Conference on (pp. 37-41). IEEE. Li, J., Qiu, M., Niu, J. W., Chen, Y., & Ming, Z. (2010, November). Adaptive resource allocation for preemptable jobs in cloud systems. In Intelligent Systems Design and Applications (ISDA), 2010 10th International Conference on (pp. 3136). IEEE. Gupta, G., Kumawat, V. K., Laxmi, P. R., Singh, D., Jain, V., & Singh, R. (2014, August). A simulation of priority based earliest deadline first scheduling for cloud computing system. In Networks & Soft Computing (ICNSC), 2014 First International Conference on (pp. 35-39). IEEE. Santhosh, R., & Ravichandran, T. (2013, February). Pre-emptive scheduling of online real time services with task migration for cloud computing. In Pattern Recognition, Informatics and Mobile Engineering (PRIME), 2013 International Conference on (pp. 271-276). IEEE. Ghanbari, S., & Othman, M. (2012). A priority based job scheduling algorithm in cloud computing. Procedia Engineering, 50, 778-785.
103
References 60. He, X., Sun, X., & Von Laszewski, G. (2003). QoS guided min-min heuristic for grid task scheduling. Journal of Computer Science and Technology, 18(4), 442451. 61. Kumar, V. V., & Palaniswami, S. (2012). A Dynamic Resource Allocation Method for Parallel DataProcessing in Cloud Computing. Journal of computer science, 8(5), 780. 62. Shenai, Sudhir. "Survey on scheduling issues in cloud computing." Procedia Engineering 38 (2012): 2881-2888. 63. Luo, Liang, et al. "A resource scheduling algorithm of cloud computing based on energy efficient optimization methods." Green Computing Conference (IGCC), 2012 International. IEEE, 2012. 64. Lu, Xin, and Zilong Gu. "A load-adapative cloud resource scheduling model based on ant colony algorithm." Cloud Computing and Intelligence Systems (CCIS), 2011 IEEE International Conference on. IEEE, 2011. 65. Zheng, Z., Wang, R., Zhong, H., & Zhang, X. (2011, March). An approach for cloud resource scheduling based on Parallel Genetic Algorithm. In Computer Research and Development (ICCRD), 2011 3rd International Conference on (Vol. 2, pp. 444-447). IEEE 66. Huang, L., Chen, H. S., & Hu, T. T. (2013). Survey on Resource Allocation Policy and Job Scheduling Algorithms of Cloud Computing1. Journal of Software, 8(2), 480-487. 67. Bansal, S., Kothari, B., & Hota, C. (2011). Dynamic task-scheduling in grid computing using prioritized round robin algorithm. International Journal of Computer Science Issues(IJCSI), 8(2). 68. Yang, L., Pan, C., Zhang, E., & Liu, H. (2012). A new Class of Priority-based Weighted Fair Scheduling Algorithm. Physics Procedia, 33, 942-948. 69. Ghanbari, S., & Othman, M. (2012). A priority based job scheduling algorithm in cloud computing. Procedia Engineering, 50, 778-785. 70. Shah, S. N. M., Zakaria, M. N. B., Mahmood, A. K. B., Pal, A. J., & Haron, N. (2012). Agent Based Priority Heuristic for Job Scheduling on Computational Grids. Procedia Computer Science, 9, 479-488. 71. Abba, H. A., Zakaria, N., Shah, S. N. M., & Pal, A. J. (2012). Design, Development and Performance Analysis of Deadline Based Priority Heuristic for Job Scheduling on a Grid. Procedia Engineering, 50, 397-405. 72. Chtourou, H., & Haouari, M. (2008). A two-stage-priority-rule-based algorithm for robust resource-constrained project scheduling. Computers & Industrial Engineering, 55(1), 183-194. 73. Calheiros, R. N., Ranjan, R., Beloglazov, A., De Rose, C. A., & Buyya, R. (2011). CloudSim: a toolkit for modeling and simulation of cloud computing environments and evaluation of resource provisioning algorithms. Software: Practice and Experience, 41(1), 23-50. 74. Calheiros, R. N., Ranjan, R., De Rose, C. A., & Buyya, R. (2009). Cloudsim: A novel framework for modeling and simulation of cloud computing infrastructures and services. arXiv preprint arXiv:0903.2525. 75. Buyya, R., Ranjan, R., & Calheiros, R. N. (2009, June). Modeling and simulation of scalable Cloud computing environments and the CloudSim toolkit: Challenges and opportunities. In High Performance Computing & Simulation, 2009. HPCS'09. International Conference on (pp. 1-11). IEEE 76. http://www.cloudbus.org/cloudsim/ [accessed at : 5/11/2015]
104
References 77. Noon, A., Kalakech, A., & Kadry, S. (2011). A new round robin based scheduling algorithm for operating systems: dynamic quantum using the mean average. arXiv preprint arXiv:1111.5348. 78. Nayak, D., Malla, S. K., & Debadarshini, D. (2012). Improved round robin scheduling using dynamic time quantum. International Journal of Computer Applications (0975–8887) Volume. 79. Negi, S. (2013). An Improved Round Robin Approach using dynamic time quantum for improving average waiting time. International Journal of Computer Applications, 69(14), 12-16.
105
ملخص الرسالة
ملخص الرسالة الحوسبة السحابية ظهرت كبديل للحوسبة التقليدية األجهزة المادية في مجال الحوسبة المتوازية والموزعة .تتكون السحابة من مجموعة من الموارد االفتراضية التي يمكن توفيرها عند الطلب، اعتمادا على احتياجات المستخدمين .تواجه الحوسبة السحابية كمية كبيرة من مجموعات المستخدمين، فضال عن كمية من المهام والبيانات الضخمة ،وبالتالي فإن معالجة أيضا مهم جدا .جدولة المهام بكفاءة أصبح مشكلة هامة يتعين حلها في مجال الحوسبة
السحابية.
كل على مر السنين ،كانت جدولة المهام منطقة بحثية رئيسية في بيئات مختلفة بدءا من معالج واحد، مرورا المعالجات وتنتهي مع الحوسبة السحابية .الحوسبة السحابية هي نموذج لتمكين الوصول إلى الشبكة في كل مكان إلى مجموعة مشتركة من موارد الحوسبة حيث يجب أن يتم التحقق من الموارد المتاحة وجدولتها باستخدام مجدوالت المهام المختلفة وتقديمها إلى العمالء .لم معظم المنظمون مهمة موجودة ال يحقق المعايير والمتطلبات المطلوبة. في هذه الرسالة ،نقترح خوارزمية جدولة المهام الهجين المسمى ( )SRDQعلى أساس كل من خوارزمية ( (shortest-job-firstو خوارزمية ( )round robinوجعل الـ quantumيتغير بصورة ديناميكية ,في البداية يتم ترتيب المهام في الطابور حسب خورزمية ( )SJFثم يتم تقسيم الطابور إلى طابورين فرعيين ،Q1 ،و . Q2إسناد المهام إلى الموارد من Q1أو Q2تتم بشكل متبادل مهمتين من Q1ومهمة واحدة من .Q1تم تنفيذ الخوارزمية المقترحة في اثنين من بيئات مختلفة C#و CloudSimحيث أثبتت نتائج التجارب واالختبارات ان الخوارزمية المقترحة قد حسنت متوسط وقت االنتظار واالستجابة ،وكذلك جزئيا خفض مجاعة اكثر من الخوارزميات المعروفة. الرسالة مكونة من خمسة فصول محتوياتها موضحة على النحو التالي-: • الفصل االول :ويشتمل هذا الفصل على لمحة عامة عن المفاهيم المتعلقة بالحوسبة السحابية والجدولة في الحوسبة السحابية
والهدف من العمل و الدوافع التي تؤدي إلى هذا البحث .كما يصف محتويات
الرسالة . الفصل الثاني :يعطي خلفية أولية لمعرفة مفهوم الحوسبة السحابية من حيث معماريتها والخدمات التي تقدمها وخصائصها وبعض التحديات التي تواجهها كما تضمن هذا الفصل نظرة عامة على جدولة المهام في الحوسبة السحابية ,ومميزاتها ،اهدافها,مباديئها ومن ثم عملية الجدولة في الحوسبة السحابية و ومعايير الجدولة بعدها نقدم خوارزميات جدولة المهام في مجال الحوسبة السحابية و مع شرح لبعض الخوارزميات الموجودة واخيرا ينهي هذا الفصل بسرد بعض الدراسات السابقة واألبحاث التي أجريت حتى اآلن على عملية الجدولة في بيئة الحوسبة السحابية ذات الصلة بموضوع الرسالة .
106
ملخص الرسالة
الفصل الثالث :يصف بالتفصيل النموذج المقترح معززة باألمثلة .وكذلك يتم توضيح المعايير المستخدمة في تقييم اداء النموذج المقترحز يتم اختبار النتائج باستخدام cloudSimو .c# الفصل الرابع :يعرض هذا الفصل النتائج التجريبية التى أجريت على النموذج المقترح و تحليل هذه النتائج و مدى فاعلية إستخدامه.ويقارن هذه النتائج بنتائج التقنيات االخرى الموجودة في الدراسات السابقة
الفصل الخامس :يقدم ملخص عام للرسالة و اإلستنتاجات التى خلص اليها البحث و أهم التوصيات التى يراها الباحث ضرورية لزيادة كفاءة النظام المقترح.
107
كليــــــة الحاسبات والمعلومات جامعـــــــة المنصــــــورة المنصورة -مصر 2015
تحسين جدولة المهام في الحوسبة السحابية رسالة مقدمة من قسم علوم الحاسب-كلية الحاسبات والمعلومات جامعة المنصورة للحصول على درجة الماجستير في علوم الحاسب
مقدمة من
منار جندي هزار معيدة في وزارة التعليم العالي والبحث العلمي جامعة القادسية -العراق
تحـــت إشــــــــــراف
أ.د /.سمـــير الدسوقي المــوجي أستاذ علوم الحاسب المساعد ورئيس قسم علوم الحاسب كلية الحاسبات والمعلومات جامعة المنصورة
د / .شاهندة صالح الدين سرحان مدرس في قسم علوم الحاسب كلية الحاسبات والمعلومات جامعة المنصورة المنصورة -مصر 1436هـ 2015 -م