gridsim
Class GridResource

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--eduni.simjava.Sim_entity
              |
              +--gridsim.GridSim
                    |
                    +--gridsim.GridResource
All Implemented Interfaces:
java.lang.Runnable

public class GridResource
extends GridSim

It is a Resource Entity, which simulates time and space share machines. The Resource can be a single CPU machines, SMP, or cluster.


Nested Class Summary
(package private)  class GridResource.MIShares
           
 
Field Summary
 
Fields inherited from class gridsim.GridSim
input, output, rand, SimulationStartDate
 
Fields inherited from class eduni.simjava.Sim_entity
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
GridResource(java.lang.String name, double baud_rate, long seed, gridsim.ResourceCharacteristics resource, double peakLoad, double offpeakLoad, double relativeHolidayLoad, java.util.LinkedList weekends, java.util.LinkedList holydays)
           
 
Method Summary
 void body()
           
 void SpaceShare_AllocatePEtoGridlet(gridsim.Gridlet gl)
          It allocate one of the PEs to Gridlet for execution and scheduling an internal event to be delivered at completion time.
 
Methods inherited from class gridsim.GridSim
Clock, finalize, GetEntityId, GetEntityName, GetEntityName, GetGridResourceList, GetResourceCharacteristics, GetResourceDynamicInformation, GetSimulationStartDate, GridInformationServiceEntityId, GridletCancel, GridletReceive, GridletSubmit, GridSimHold, GridSimShutdownEntityId, GridStatisticsEntityId, Init, IsNetworked, ReceiveEventObject, ReceiveEventObject, RecordStatistics, RecordStatistics, RecordStatistics, RecordStatistics, Send, Send, Send, Send, Send, Send, ShutdownGridStatisticsEntity, ShutdownUserEntity, Start, Stop, TerminateInputOutputEntities
 
Methods inherited from class eduni.simjava.Sim_entity
add_param, add_port, get_id, get_name, get_port, get_port, run, send_on, set_invisible, sim_cancel, sim_current, sim_get_next, sim_get_next, sim_hold_for, sim_hold, sim_putback, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_select, sim_trace, sim_wait_for, sim_wait, sim_waiting, sim_waiting
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridResource

public GridResource(java.lang.String name,
                    double baud_rate,
                    long seed,
                    gridsim.ResourceCharacteristics resource,
                    double peakLoad,
                    double offpeakLoad,
                    double relativeHolidayLoad,
                    java.util.LinkedList weekends,
                    java.util.LinkedList holydays)
Method Detail

body

public void body()
Overrides:
body in class eduni.simjava.Sim_entity

SpaceShare_AllocatePEtoGridlet

public void SpaceShare_AllocatePEtoGridlet(gridsim.Gridlet gl)
It allocate one of the PEs to Gridlet for execution and scheduling an internal event to be delivered at completion time.

Parameters:
gl - A Gridlet to be processed. ACTIONS: 1. Identify Unallocated PEs 2. If some free PEs available, map gridlet to aavialble PE a. Total Execution Time = [GridletMI/(PE's MPIS Rating)]+IO Time b. Set an Event to be se sent after Total_Execution_Time indicating completion of Gridlet Else, Place Gridlet into "Job Queue".