Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

3.5 Available Bit Rate (ABR) Rate Control Logic

Lesson 19 of 34 in the free High Speed Networks notes on Siksha Sarovar, written by Rohit Jangra.

3.5.1 The ABR Closed-Loop Feedback

ABR is the only protocol that gives the network control over the source's clock.

Study Deep: Explicit Rate (ER) vs. Binary Feedback

ATM ABR was ahead of its time by offering two ways to control speed:

  1. Binary (EFCI/CI/NI): Like a "stoplight." The switch says "Slow down" or "Speed up." (Slow to converge).
  2. Explicit Rate (ER): The switch calculates exactly how much bandwidth is available and writes it into the RM cell (e.g., "You may send at 45.2 Mbps"). (Instant convergence).

RM (Resource Management) Cell State Machine

void send_data_and_rm_cells(Source *s) {
    static int cell_count = 0;
    if (++cell_count % 32 == 0) {
        RM_Cell rm;
        rm.er = s->pcr;   // Request max
        rm.dir = FORWARD;
        send(rm);
    }
    send_data_at_rate(s->acr);
}

Switch Logic (ER Marking):

void process_forward_rm(Switch *sw, RM_Cell *rm) {
    double my_capacity = sw->link_speed / sw->num_active_vcs;
    if (rm->er > my_capacity) {
        rm->er = my_capacity; // Explicit Rate marking
    }
}

3.5.3 Rate Update Logic (ACR Calculation)

Upon receiving a Backward RM Cell:

void update_acr(Source *s, RM_Cell *rm) {
    if (rm->ci == 1) {
        // Reduce rate: ACR = ACR * (1 - RDF)
        s->acr = max(s->mcr, s->acr - (s->acr * s->rdf));
    } else {
        // Increase rate: ACR = ACR + (RIF * PCR)
        s->acr = min(rm->er, min(s->pcr, s->acr + (s->rif * s->pcr)));
    }
}

3.5.4 Max-Min Fairness: The Water-Filling Algorithm

The iterative logic to achieve Max-Min fairness:

void calculate_fair_share(Link *l, Source sources[]) {
    double total_cap = l->bandwidth;
    int active_sources = l->num_sources;
    
    while (active_sources > 0) {
        double share = total_cap / active_sources;
        bool changed = false;
        
        for (int i=0; i<l->num_sources; i++) {
            if (!sources[i].fixed && sources[i].demand < share) {
                sources[i].allocation = sources[i].demand;
                sources[i].fixed = true;
                total_cap -= sources[i].demand;
                active_sources--;
                changed = true;
            }
        }
        if (!changed) {
            for (int i=0; i<l->num_sources; i++) {
                if (!sources[i].fixed) sources[i].allocation = share;
            }
            break;
        }
    }
}