Skip to content
Related Articles

Related Articles

Generalized foreground-background in Scheduling

Improve Article
Save Article
  • Last Updated : 30 Jul, 2020
Improve Article
Save Article

Prerequisite – Foreground-Background Scheduling
Generalized foreground-background in Scheduling, also known as Least Attained Services (LAS) is scheduling policy, mostly used in systems where size estimates are not available. It guesses remaining service time of job based on service received so far. If there are n such jobs, then they are served simultaneously, i.e., each of them is served at rate 1/n.

Generalized foreground-background gives service to job in system that has received least amount of service. In the event of ties, jobs having received least service share processor in processor sharing mode. A newly arriving job always preempts job currently in service and retains processor until it departs, or until next arrival occurs, or until it has obtained an amount of service equal to that received by job preempted on arrival, whichever occurs first.

Working of Foreground-Background :
A job enters first (or highest priority) state upon arrival in queue. The priority of jobs depends on their arrival time to that particular state in First Come First Serve manner. Jobs are served one at a time without interruption for time period of length q. After, server has completed job’s service request in certain state, job from highest (non-empty) priority state is selected for service. If job does not leave queue during its time in kth state, it moves to state k + 1, which has lower priority, and waits until it is served in that state. In the nth and final state, jobs are served only if there are no jobs in other states. In that final state, they are served until they leave system.

Theorems under Generalized Foreground-Background (FB) :

Notations :

  • p : refers to policy
  • X : Service requirement with mean E[X] and variance var(X)
  • SRPT : Shortest Remaining Processing Time
  • LAS : Another representation for FB
  • E[Tl] : E[TLAS]
  • E[Ts] : E[TSPRT]

 E[X]/p <= E[Tl] <= E[X]*((1-p/2)/(1-p)^2)

This deterministic distribution constitutes worst case where upper bound on mean response time of FB is attained, while number of distributions lead to lower bound. When load reaches 1, mean response time grows to infinity.

When p > 1, all jobs of size x < xp, such that pXp = 1 have finite response under FB.

This theorem sets parameter for ensuring fairness in scheduling . Metric used to evaluate fairness is mean conditional slowdown E[S(x)]. A policy is said to be fair if its mean conditional slowdown for all job sizes is smaller than corresponding metric under PS (Processor – Sharing). However, when flow size distribution has finite second moment, some large jobs (though not largest job) always experience slowdown greater under FB.

For all job sizes x and at load p<1

E[Ts(x)] <= E[Tl(x)] <= ((1-p(x))/(1-p))^2*E[Ts(x)]
This theorem depicts relation between mean condition response time of SRPT and FB.

Characteristics of Generalized Foreground – Background :

  1. LAS gives buffer space priority to first TCP packets of each flow, which means that these packets should not experience any loss.
  2. A new TCP flow starts in what is known as “slow start”, where its congestion window is initialized to very small value and then doubled after every round of transmission. Since, under FB, first packets of flow will experience no or negligible queuing delay, duration of round will be shorter under FB and congestion window will increase faster.
  3. The behavior of FB router is similar to that of FB queue, as long as packet to be serviced next arrives at router before the time instant, where it is selected by scheduler.
  4. FB can be modified to obtain threshold value for TCP packets, where service priority assigned to any packet cannot take value larger than threshold.
  5. FB minimizes/maximizes queue-length distribution under DFR/IFR distributions, and thus also mean queue length EQ and mean response time EV.
  6. For deterministic service distributions, FB has mean response times that are as large as possible under any work conserving policy
  7. For Light-tailed service distributions, FB has tail behavior that matches heaviest tail possible under work conserving policies.
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!