lab 1-2 distributed computing
TRANSCRIPT
-
8/10/2019 Lab 1-2 Distributed Computing
1/33
Lecture : 1-2
GridSim Toolkit:
Modeling and Simulation of GlobalGrids
Instructor: Anum Masood
1
-
8/10/2019 Lab 1-2 Distributed Computing
2/33
2
Contents
Motivation
System Architecture
GridSim Entities
Visual Modeller
Advanced Reservation
-
8/10/2019 Lab 1-2 Distributed Computing
3/33
3
Performance Evaluation:
With Large Scenarios
Varying the number of Resources (1 to 100s..1000s..).
Resource capability.
Cost (Access Price).
Users.
Deadline and Budget.
Workload.
Different Time (Peak and Off-Peak).
We need a repeatable and controllable environment.
Can this be achieved on Real Grid testbed ?
-
8/10/2019 Lab 1-2 Distributed Computing
4/33
4
Grid Environment
Dynamic:
1. Resource and User Properties vary with time.
Experiment cannot be repeated.
2. Resources are distributed and owned by differentorganisations. Heterogeneous users.
It is hard to create a controllable environment.
Grid testbed size is limited. Also, creating testbed infrastructure is time
consuming and expensive.
Hence, grid computing researchers turn to modelling
and simulation.
-
8/10/2019 Lab 1-2 Distributed Computing
5/33
5
GridSim Toolkit
GridSim 1.0 released in Dec. 2001 GridSim and GridBroker.
GridSim 2.0 released in Nov. 2002
Improvements in GridSim and GridBroker. Add Visual Modeler.
GridSim 5.2 released recently.
Few functionalities of GridSim:
Allows modelling of heterogeneous of resources & users.
Supports simulation of both static & dynamic schedulers.
Simulates applications with different parallel models.
-
8/10/2019 Lab 1-2 Distributed Computing
6/33
6
System Architecture
Basic Discrete Event Simulation Infrastructure
Virtual Machine (Java, cJVM, RMI)
PCs ClustersWorkstations
. . .
SMPs Distributed Resources
GridSim Toolki t
Application
Modeling
Information
Services
Resource
Allocation
Grid Resource Brokers or Schedulers
Statistics
Resource Modeling and Simulation (with Time and Space shared schedulers)
Job
Management
ClustersSingle CPU ReservationSMPs Load Pattern
Application
Configuration
Resource
Configuration
Visual
Modeler
Grid
Scenario
Network
SimJava Distributed SimJava
Resource
Entities
Output
Appl ication, User, Grid Scenario s Input and Results
-
8/10/2019 Lab 1-2 Distributed Computing
7/33
7
GridSim Entities
JobsAppli
cation
Scheduler
User #i Broker #i Output
Input
Output
Input
Resource #j
Job In Queue
Job Out QueueProcess
Queue
Resource
List
InformationService
Internet
InputOutput
-
8/10/2019 Lab 1-2 Distributed Computing
8/33
8
GridSim Entities Relationship
GridSimGridInformationService
GridResource
Resource Characteristics
Broker
communication
registration
message
passing
-
8/10/2019 Lab 1-2 Distributed Computing
9/33
9
GridSim Resource Extensibility
GridResource
AllocPolicy
TimeSharedSpaceShared ARPolicy
ARSpaceShared
GridSim
Advance Reservation (AR)
New architecture allows flexibility to add new scheduling
policies for AR and non-AR resources.
. . .
. . .
-
8/10/2019 Lab 1-2 Distributed Computing
10/33
10
EA
Output_EA
Input_EA
EB
Output_EB
Input_EB
body()
Send(output, data, EB)
body()
body()
body()
body()
body()
Receive(input, data, EA)
Timed Event Delivery
data, t2
GridSim Entities Communication Model
-
8/10/2019 Lab 1-2 Distributed Computing
11/33
11
Time Shared: Multitasking and
Multiprocessing
PE1
PE2
G1
G2
G3
G1
G2G2
G2
G3 G3
P1-G2P1-G1 P3-G2 P1-G3P2-G3
TimeG1
G1: Gridlet1 Arrives
G1FG3
G1F: Gridlet1 Finishes
G2 G2F G3F
Gridlet1 (10 MIs)
Gridlet2 (8.5 MIs)
Gridlet3 (9.5 MIs) P2-G2: Gridlet2 finishes at the 2ndprediction time.
P1-G2: Gridlet2 didnt finish at the 1stprediction time.
Tasks on
PEs/CPUs
2 6 9 12 16 19 2622
P2-G2
-
8/10/2019 Lab 1-2 Distributed Computing
12/33
12
Space Shared: Multicomputing
G1
G2
G3
G1 G3
G2 G3
P1-G1 P1-G2 P1-G3
TimeG1
G1: Gridlet1 Arrives
G1FG3
G1F: Gridlet1 Finishes
G2 G2F G3F
Gridlet1 (10 MIs)
Gridlet2 (8.5 MIs)
Gridlet3 (9.5 MIs)
P1-G2: Gridlet2 finishes as per the 1st Predication
Tasks on
PEs/CPUs
2 6 9 12 16 19 2622
PE1
PE2
-
8/10/2019 Lab 1-2 Distributed Computing
13/33
13
Visual Modeler
Available in GridSim 2.0
Functionalities:
Create and delete many users and resources.
Able to save and load the model file (XML format).
Generate Java source code.
-
8/10/2019 Lab 1-2 Distributed Computing
14/33
-
8/10/2019 Lab 1-2 Distributed Computing
15/33
15
View User Property Dialog
-
8/10/2019 Lab 1-2 Distributed Computing
16/33
16
View Resource Property Dialog
-
8/10/2019 Lab 1-2 Distributed Computing
17/33
17
GridSim with AR capability
GridSim 3.0 has the framework to handle:
1. Creation of a new reservation
2. Commitment of a new resevation3. Activation of a reservation once it is started
4. Modification of an existing reservation
5. Cancellation of an existing reservation
6. Query of an existing reservation
-
8/10/2019 Lab 1-2 Distributed Computing
18/33
18
State Transition Diagram for AR
Request
Rejected Accepted
Change
RequestCommitted
CancelledActive
Completed Terminated
Request Accepted
Request Rejected
Commit Expired
Cancellation
Request
Change Specification
Change Accepted / Rejected
Finish Time
Start Time
TerminationRequest
Commit Accepted
-
8/10/2019 Lab 1-2 Distributed Computing
19/33
19
1. Create a New Reservation
Required information:1. Start time
2. Duration time or Finish time
3. Number of Processing Elements (PEs)
4. Designated resource id
If successful: returns booking id
(resID_reservID) e.g. 8_1 & expiry time If not successful: returns approx. busy time
interval (1, 5, 15, 30, 45 seconds or minutes)
-
8/10/2019 Lab 1-2 Distributed Computing
20/33
20
Steps of making a reservation
Create a
Request
Request Result
Send to
Resource
Generate
Reservation
Booking ID
Check for
conflicts
ReceiveRequest
NO
YES
Add to List
User or Broker AllocPolicy
-
8/10/2019 Lab 1-2 Distributed Computing
21/33
21
Finding Empty Slots
If (reservation list is empty) then acceptreservation & put into the list
Else
1. Find the begin and end interval in the list2. Find the exact slot for a new reservation
3. Find empty slot
1. Remove redundant reservations2. Calculate total PE used during the interval
-
8/10/2019 Lab 1-2 Distributed Computing
22/33
22
2. Commit a Reservation
If a request for reservation has beensuccessful, then need to commit or to
confirm it before an expiry time
When committing a reservation, need tosubmit:
1. Booking ID
2. Job or a list of jobs
-
8/10/2019 Lab 1-2 Distributed Computing
23/33
23
3. Activation of a Reservation
Once a reservation has committed:Put the job(s) into a queue list
Set the timer
Send event to itself
Once the time is up: If PEs are full, then:
Remove unreserved jobs
Remove reserved jobs that run longer than duration
Look through the queue list and move intoexecution list
-
8/10/2019 Lab 1-2 Distributed Computing
24/33
24
4. Modification of a Reservation
Required information:1. Start time
2. Duration time or Finish time
3. Number of Processing Elements (PEs)
4. Booking ID
At the moment, only able to reduce
reservation Important: If modification fails, the original
reservation must not be lost.
-
8/10/2019 Lab 1-2 Distributed Computing
25/33
25
5. Cancellation of a Reservation
Required information:
Booking ID
Resource ID
Cancellation issues:
Before a reservation has been committed
Before a reservation has been activatedDuring an active
After a reservation has been finished
-
8/10/2019 Lab 1-2 Distributed Computing
26/33
26
6. Query of a Reservation
Required information:Booking ID
Resource ID
Status:NOT_STARTED
ACTIVE
FINISHEDCANCELED
EXPIRED
-
8/10/2019 Lab 1-2 Distributed Computing
27/33
27
GridSim Advanced Networking
-
8/10/2019 Lab 1-2 Distributed Computing
28/33
28
GrangeNet and Grid Modelling
-
8/10/2019 Lab 1-2 Distributed Computing
29/33
-
8/10/2019 Lab 1-2 Distributed Computing
30/33
-
8/10/2019 Lab 1-2 Distributed Computing
31/33
31
Selected GridSim Users
-
8/10/2019 Lab 1-2 Distributed Computing
32/33
32
Conclusion
GridSim toolkit is suitable for application
scheduling simulations in Grid computing
environment.
GridSim is available to download:
www.gridbus.org
http://www.gridbus.org/http://www.gridbus.org/ -
8/10/2019 Lab 1-2 Distributed Computing
33/33
Questions
33