CSE 487 Lecture-No.4 (Summer 2021) - Task Scheduling
CSE 487 Lecture-No.4 (Summer 2021) - Task Scheduling
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
• 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
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}.
• 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
VM1={t4⟶t6⟶t7}.
VM2={t10⟶t9⟶t1}.
VM3=t11⟶t13⟶t8.
VM4=t5⟶t14.
VM5=t12⟶t2.
VM6={t3⟶t15}
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.