TheHingineer

  • Computer Networks


  • CN Part-1

  • CN Part-2

  • CN Part-3

  • CN Part-4

  • CN Part-5

  •  ALOHA Protocol: Pure ALOHA and Slotted ALOHA in Computer Networks

     ALOHA Protocol kya hai? (What is ALOHA?)

    • ALOHA pehla Random Access (Multiple Access) protocol tha jise 1970 mein Norman Abramson aur unke colleagues ne University of Hawaii mein design kiya tha.

    • Iska original maqsad tha Hawaii ke alag-alag islands par sthit computers ko ek common radio broadcast channel ke zariye central mainframe computer se connect karna.

    • ALOHA protocol ka basic principle bohot straightforward hai: “Transmit whenever you have data.” (Jab bhi station ke paas frame ready ho, bina kisi se puche turant send kar do).

    • Lekin agar do stations lagbhag ek hi time par frame bhejte hain, toh frames aapas mein takra jaate hain (jise Collision kehte hain) aur data corrupt ho jaata hai.

    • ALOHA do versions mein exist karta hai: Pure ALOHA aur Slotted ALOHA.

     1. Pure ALOHA

    Pure ALOHA ek continuous-time, uncoordinated protocol hai. Isme stations ke beech koi time synchronization nahi hota.

    Pure ALOHA ka Working Mechanism:

    1. Jab bhi kisi station ke paas frame ready hota hai, wo bina wait kiye turant channel par transmit kar deta hai.

    2. Frame bhejne ke baad station receiver se Acknowledgment (ACK) ka wait karta hai.

    3. Agar fixed timeout period ke andar ACK mil jaata hai, toh transmission successful maana jaata hai.

    4. Agar timeout ho gaya aur ACK nahi mila, toh station assume karta hai ki Collision ho gaya hai. Ab station turant retransmit nahi karta (warna dubara collision hoga), balki ek Random Backoff Time (R) wait karta hai aur fir retransmit karta hai.

    5. Max retransmission attempts limit (e.g. 15) reach hone par frame discard kar diya jaata hai.

    Station 1:   |--- Frame 1.1 ---|                 |--- Frame 1.2 ---|
    Station 2:             |--- Frame 2.1 ---| (Collision!)
    Station 3:                                             |--- Frame 3.1 ---|
    Time:      --------------------------------------------------------------->

    Vulnerable Time in Pure ALOHA

    Vulnerable Time wo time interval hota hai jisme agar koi doosra station frame transmit shuru kar de, toh collision hona tay hai.

    Agar ek frame ka transmission time Tt (Frame Time) hai, toh Pure ALOHA mein vulnerable period hota hai:

    Vulnerable Time (Pure ALOHA) = 2 * Tt

    Kyu? Kyunki agar koi doosra station frame shuru hone se Tt pehle transmit kare ya frame chalte waqt Tt duration ke andar transmit kare, dono cases mein overlap (collision) ho jayega.

    Throughput of Pure ALOHA

    Throughput (S) batata hai ki kitne percent frames successfully bina collision ke deliver hote hain:

    S = G * e^(-2G)

    Jahan G = Total number of frames generated per frame time.
    Maximum throughput tab milta hai jab G = 1/2 = 0.5:
    S_max = 1 / (2e) ≈ 0.184 (yani sirf 18.4%)

    Iska matlab yeh hai ki Pure ALOHA mein maximum sirf 18.4% bandwidth efficiently use hoti hai, baaki 81.6% capacity collisions ki wajah se waste ho jaati hai.

     2. Slotted ALOHA

    Pure ALOHA ke low throughput (18.4%) ko double karne ke liye 1972 mein Roberts ne Slotted ALOHA develop kiya.

    Slotted ALOHA ka Rule:

    • Total time ko discrete intervals ya Slots mein divide kar diya jaata hai. Har slot ka duration exactly ek frame transmission time Tt ke barabar hota hai.

    • Koi bhi station kabhi bhi beech mein transmit nahi kar sakta. Transmission sirf slot ke beginning (starting boundary) par hi start ho sakti hai.

    • Agar kisi station ka frame slot ke beech mein generate hota hai, toh use agle slot ke shuru hone ka wait karna padta hai.

    Slot Boundaries: |   Slot 1   |   Slot 2   |   Slot 3   |   Slot 4   |
    Station 1:       |--Frame 1-- |            |--Frame 2-- |            |
    Station 2:                    |--Frame A-- |            |            |
    Station 3:                    |--Frame B-- | (Collision)|            |

    Vulnerable Time in Slotted ALOHA

    Kyunki transmission sirf slot ke start par hoti hai, isliye agar collision hoga toh sirf un stations ke beech hoga jinhone usi specific slot ke start par ek saath transmit kiya.

    Vulnerable Time (Slotted ALOHA) = Tt

    Slotted ALOHA ne vulnerable time ko aadha kar diya (2 * Tt se ghatakar Tt kar diya)!

    Throughput of Slotted ALOHA

    Slotted ALOHA ka throughput formula hai:

    S = G * e^(-G)

    Maximum throughput tab milta hai jab G = 1:
    S_max = 1 / e ≈ 0.368 (yani lagbhag 36.8%)

    Slotted ALOHA ka maximum throughput Pure ALOHA se double (exact 2x) hota hai!

     Pure ALOHA vs Slotted ALOHA Comparison

    Parameter Pure ALOHA Slotted ALOHA
    Time Synchronization Continuous time (No clock synchronization required) Discrete time slots (Global clock synchronization required)
    Transmission Rule Kisi bhi waqt transmission start kar sakte hain Sirf time slot ke shuruat par transmission start ho sakti hai
    Vulnerable Time 2 * Tt Tt
    Throughput Formula S = G * e^(-2G) S = G * e^(-G)
    Maximum Throughput 18.4% (at G = 0.5) 36.8% (at G = 1.0)
    Collision Probability Bohot zyada (partial collision bhi fatal hota hai) Pure ALOHA se lagbhag aadhi

     Advantages and Disadvantages

    Advantages of ALOHA

    -> Extreme Simplicity: Pure ALOHA implement karna bohot aasan hai kyunki na channel sensing chahiye aur na koi central coordinator.
    -> Low Delay at Low Load: Jab network par traffic bohot kam hota hai, frame bina kisi delay ke turant chala jaata hai.

    Disadvantages of ALOHA

    -> Very Low Efficiency: 36.8% maximum efficiency ka matlab hai 63% se zyada bandwidth collisions mein waste hoti hai.
    -> No Carrier Sensing: Stations transmit karne se pehle channel ko check nahi karte (“Listen before Talk” nahi karte), isliye collision chance bohot high rehta hai.

     Summary Table

    Topic Summary Point
    ALOHA Protocol Pehla random access protocol jo University of Hawaii mein develop hua tha.
    Pure ALOHA Max S 18.4% (Vulnerable time = 2 * Tt)
    Slotted ALOHA Max S 36.8% (Vulnerable time = Tt)
    Next Evolution ALOHA ki collision problem ko door karne ke liye CSMA (Carrier Sense Multiple Access) introduce kiya gaya.
    Scroll to Top