The Wayback Machine - https://web.archive.org/web/20240626211031/https://www.geeksforgeeks.org/what-is-the-variable-stack-size/
Open In App

What is the Variable stack size ?

Last Updated : 26 Jun, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

What variable stack size is and how does it affect computer networks?

  • A variable stack depth (VSD) means that the maximum number of frames the system can store in its transmit buffer changes dynamically. 
  • When the number of free buffers nears exhaustion, the VSD decreases, freeing space in the buffer pool by discarding buffers as it receives them and so slowing down new transmissions. 
  • Conversely, when there are more free buffers than needed for simplex connections, VSD increases to save space in the buffer pool for potential retransmissions.
  • The benefits of VSD are improved resource utilization and reduced probability of overloads.

Advantages of variable stack size:

  • Better resource utilization: Frame discards limit the number of buffers and therefore the amount of bandwidth in the system. This results in a reduction in unnecessary queuing when there are too many frames, and an increase in throughput during light load periods.
  • Fractional Buffers: Showing that VSD can be used to conserve buffer space also helps show that buffers do not have to be a fixed size, as long as enough frames are saved for retransmissions. In fact, VSD could be used to produce smaller buffers than would normally be needed to preserve some transmission quality measures. This is particularly useful for wireless links because of their limited buffer space.

Disadvantages of variable stack size:

  • Inability to predict or control when variable buffer length will be needed during transmission.
  • Buffer space management can introduce an artificial delay between the receiving software and hardware buffers, making the system slow or fail. This problem can be avoided by adjusting a parameter called Window Size, which controls how many windows are built and transmitted at a time. The size of each window determines how long the packet is held in the queue before it is retransmitted. It might make more sense to use a fixed buffer space that adjusts based on current transmission conditions rather than on the number of frames buffered.
  • Some protocols require specific buffer sizes for specific purposes. MPLS labels, for example, are only 24 bits long yet can be of any length. A VSD would be required to support all possible lengths.
  • Variable Stacks depths could violate the principle of fairness, since for some connections the resources are more readily available and for others, they are more scarce.

Important points:

  • The VSD mechanism can be effective only if it is well-matched to the properties of the underlying transmission media.
  • A VSD can be used in a protocol stack that uses a variable maximum frame size, such as Frame Relay or ATM, but when using a fixed maximum frame size, such as Ethernet, it must be paired with an appropriate window size. The window size controls how many frames are allowed in the output queue at any given time.
  • In Computer Networking, Protocols are used for defining network communication procedures for two or more nodes. In this paper, these protocols work with some information transmission media but not with others like Ethernet and FDDI networks.

Conclusion:

Variable Stacks depth in Networking can be used to make networks faster, more responsive, and more efficient. However Variable Stacks depth can cause problems such as frame loss and inefficient use of buffer space. Besides that TCP/IP protocol has some more rules that are very important in computer networking.

  • A protocol must be designed to allow operating efficiently over a wide range of network conditions while remaining useful and reliable. This prevents the need for adjustment of many parameters at each transmission, which can cause delays or congestion in the network path.
  • A protocol must have enough bandwidth on each link to accommodate variations in demand without full-duplex operation or requiring multiple buffers at each end. Buffers may be used at the receiving station to conserve space until the data is needed.

Similar Reads

Difference between Instance Variable and Class Variable
Instance Variable: It is basically a class variable without a static modifier and is usually shared by all class instances. Across different objects, these variables can have different values. They are tied to a particular object instance of the class, therefore, the contents of an instance variable are totally independent of one object instance to
2 min read
Difference Between Lock variable and Turn variable in Operating System
In operating systems, effe­ctive and reliable synchronization me­chanisms play a vital role in managing concurrency and coordinating the activitie­s of multiple processes or thre­ads. Two essential tools for synchronization are lock variable­s and turn variables, each serving distinct purpose­s and having unique characteristics. In this article, we
4 min read
Difference between Instance Variable and Local Variable
A variable is a name given to a memory location. It is the basic unit of storage in a program. The value stored in a variable can be changed during program execution.A variable is only a name given to a memory location. All the operations are done on the variable effects of a memory location.In Java, all the variables must be declared before use.In
3 min read
Full domain Hashing with variable Hash size in Python
A cryptographic hash function is a special class of hash function that has certain properties which make it suitable for use in cryptography. It is a mathematical algorithm that maps data of arbitrary size to a bit string of a fixed size (a hash function) which is designed to also be a one-way function, that is, a function which is infeasible to in
5 min read
Why can't a const variable be used to define an Array's initial size in C?
What is an array? An array is a collection of items of the same data type stored at contiguous memory locations. This makes it easier to calculate the position of each element by simply adding an offset to a base value, i.e., the memory location of the first element of the array (generally denoted by the name of the array). The base value is index
3 min read
Infix to Postfix using different Precedence Values for In-Stack and Out-Stack
Conversion of infix to postfix expression can be done elegantly using two precedence function. Each operator is assigned a value (larger value means higher precedence) which depends upon whether the operator is inside or outside the stack. Also the right and left associativity for different operators can be handled by varying it's values in the two
12 min read
Find maximum in stack in O(1) without using additional stack
The task is to design a stack which can get the maximum value in the stack in O(1) time without using an additional stack. Examples: Input: push(2) findMax() push(6) findMax() pop() findMax() Output: 2 inserted in stack Maximum value in the stack: 2 6 inserted in stack Maximum value in the stack: 6 Element popped Maximum value in the stack: 2 Appro
11 min read
Difference between a process stack and a CPU stack
Temporary data like as method/function arguments, return address, and local variables are stored on the process Stack, whereas on the other hand, the CPU stack consists of a collection of data words. It employs the Last In First Out (LIFO) access technique, which is the most common in most CPUs. In this article we are going to find out the detailed
3 min read
Stack Permutations (Check if an array is stack permutation of other)
A stack permutation is a permutation of objects in the given input queue which is done by transferring elements from the input queue to the output queue with the help of a stack and the built-in push and pop functions. The rules are: Only dequeue from the input queue.Use inbuilt push, and pop functions in the single stack.Stack and input queue must
15+ min read
Reversing a Stack with the help of another empty Stack
Given a Stack consisting of N elements, the task is to reverse the Stack using an extra stack. Examples: Input: stack = {1, 2, 3, 4, 5} Output: 1 2 3 4 5 Explanation: Input Stack: 5 4 3 2 1 Reversed Stack: 1 2 3 4 5 Input: stack = {1, 3, 5, 4, 2} Output: 1 3 5 4 2 Approach 1: Follow the steps below to solve the problem: Initialize an empty stack.Po
8 min read
Article Tags :
Practice Tags :
three90RightbarBannerImg