public class PS<J extends SimJob,Q extends PS> extends AbstractEgalitarianProcessorSharingSimQueue<J,Q>
PS queue serves all jobs simultaneously, equally distributing its service capacity.
Processor Sharing.
The (Egalitarian) Processor-Sharing queueing system distributes its service capacity equally among the jobs in execution. Jobs start immediately upon arrival, provided that there are server-access credits left. Upon regaining server-access credits, jobs are started in arrival order.
Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
AbstractSimEntity.Notifier, AbstractSimEntity.PreNotificationHookSimQueue.AutoRevocationPolicySimEntity.Action, SimEntity.UnknownNotificationTypePolicy, SimEntity.UnknownOperationPolicyvirtualDepartureTimeeventsScheduled, SANITYUSE_ARRAY_OPTIMIZATION| Constructor and Description |
|---|
PS(org.javades.jsimulation.r5.SimEventList eventList)
Creates a single-server PS queue with infinite buffer size given an event list.
|
| Modifier and Type | Method and Description |
|---|---|
PS<J,Q> |
getCopySimQueue()
Returns a new
PS object on the same SimEventList. |
Object |
getQoS()
Calls super method (in order to make implementation final).
|
Class |
getQoSClass()
Calls super method (in order to make implementation final).
|
protected void |
insertJobInQueueUponArrival(J job,
double time)
Does nothing, and makes that final.
|
boolean |
isStartArmed()
Returns
true. |
protected void |
removeJobFromQueueUponDrop(J job,
double time)
Throws
IllegalStateException. |
protected void |
removeJobFromQueueUponRevokation(J job,
double time,
boolean auto)
Removes the jobs from the internal data structures.
|
protected void |
rescheduleAfterArrival(J job,
double time)
Starts the arrived job if server-access credits are available.
|
protected void |
rescheduleAfterDeparture(J departedJob,
double time)
Calls super method (in order to make implementation final).
|
protected void |
rescheduleAfterDrop(J job,
double time)
Throws
IllegalStateException. |
protected void |
rescheduleAfterRevokation(J job,
double time,
boolean auto)
|
protected void |
rescheduleForNewServerAccessCredits(double time)
Starts jobs in arrival order as long as there are server-access credits and jobs waiting.
|
protected void |
resetEntitySubClass()
Calls super method (in order to make implementation final).
|
protected void |
setServerAccessCreditsSubClass()
Calls super method (in order to make implementation final).
|
String |
toStringDefault()
Returns "PS".
|
getServiceTimeForJob, getVirtualTime, insertJobInQueueUponStart, removeJobFromQueueUponDeparture, rescheduleAfterStart, rescheduleDepartureEvent, updateVirtualTimequeueAccessVacationDropSubClassgetBufferSize, getNumberOfServersarrive, autoRevoke, cancelDepartureEvent, cancelDepartureEvent, depart, departureFromEventList, drop, getAutoRevocationPolicy, getDepartureEvents, getDepartureEvents, getFirstJob, getFirstJobInServiceArea, getFirstJobInWaitingArea, getJobs, getJobsInServiceArea, getJobsInWaitingArea, getNumberOfJobs, getNumberOfJobsInServiceArea, getNumberOfJobsInWaitingArea, getServerAccessCredits, hasJobs, hasJobsInServiceArea, hasJobsInWaitingArea, hasServerAcccessCredits, isJob, isJobInServiceArea, isJobInWaitingArea, isQueueAccessVacation, registerStdOutSimQueueListener, revoke, revoke, scheduleDepartureEvent, scheduleJobArrival, setAutoRevocationPolicy, setQueueAccessVacation, setServerAccessCredits, start, takeServerAccessCredit, triggerPotentialNewStartArmed, unregisterStdOutSimQueueListeneraddPendingNotification, addPendingNotification, clearAndUnlockPendingNotificationsIfLocked, delegateOperation, doAfterNotifications, doOperation, fireAndLockPendingNotifications, getEventList, getLastUpdateTime, getRegisteredDelegatedOperations, getRegisteredNotificationTypes, getRegisteredOperations, getSimEntityListeners, getUnknownNotificationTypePolicy, getUnknownOperationPolicy, isIgnoreEventListReset, notifyEventListReset, registerDelegatedOperation, registerNotificationType, registerOperation, registerPreEventHook, registerPreNotificationHook, registerPreUpdateHook, registerSimEntityListener, registerStdOutSimEntityListener, removeDelegationForOperation, resetEntity, setIgnoreEventListReset, setName, setUnknownNotificationTypePolicy, setUnknownOperationPolicy, toString, unregisterSimEntityListener, unregisterStdOutSimEntityListener, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitarrive, getAutoRevocationPolicy, getJobs, getJobsInServiceArea, getJobsInWaitingArea, getNumberOfJobs, getNumberOfJobsInServiceArea, getNumberOfJobsInWaitingArea, getServerAccessCredits, isJob, isJobInServiceArea, isJobInWaitingArea, isQueueAccessVacation, revoke, revoke, setAutoRevocationPolicy, setQueueAccessVacation, setServerAccessCreditsdoAfterNotifications, doOperation, getEventList, getLastUpdateTime, getRegisteredNotificationTypes, getRegisteredOperations, getSimEntityListeners, getUnknownNotificationTypePolicy, getUnknownOperationPolicy, isIgnoreEventListReset, registerSimEntityListener, resetEntity, setIgnoreEventListReset, setName, setUnknownNotificationTypePolicy, setUnknownOperationPolicy, unregisterSimEntityListener, updatepublic PS(org.javades.jsimulation.r5.SimEventList eventList)
eventList - The event list to use.public PS<J,Q> getCopySimQueue()
PS object on the same SimEventList.PS object on the same SimEventList.AbstractSimEntity.getEventList()public String toStringDefault()
toStringDefault in interface SimEntitytoStringDefault in class AbstractSimQueue<J extends SimJob,Q extends PS>SimEntity.setName(java.lang.String),
Object.toString()public final Class getQoSClass()
null.public final Object getQoS()
null.protected final void resetEntitySubClass()
resetEntitySubClass in class AbstractEgalitarianProcessorSharingSimQueue<J extends SimJob,Q extends PS>SimEntity.resetEntity()protected final void insertJobInQueueUponArrival(J job, double time)
insertJobInQueueUponArrival in class AbstractSimQueue<J extends SimJob,Q extends PS>job - The job that arrived.time - The current time (i.e., arrival time of the job).AbstractSimQueue.arrive(double, J)protected final void rescheduleAfterArrival(J job, double time)
rescheduleAfterArrival in class AbstractSimQueue<J extends SimJob,Q extends PS>job - The job that arrived (and is already present in AbstractSimQueue.getJobs()).time - The current time (i.e., the arrival time of the job).AbstractSimQueue.hasServerAcccessCredits(),
AbstractSimQueue.start(double, J),
insertJobInQueueUponArrival(J, double)protected final void removeJobFromQueueUponDrop(J job, double time)
IllegalStateException.removeJobFromQueueUponDrop in class AbstractSimQueue<J extends SimJob,Q extends PS>job - The job that is to be dropped.time - The current time (i.e., drop time of the job).IllegalStateException - Always, as this SimQueue does not drop jobs.AbstractSimQueue.drop(J, double)protected final void rescheduleAfterDrop(J job, double time)
IllegalStateException.rescheduleAfterDrop in class AbstractSimQueue<J extends SimJob,Q extends PS>job - The jobs that was dropped.time - The current time (i.e., drop time of the job).IllegalStateException - Always, as this SimQueue does not drop jobs.AbstractSimQueue.drop(J, double)protected final void removeJobFromQueueUponRevokation(J job, double time, boolean auto)
Removes the job AbstractEgalitarianProcessorSharingSimQueue.virtualDepartureTime.
removeJobFromQueueUponRevokation in class AbstractSimQueue<J extends SimJob,Q extends PS>job - The job that is to be revoked.time - The current time (i.e., revocation time of the job).auto - Whether or not this applies to an auto-revocation.AbstractSimQueue.revoke(double, J, boolean)protected final void rescheduleAfterRevokation(J job, double time, boolean auto)
rescheduleAfterRevokation in class AbstractSimQueue<J extends SimJob,Q extends PS>job - The jobs that was successfully revoked.time - The current time (i.e., revocation time of the job).auto - Whether or not this applies to an auto-revocation.AbstractEgalitarianProcessorSharingSimQueue.rescheduleDepartureEvent()protected final void setServerAccessCreditsSubClass()
setServerAccessCreditsSubClass in class AbstractSimQueue<J extends SimJob,Q extends PS>AbstractSimQueue.getServerAccessCredits(),
AbstractSimQueue.setServerAccessCredits(double, int),
AbstractSimQueue.rescheduleForNewServerAccessCredits(double)protected final void rescheduleForNewServerAccessCredits(double time)
rescheduleForNewServerAccessCredits in class AbstractSimQueue<J extends SimJob,Q extends PS>time - The current time (i.e., the time at which new server-access credits became available).AbstractSimQueue.hasServerAcccessCredits(),
AbstractSimQueue.hasJobsInWaitingArea(),
AbstractSimQueue.start(double, J),
AbstractSimQueue.getFirstJobInWaitingArea()public final boolean isStartArmed()
true.SimQueueListener.notifyNewStartArmed(double, Q, boolean)protected final void rescheduleAfterDeparture(J departedJob, double time)
rescheduleAfterDeparture in class AbstractEgalitarianProcessorSharingSimQueue<J extends SimJob,Q extends PS>departedJob - The departed job.time - The departure (current) time.AbstractEgalitarianProcessorSharingSimQueue.rescheduleDepartureEvent(),
AbstractEgalitarianProcessorSharingSimQueue.removeJobFromQueueUponDeparture(J, double)Copyright © 2018. All rights reserved.