0% found this document useful (0 votes)
5 views27 pages

CSE 487 Lecture-No.4 (Summer 2021) - Task Scheduling

The document outlines a course on Task Scheduling in Cloud Computing, detailing various scheduling algorithms such as First Come First Service (FCFS), Short Job First (SJF), and MAX-MIN. It emphasizes the importance of efficient task scheduling for optimizing resource utilization and performance in cloud environments. Additionally, it discusses the classification of scheduling algorithms and their advantages and disadvantages.

Uploaded by

Sourav Mondal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views27 pages

CSE 487 Lecture-No.4 (Summer 2021) - Task Scheduling

The document outlines a course on Task Scheduling in Cloud Computing, detailing various scheduling algorithms such as First Come First Service (FCFS), Short Job First (SJF), and MAX-MIN. It emphasizes the importance of efficient task scheduling for optimizing resource utilization and performance in cloud environments. Additionally, it discusses the classification of scheduling algorithms and their advantages and disadvantages.

Uploaded by

Sourav Mondal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Cloud Computing CSE 487

- Task Scheduling in Cloud -

Prof. Dr. A.K.M. Muzahidul Islam


Computer Science & Engineering (CSE)
United International University (UIU)

Summer 2021
Course Outline: Summary
1. Introduction to Cloud Computing
2. Cloud Infrastructure
3. Cloud Application
4. Virtualization
5. Task Scheduling / Resource Allocation
Algorithms for Cloud Computing
6. Cloud Security
7. Cloud IoT / Cloud of Things / Cloud storage for
resource constrained devices
8. Kubernetes (?)
Overview
• Introduction to Task Scheduling in Cloud
• Classification of Task Scheduling
Algorithm
• Static Task Scheduling Algorithm
• First Come First Service (FCFS)
• Short Job First (SJF)
• MAX-MIN
Introduction
• Cloud computing allows users (individuals and organizations)
to access computing resources (software, hardware, and
platform) as services remotely through the Internet.
• It has the ability to meet all users requests with high
performance and guarantee of quality of service (QoS).
• High performance can be provided by a cloud computing, based
on distributing workloads across all resources fairly and
effectively to get less waiting time, execution time, maximum
throughput, and exploitation of resources effectively.
• Therefore, we need to implement an appropriate task
scheduling algorithm to fairly and efficiently meet these
requests as cloud performance depends mainly on it.
Task Scheduling Overview
• Tasks scheduling algorithms are defined as the mechanism used to
select the resources to execute tasks
• to get less waiting and execution time.
• Tasks scheduling algorithms control
• the performance criteria such as (execution time, response time,
waiting time, network, bandwidth, services cost) for all tasks and
• the other factors that can affect performance
• power consumption, availability, scalability, storage capacity,
buffer capacity, disk capacity, and number of users.
• In the cloud computing environment there are 02 levels of scheduling
algorithms:
• First level: in host level where a set of policies to distribute VMs in
host.
• Second level: in VM level where a set of policies to distribute tasks to
VM.
Task Scheduling Algorithm
Definition:
• Tasks scheduling algorithms are defined as a set of rules and policies used
to assign tasks to the suitable resources
• e.g. CPU, memory, and bandwidth
• to get the highest level possible of performance and resources
utilization.
Task scheduling algorithms advantages:
• Manage cloud computing performance and QoS.
• Manage the memory and CPU.
• The good scheduling algorithms maximizing resources utilization while
minimizing the total task execution time.
• Improving fairness for all tasks.
• Increasing the number of successfully completed tasks.
• Scheduling tasks on a real-time system.
• Achieving a high system throughput.
• Improving load balance.
Task Scheduling Algorithm Classification

Tasks scheduling algorithms can be classified as follows:


• Immediate scheduling:
• when new tasks arrive, they are scheduled to VMs directly.
• Batch scheduling:
• tasks are grouped into a batch before being sent; this type is also called
mapping events.
• Preemptive scheduling:
• each task is interrupted during execution and can be moved to another
resource to complete execution.
• Non-preemptive scheduling:
• VMs are not re-allocated to new tasks until finishing execution of the
scheduled task.
Task Scheduling Algorithm
Classification (Cont’d)
• Static scheduling:
• Considered as very simple compared to dynamic scheduling;
• It is based on prior information of the global state of the system.
• It does not take into account the current state of VMs
• It divides all traffic equivalently among all VMs in a similar
manner e.g.
• Round robin (RR) and
• Random scheduling algorithms.

• Dynamic scheduling:
• Takes into account the current state of VMs
• Does not require prior information of the global state of the system
and
• Distributes the tasks according to the capacity of all available VMs.
Task Scheduling System

The task scheduling system in cloud computing passes through 03


levels:
• The 1st task level (Step 1):
• is a set of tasks (Cloudlets) that is sent by cloud users,
which are required for execution.
• The 2nd scheduling level (Step 2):
• is responsible for mapping tasks to suitable resources to get
highest resource utilization with minimum makespan.
• The makespan is the overall completion time for all tasks
from the beginning to the end.
• The 3rd VMs level (Step 3):
• is a set of (VMs) which are used to execute the tasks.
Task Scheduling System (Cont’d)

This level passes through two steps:


• The first step:
• is discovering and filtering all the VMs that are presented in
the system and collecting status information related to them
by using a datacenter broker.
• In the second step:
• a suitable VM is selected based on task properties.
Static Task Scheduling Algorithms
• First Come First Service (FCFS)
• Short Job First (SJF)
• MAX-MIN
First Come First Service (FCFS)
• In FCFS, the order of tasks in task list is based on their arriving
time then assigned to VMs.
Advantages
• Most popular and simplest scheduling algorithm.
• Fairer than other simple scheduling algorithms.
• Depend on FIFO rule in scheduling task.
• Less complexity than other scheduling algorithms.
Disadvantages
• Tasks have high waiting time.
• Not give any priority to tasks i.e. if we have large tasks in the
begin tasks list, all tasks must wait a long time until the large
tasks to finish.
• Resources are not consumed in an optimal manner.
First Come First Service (FCFS):
Assumptions

Some of the assumptions must be taken into account when


scheduling tasks to VMs in the cloud computing environment.
• No. of tasks should be more than the No. of VMs,
• i.e. each VM must execute more than one task.
• Each task is assigned to only one VM resource.
• Lengths of tasks varying from small, medium, and large.
• Tasks are not interrupted once their executions start.
• VMs are independent in terms of resources and control.
• The available VMs are of exclusive usage and cannot be shared among
different tasks.
• i.e. VMs cannot consider other tasks until the completion of the current
tasks is in progress.
First Come First
Service (FCFS):
Tasks lengths:
Assume we have 15 tasks with their
lengths as in the Table 1.

VM properties
Assume we have 06 VMs with different
properties based on tasks size:
VMlist={VM1,VM2,VM3,VM4,VM5,VM6}.
MIPS of VMlist={500,500,1500,1500,2500,2500}.

We selected a set of VMs with different properties to


make each category have VMs with appropriate
ability to serve a specific class of tasks, to improve
the load balance.
Because when we use VMs with same properties with
all categories it leads to load imbalance, where each
class is different from other classes in terms of tasks
Table 1. Set of tasks with different length orders lengths.
depends on the arrival time for each task.
FCFS(Cont’d)

Figure : FCFS work mechanism.

When applying FCFS, work mechanism will be as following:

• Figure shows FCFS tasks scheduling algorithm working mechanism and how
tasks are executed based on their arrival time.
• Dot arrows refer to first set of tasks scheduling based on their arrival time.
• Dash arrows refer to second set of tasks scheduling based on their arrival
time.
• Solid arrows refer to third set of tasks scheduling based on their arrival time.
FCFS(Cont’d)
It is clear to us that
• t1 is too large
• compared with t7 and t12.
However,
• t7 and t12 must wait for t1,
• which leads to an increase
in the TWT, ET, TFT, and
a decrease in fairness.
VM1={t1⟶t7⟶t12}.
VM2={t2⟶t8⟶t14}.
VM3={t3⟶t9⟶t15}.
VM4={t4⟶t10}.
VM5=t5⟶t11.
Table 2: Shows how FCFS scheduling algorithm
VM6={t6⟶t13}. increases waiting time for all tasks.
Short Job First (SJF)
• Tasks are sorted based on their priority.
• Priority is given to tasks based on tasks lengths and begins from
(smallest task ≡ highest priority).
Advantages
• Wait time is lower than FCFS.
• SJF has minimum average waiting time among all tasks
scheduling algorithms.
Disadvantages
• Unfairness to some tasks when tasks are assigned to VM, due to
the long tasks tending to be left waiting in the task list
• while small tasks are assigned to VM.
• Taking long execution time and TFT.
Short Job First (SJF)
SJF work mechanism

When applying SJF, work mechanism will be as follows:


• Assume we have 15 tasks as in Table 1 (shown below).
• We will be sorting tasks in the task list, as in Table 3.
• Tasks are sorted from smallest task to largest task based on
their lengths as in Table 3, then assigned to VMs list sequential.

Table 3: A set of tasks sorted based on SJF scheduling algorithm.


SJF (Cont’d)

Execute tasks will be

VM1={t4⟶t6⟶t7}.
VM2={t10⟶t9⟶t1}.
VM3=t11⟶t13⟶t8.
VM4=t5⟶t14.
VM5=t12⟶t2.
VM6={t3⟶t15}

Table 4: shows that the large tasks must be waiting in


the task list until the smallest tasks finish execution.
MAX-MIN

• Tasks are sorted based on the completion time of tasks;


• Long tasks that take more completion time have the highest
priority.
• Then assigned to the VM with minimum overall execution time
in VMs list.
Advantages
• Working to exploit the available resources in an efficient manner.
• This algorithm has better performance than the FCFS, SJF, and MIN-MIN
algorithm.

Disadvantages
• Increase waiting time to small and medium tasks; if we have six long tasks, in
MAX-MIN scheduling algorithm they will take priority in six VMs in VM
list, and short tasks must be waiting until the large tasks finish.
MAX-MIN (Cont’d)
Unfairness to some or most small and medium tasks when tasks
are assigned to VM.

When applying MAX-MIN, Work Mechanism will be as follows.


• Assume we have 15 tasks as in Table 1 above.
We will be sorting tasks in task list as in Table 5.
• Tasks sorted from largest task to smallest task based on highest
completion time.
• They are then assigned to the VMs with minimum overall
execution time in VMs list.

Table 5. A set of tasks sorted based on MAX-MIN scheduling algorithm.


MAX-MIN (Cont’d)

Execute tasks will be


VM6={t1⟶t13⟶t11}.
VM5={t8⟶t9⟶t10}.
VM4={t7⟶t6⟶t4}.
VM3=t15⟶t3.
VM2={t2⟶t12}.
VM1={t14⟶t5}.

Tables 6 and Table 7 show


Table 6: Waiting time of tasks in MIX-MIN
that the small and medium
tasks must be waiting in the scheduling algorithm.
task list until the large tasks
finish execution.

Table 7. Comparison between FCFS tasks scheduling algorithm,


SJF, and MAX-MIN in terms of TWT and TFT.
Thank You
References
• https://www.intechopen.com/books/scheduling-problems-
new-applications-and-trends/types-of-task-scheduling-
algorithms-in-cloud-computing-environment

You might also like